Rust Module Validator skill for Claude and Codex
A checklist to prove a Rust module is sound before it merges (public API as declared, Cargo.toml in order, builds on the minimum Rust version) plus a…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a Rust module needs a pre-merge checklist and a compile-time test that proves its public API, dependencies, and minimum Rust version all hold. Do not use for writing the module's unit tests for behaviour, reviewing its design, or benchmarking it. Related topics: coding, rust.
What it will ask you for
- Module name (free text, e.g. "my_module")
- File path (free text, e.g. "src/my_module.rs")
- Public items to verify (longer free text)
- Rust edition (choose one: 2015, 2018, 2021, 2024)
- Include Cargo.toml check (choose one: Yes, No)
- Minimum Rust version (free text, e.g. "1.70")
- Input 7 (choose one: cfg(test))
How it works
- Write each check as a command with an expected result: module declared, signatures exact, edition matching, build on the minimum toolchain, clippy and doc warnings clean.
- When the Cargo.toml check is on, add rows for rust-version, edition, and the dependency features the module needs.
- Compare the declared dependencies to the module's imports and list anything missing or unused.
- Write the test module so it constructs every public type and calls every public function with trivial arguments, so a signature change breaks compilation.
- Read the checklist once more and remove any item that cannot be verified by running something.
What you get
A Validation Checklist section with one bullet per check (command and expected result), then a rust code block labeled test with a #[cfg(test)] module that exercises every public item.
What it watches out for
- Writing checklist items like 'ensure the API is correct' that nobody can run, so the checklist gets skipped.
- Testing only that the crate compiles, which passes even when a public function was deleted.
- Setting rust-version in Cargo.toml without actually building on that toolchain, so the claim is never verified.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.