Rust Best Practices
Official
Developer Tools
Enforces idiomatic Rust code patterns, optimizes performance, and applies Apollo GraphQL's production-grade Rust guidelines.
The Rust Best Practices skill elevates your development workflow by embedding Apollo GraphQL's industry-proven Rust handbook directly into Claude. This skill empowers Claude to write, review, and refactor idiomatic Rust code with a focus on ownership safety, optimized performance, clean error propagation, and rigorous test coverage. It guides the model through linting with Clippy, avoiding redundant clones, utilizing the Type State pattern for compile-time safety, and constructing robust APIs that adhere to modern Rust ecosystem standards.
Key Features
01Implements robust error handling hierarchies using Result, thiserror, and anyhow patterns.
02Configures, runs, and resolves strict Cargo Clippy lints and workspace format warnings.
0393 GitHub stars
04Enforces clean testing structures including descriptive naming, snapshot testing, and doc-tests.
05Guides borrowing and ownership decisions to replace redundant cloning with efficient references.
06Optimizes runtime performance through memory profiling hints, stack-vs-heap tuning, and iterators.
Use Cases
01Designing robust public APIs with secure Type State patterns and comprehensive rustdoc documentation.
02Setting up and validating automated workspace-wide linting and safety checks on new Rust projects.
03Refactoring legacy Rust applications to eliminate memory overhead and unnecessary clones.