14 skills · 7 categories
Claude Code skills for Rust
Rust skills for ownership-friendly designs, async services with Tokio and Axum, WebAssembly modules, embedded targets and fuzzing. They steer Claude away from cloning its way past the borrow checker.
Start with these
- 1
Axum Rust Services
Thin handlers, typed state, errors that map to HTTP
Claude writes Axum 0.8 services with a typed AppState, one AppError enum that maps sqlx failures to 404 and 409, extractors in the order the compiler demands, and a tower-http stack with request IDs, tracing, timeouts and body limits in a deliberate order. Queries are checked at compile time with committed offline metadata, shutdown drains in-flight requests, and tests use oneshot with a fresh database.
- 2
Rust Ownership
Satisfy the borrow checker without clone spam
Claude reads rustc's three spans, finds where a borrow can end sooner or a value can have a single owner, and fixes errors structurally instead of cloning or wrapping everything in Rc<RefCell>. It applies the thiserror-for-libraries, anyhow-for-binaries split, sets up edition 2024 workspaces with shared lints, and keeps clippy at zero warnings.
- 3
Embedded Rust
no_std firmware with one owner per peripheral
Claude sets up no_std firmware with the right target triple, pinned toolchain, probe-rs runner and defmt logging, then structures concurrency as embassy tasks that own their peripherals and talk over channels. Drivers are written generically over embedded-hal 1.0 and tested on the host with mocks, memory stays static with heapless and StaticCell, and release builds are checked for size and stack headroom.
All 14 Rust skills
Grouped by category. Each card opens the full playbook, example prompts and install commands.
Engineering Workflow 3
Dead Code Removal
Delete unused code with two kinds of proof
Claude configures the right analyzer for the stack with real entry points, triages candidates against known false-positive patterns such as dynamic imports, framework conventions and external callers, and requires a second signal like search, coverage or runtime logs before deleting. Removals land in small batches by kind with the full build and test gate after each, and confirmed false positives go into analyzer config.
Dependency Upgrades
Major version bumps without the Friday surprise
Claude upgrades in risk groups instead of bumping everything at once: a green baseline first, patch and minor updates batched, each major handled alone with its migration guide turned into a checklist, official codemods committed separately, and the lockfile changed only where intended. It also sets Renovate or Dependabot policies so routine updates merge themselves and majors wait for a plan.
TDD Loop
See it fail, make it pass, then clean it up
Makes Claude work test-first for real: it writes a test list, runs every new test to confirm it fails on the assertion rather than a typo, writes the least code to pass, and refactors only on green. It picks the next test deliberately, checks coverage on touched files, and sabotages key code paths to prove the tests can actually catch regressions.
Languages 3
Rust Ownership
Satisfy the borrow checker without clone spam
Claude reads rustc's three spans, finds where a borrow can end sooner or a value can have a single owner, and fixes errors structurally instead of cloning or wrapping everything in Rc<RefCell>. It applies the thiserror-for-libraries, anyhow-for-binaries split, sets up edition 2024 workspaces with shared lints, and keeps clippy at zero warnings.
WebAssembly Modules
Ship wasm only where it pays, and keep it small
Claude first checks whether WebAssembly will actually beat JavaScript for the job, then picks the matching target: wasm-bindgen, Emscripten, wasip1 or wasip2 components. It designs coarse JS boundaries that survive memory growth, loads modules in workers with correct headers, and uses a bundled analyzer to find the largest sections and functions and enforce a gzip size budget.
Regex Crafting
Patterns with test cases and no ReDoS surprises
Claude writes regexes test-first: a cases file of must-match, must-not-match and expected captures, then the simplest anchored pattern that passes. It knows where PCRE, JavaScript, Python, Java, Go and grep disagree, rewrites nested quantifiers and overlapping alternations, and runs a bundled script that pumps inputs to expose catastrophic backtracking before it ships.
Testing 4
Fuzz Testing
Throw hostile bytes at parsers before attackers do
Claude picks the input boundaries worth fuzzing, writes fast deterministic harnesses with real invariants such as round-trip equality, and seeds them with real inputs and format dictionaries. Crashes get reproduced, minimized, classified by sanitizer report and deduplicated by stack, then committed as regression inputs, and CI runs short fuzz jobs with a cached corpus.
Benchmark Testing
Faster means significant, not one lucky run
Claude stops quoting single-run timings. It uses the right harness per language, guards against dead-code elimination, quiets the machine, measures noise with an A/A run, and compares 10 or more samples per side with a significance test and confidence interval. CI gates get thresholds derived from measured noise, or instruction counts when shared runners are too jittery.
Coverage Analysis
Find untested risk instead of chasing a percentage
Claude fixes how coverage is measured first (branch mode, all source files, merged shards), then reads the report for risk by combining missed lines with churn and business criticality. It gates pull requests on coverage of changed lines rather than the global number, and flags tests that execute code without asserting anything. A bundled script computes diff coverage from LCOV or Cobertura.
Mutation Testing
Find out if your tests would notice a real bug
Claude runs mutation testing where it pays off, on critical modules or changed files, and triages every surviving mutant: missing boundary case, weak assertion, untested error path, equivalent mutant, or dead code. Survivors turn into small behavior-named tests, ignores carry a written reason, and CI gates only the modules that matter.
Install
Every Rust skill in one command
Installs into ~/.claude/skills/. Add --project after -- to install into the current repository.
curl -fsSL https://claudeskills.page/install.sh | sh -s -- axum-rust-services rust-ownership embedded-rust webassembly-modules ecs-architecture fuzz-testing dead-code-removal dependency-upgrades tdd-loop regex-crafting benchmark-testing coverage-analysis mutation-testing web-workers Rust skills FAQ
What is the best Claude Code skill for Rust?
Start with Axum Rust Services: Thin handlers, typed state, errors that map to HTTP. Then add Rust Ownership and Embedded Rust, which cover the next most common Rust requests.
How do I install all 14 Rust skills at once?
Pass every name to the installer in one command: curl -fsSL https://claudeskills.page/install.sh | sh -s -- axum-rust-services rust-ownership embedded-rust webassembly-modules ecs-architecture fuzz-testing dead-code-removal dependency-upgrades tdd-loop regex-crafting benchmark-testing coverage-analysis mutation-testing web-workers. Add --project to install them into the current repository's .claude/skills/ folder so your team gets them too.
Do these Rust skills work outside Claude Code?
Yes. Each skill uses only the portable Agent Skills frontmatter, so the same folder works on claude.ai, through the Claude API and in the Agent SDK. Skills that run bundled scripts need an environment with code execution.