rust-best-practices
Idiomatic Rust coding standards based on Apollo GraphQL's best practices handbook.
What it does
- Chapter 1 - Coding Styles and Idioms: Borrowing vs cloning, Copy trait, Option/Result handling, iterators, comments
- Chapter 2 - Clippy and Linting: Clippy configuration, important lints, workspace lint setup
- Chapter 3 - Performance Mindset: Profiling, avoiding redundant clones, stack vs heap, zero-cost abstractions
- Chapter 4 - Error Handling: Result vs panic, thiserror vs anyhow, error hierarchies
- Chapter 5 - Automated Testing: Test naming, one assertion per test, snapshot testing
- Chapter 6 - Generics and Dispatch: Static vs dynamic dispatch, trait objects
- Chapter 7 - Type State Pattern: Compile-time state safety, when to use it
Requirements & configuration
- Every TODO needs a linked issue: // TODO(#42): ...
Configuration: TODO
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
Idiomatic Rust coding standards based on Apollo GraphQL's best practices handbook.
Source
Repository: https://github.com/apollographql/skills
rust-best-practices FAQ
What does the rust-best-practices skill do?
> 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. Chapter 1 - Coding Styles and Idioms: Borrowing vs cloning, Copy trait, Option/Result handling, iterators, comments Chapter 2 - Clippy and Linting: Clippy configuration, important lints, workspace lint setup
What does rust-best-practices require?
Every TODO needs a linked issue: // TODO(#42): ... Configuration keys: TODO.
How do I install rust-best-practices?
Run: npx -y skills add https://github.com/apollographql/skills --skill rust-best-practices --agent claude-code — the source lives at github.com/apollographql/skills.
Maintain rust-best-practices?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/apollographql-skills-rust-best-practices?ref=badge) npx agentictools info skills/apollographql-skills-rust-best-practices The second line is the CLI lookup for this page — handy in READMEs and docs.