Rust Best Practices Skill (Apollo GraphQL) for Claude Code: What It Does and How to Install It
Makes your assistant write and review Rust code with the guidance from Apollo GraphQL's Rust best practices handbook.
- Installs
- 22.1K
- on skills.sh
- Stars
- 123
- on GitHub
- Files
- 9
- besides SKILL.md
- Updated
- Nov 2026
- last repo commit
SKILL.md tells the assistant to read the relevant chapters of the handbook, in parallel, before it reviews or writes Rust. It also carries a short quick reference for borrowing, errors, performance, linting, testing, dispatch, type state and docs.
It loads when you write, review, refactor or test Rust code. SKILL.md lists Rust 1.70+ and Cargo, and allows cargo, rustc, rustfmt and clippy through Bash.
Good for
- Rust developers who want code reviews that follow one handbook
- People refactoring clones, error handling or lints in a Rust project
- Teams setting clippy and test conventions
Install rust-best-practices
Claude Code
- 1
Copy this prompt.
Install the rust-best-practices skill in Claude Code. Run this command: npx skills add apollographql/skills@rust-best-practices Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
Pick one route. The skills CLI route installs only this skill. The plugin route installs the apollo-skills plugin: 15 skill folders in the repo tree (the README table lists 12), an .mcp.json for https://mcp.apollographql.com and a .lsp.json for graphql-lsp. The skill is a folder of Markdown files, so the Claude app ZIP upload works too, but cargo commands only run where you have a shell.
From the project README. Source.
What's in the skill
When it loads
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.
Sections in SKILL.md
- Best Practices Reference
- Quick Reference
- Borrowing & Ownership
- Error Handling
- Performance
- Linting
- Testing
- Generics & Dispatch
- Type State Pattern
- Documentation
Key facts
- Installs on skills.sh
- 22,070 (Nov 2, 2026)
- Last repo commit
- Nov 1, 2026
- Audits on skills.sh
- Gen Agent Trust Hub: pass, Socket: pass, Snyk: pass
What it includes
Coding styles and idioms: borrowing vs cloning, Copy, Option and Result, iterators.
Read ·
Chapter 1: references/chapter_01.mdClippy and linting: configuration, important lints, workspace lint setup.
Read ·
Chapter 2: references/chapter_02.mdPerformance mindset: profiling, redundant clones, stack vs heap.
Read ·
Chapter 3: references/chapter_03.mdError handling: Result vs panic, thiserror vs anyhow, error hierarchies.
Read ·
Chapter 4: references/chapter_04.mdAutomated testing: test naming, one assertion per test, snapshot testing.
Read ·
Chapter 5: references/chapter_05.mdGenerics and dispatch: static vs dynamic dispatch and trait objects.
Read ·
Chapter 6: references/chapter_06.mdType state pattern: compile-time state safety and when to use it.
Read ·
Chapter 7: references/chapter_07.mdComments vs documentation: when to comment, doc comments, rustdoc.
Read ·
Chapter 8: references/chapter_08.mdUnderstanding pointers: thread safety, Send and Sync, pointer types.
Read ·
Chapter 9: references/chapter_09.mdThe quick reference tells the agent to run clippy with -D warnings regularly.
The command in SKILL.md is cargo clippy --all-targets --all-features --locked -- -D warnings.
Runs code ·
cargo clippy
From the official docs
Permissions
Low risk
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It can edit your Rust files
SKILL.md allows Write and Edit, and cargo, rustc, rustfmt and clippy through Bash. Review the diff before you commit. github.com
The plugin route adds more than this skill
The repo plugin has 15 skill folders in the tree (the README table lists 12). It also ships a .mcp.json that points to https://mcp.apollographql.com and a .lsp.json that starts graphql-lsp. Use the skills CLI route if you only want Rust advice. github.com
Technical details
| Turning on read-only | No read-only mode is documented. |
|---|---|
| Talks to | https://mcp.apollographql.com (only if you install the whole plugin) |
| Scopes |
|
Questions
What does the rust-best-practices skill do?
It makes your assistant follow Apollo GraphQL's Rust best practices handbook when it writes, reviews or refactors Rust code. It covers borrowing vs cloning, error handling, clippy, performance, testing, dispatch, type state, docs and pointers.
How do I install it?
Use the install box at the top of this page. The README gives a skills CLI command for this one skill and a Claude Code plugin that installs the whole Apollo set.
Does it need an API key?
No key is named in SKILL.md or the README for this skill. SKILL.md lists Rust 1.70 or newer and Cargo as the compatibility note.
Is it safe?
It can edit your Rust files and run cargo, rustc, rustfmt and clippy, which SKILL.md allows. Our advice: use git and review the diff. The plugin route also adds an MCP server entry and a language server entry.
Is it the official Apollo skill?
It sits in Apollo GraphQL's own skills repo and is based on Apollo's Rust Best Practices Handbook. The skill metadata lists apollographql as author.
Is it only for Apollo GraphQL projects?
No. The triggers in SKILL.md are general Rust tasks such as writing, reviewing and testing Rust code. The guidance comes from the Apollo handbook, but nothing in the triggers limits it to GraphQL.
Why does the README link to different reference files?
The README lists style.md, errors.md, performance.md, testing.md and advanced.md. The repo tree and SKILL.md use chapter_01.md to chapter_09.md. The skill folder in the repo holds the chapter files.
Information
updated Nov 2, 2026
- Repository
- apollographql/skills
- Folder
skills/rust-best-practices
Sources
Docs, issue trackers and discussions this page is built from.
Show all 6Hide
- apollographql/skills README · github.com
- rust-best-practices SKILL.md · github.com
- apollographql/skills marketplace.json · github.com
- apollographql/skills plugin.json · github.com
- apollographql/skills .mcp.json · github.com
- apollographql/skills .lsp.json · github.com