rust · fandhe-ai — Claude Code skill: a Rust language reference
This skill hands your agent a local copy of the official Rust docs: the language, Cargo, rustc, unsafe and async. Useful when you are editing a crate or fighting the borrow checker.
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a claude-codeWhat rust does
The skill packs 14 official Rust sources into markdown files under references/. You get TRPL and Rust by Example, the language reference, the Cargo Book, the rustc Book, the rustdoc Book, the Rustonomicon on unsafe, the Edition Guide, standard library sections and the error index. Nothing is fetched at runtime — the agent reads local pages.
It routes by a task-to-category table. Ask about ownership or traits and the agent opens references/book/README.md, finds the chapter, reads it. Ask about Cargo.toml, workspaces or features and it goes to references/cargo/. Compiler flags, --print, sanitizers, LTO live in references/rustc/. Separate folders cover CLI tools, embedded targets and runnable snippets in samples/.
The skill is marked user-invocable: false, so you cannot call it by hand — it picks itself up when a task touches Rust. The reference is pinned to Rust 1.99.1, so questions about nightly-only features will not be answered from it. If your project still sits on an older edition, check references/edition-guide/.
What it helps with
- figure out why the borrow checker rejects a function
- declare features correctly in
Cargo.toml - find the right
rustcflag for a debug build - check what counts as undefined behavior inside an unsafe block
- migrate a crate to a newer language edition
Example prompts for the agent
- explain why this function fails to compile over ownership
- how do I set up a workspace with two crates in
Cargo.toml? - show me an example of async/await with
tokio
How to install rust
1Skills CLI (Vercel)
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a claude-code2Manually: put the files in place
~/.claude/skills/rust/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/rust/
1Skills CLI (Vercel)
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a codex2Manually: put the files in place
.agents/skills/rust/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a cursor2Manually: put the files in place
.cursor/skills/rust/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Fandhe-AI/agent-reference-skills rust2Manually: put the files in place
.github/skills/rust/SKILL.md1Skills CLI (Vercel)
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a gemini-cli2Platform CLI
gemini skills install https://github.com/Fandhe-AI/agent-reference-skills --path skills/rustManually: put the files in place
.devin/skills/rust/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Fandhe-AI/agent-reference-skills --skill rust -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
How do I install rust in Claude?
Run npx skills add Fandhe-AI/agent-reference-skills --skill rust -a claude-code. The skill lands at ~/.claude/skills/rust/SKILL.md.
What does the rust skill do?
It gives the agent a local set of official Rust docs plus a rule for which folder to consult per task. Answers about ownership, traits, Cargo and unsafe come back faster.
Do I need to install anything else?
No. The whole reference ships as markdown files inside the skill and the agent reads them directly.
Similar skills
All skills for Programming languages →rust by other authors comes first.