rust-router — Claude Code skill: Rust error routing and design layers
A skill that stops the agent from answering Rust questions off the cuff and walks it through layers instead: language mechanics, design choices, domain constraints.
npx skills add actionbook/rust-skills --skill rust-router -a claude-codeWhat rust-router does
It acts as a router. The agent reads your Rust question, picks the layer, and loads the matching skill: m01-ownership for ownership and borrow errors, m03-mutability for mutable borrow conflicts, m04-zero-cost for generics and traits, m06-error-handling for Result and ?. Compiler codes map to skills in a table — E0382 and E0597 go to m01-ownership, E0499 and E0502 to m03-mutability, E0277 to m04 or m07-concurrency.
The skill triggers on **/Cargo.toml and **/*.rs. When domain words show up, it insists on loading two skills at once: axum and HTTP pull in m07-concurrency plus domain-web, payments pull in m01-ownership plus domain-fintech. Comparisons and best-practice questions switch on a negotiation protocol, so the answer arrives with a confidence level and a list of gaps.
There is a firm default too: for new projects the skill prescribes edition 2024, rust-version 1.85, unsafe_code = "warn", and clippy with all and pedantic. If your team pins a different edition or keeps pedantic lints off, that is worth checking before you let the skill touch your Cargo.toml.
What it helps with
- work through an E0382 and find where the value got moved
- pick between tokio and async-std for a specific job
- design error handling with
thiserrorandanyhow - connect a compile error back to domain requirements
- find a pattern for shared state in async code
Example prompts for the agent
- Explain the E0597 in this file and show how to fix the lifetime
- Compare tokio and async-std for an axum HTTP server, include the gaps
- Help me design error handling for a new crate
How to install rust-router
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-router -a claude-code2Manually: put the files in place
~/.claude/skills/rust-router/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/rust-router/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-router -a codex2Manually: put the files in place
.agents/skills/rust-router/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-router -a cursor2Manually: put the files in place
.cursor/skills/rust-router/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install actionbook/rust-skills rust-router2Manually: put the files in place
.github/skills/rust-router/SKILL.md1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-router -a gemini-cli2Platform CLI
gemini skills install https://github.com/actionbook/rust-skills --path skills/rust-routerManually: put the files in place
.devin/skills/rust-router/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill rust-router -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about rust-router
How do I install rust-router in Claude?
Run npx skills add actionbook/rust-skills --skill rust-router -a claude-code. The skill lands in ~/.claude/skills/rust-router/SKILL.md.
What does rust-router do?
It identifies the layer of a Rust question and routes the agent to the right skill: language mechanics, design, or domain constraints. It also maps compiler error codes to skills.
Which platforms are supported?
Claude, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode. Each takes its own install flag, such as -a cursor or -a codex.