Rust Coding Guidelines
Enforces idiomatic Rust patterns, naming conventions, and modern best practices during code generation and review.
The Rust Coding Guidelines skill equips Claude with 50 core rules for writing high-quality, idiomatic Rust code based on established industry standards. It covers essential topics including Rust-specific naming conventions, memory safety patterns, efficient string handling, and modern error propagation. By referencing up-to-date crate recommendations—such as transitioning from lazy_static to OnceLock—this skill ensures that AI-generated code remains performant, safe, and aligned with the latest stable Rust standards, making it an indispensable tool for both greenfield development and legacy refactoring.
Key Features
01Provides best practices for safe concurrency and scoped async I/O management.
02Enforces Rust-specific naming conventions for iterators, conversions, and statics.
03Optimizes memory usage through newtypes, slice patterns, and pre-allocation strategies.
04Guides modern error handling using the '?' operator and contemporary error crates.
05Recommends modern alternatives to deprecated crates like lazy_static and failure.
06596 GitHub stars
Use Cases
01Refactoring legacy Rust code to utilize modern 1.80+ syntax and standard library features.
02Performing automated code reviews to ensure adherence to idiomatic Rust style and performance.
03Generating high-performance, memory-safe code snippets for systems programming tasks.