rust-best-practiceslisted
Install: claude install-skill lklimek/claudius
# Rust Best Practices
Two authoritative sources of Rust best practices, presented as checklists for quick reference.
When you need detailed guidance on a specific item, read the corresponding reference file.
## How to Use
1. **During code writing/review**: Scan the relevant checklist sections below
2. **For detailed guidance**: Read the reference file linked in each section header
3. **For API design**: Focus on the Rust API Guidelines checklist (C-prefixed items)
4. **For production systems**: Focus on the Microsoft Guidelines checklist (M-prefixed items)
### Sources
- Microsoft Pragmatic Rust Guidelines: https://microsoft.github.io/rust-guidelines/
- AI-friendly condensed version: https://microsoft.github.io/rust-guidelines/agents/all.txt
- Rust API Guidelines: https://rust-lang.github.io/api-guidelines/
## Technical Standards
- **Rust Edition**: Latest stable (2021 or newer)
- **Code Style**: rustfmt with default settings
- **Linting**: clippy with `deny(warnings)` in CI
- **Testing**: cargo test with doc tests
- **Documentation**: One-line `///` comment for every public item; expand only when non-obvious
- **Error Handling**: `thiserror` for typed errors; see Error Handling section below
- **Dependencies**: Minimal, prefer std when possible
- **Async**: tokio for async runtime when needed
## Common Patterns
- **Error Handling**: `thiserror` with typed error enums
- **Async**: tokio with async/await
- **Serialization**: serde with derive macros
- **CLI**: clap for