Rust Best Practices
Applies Microsoft Pragmatic Rust guidelines and community standards to write, review, and refactor idiomatic Rust code.
The Rust Best Practices skill elevates your Rust development by enforcing industry-standard patterns rooted in the Microsoft Pragmatic Rust Guidelines and community consensus. It equips Claude Code with actionable rules for robust error handling using thiserror and anyhow, ergonomic API design via builder and newtype patterns, panic-free library development, and zero-cost abstractions. It is essential when authoring new crates, reviewing pull requests, refactoring legacy systems, or ensuring idiomatic borrow checker and type system utilization across your codebase.
Key Features
01Contextual error handling guidance using thiserror for crates and anyhow for applications
02Panic prevention rules and safe error propagation strategies for production libraries
03Zero-cost abstraction enforcement leveraging iterators, generics, and traits
04Idiomatic API design patterns including builders, newtypes, and flexible impl Trait signatures
05Type system maximization techniques to make invalid application states unrepresentable
06263 GitHub stars
Use Cases
01Refactoring error handling mechanisms to eliminate panics and use typed error enums
02Designing resilient public API interfaces and builder structs for Rust libraries
03Conducting automated code reviews to align Rust projects with Microsoft Pragmatic guidelines