rust-best-practices
Installation
SKILL.md
Rust Best Practices
Guidelines for writing idiomatic, efficient, and maintainable Rust code.
Core Principles
- Leverage the type system - Make invalid states unrepresentable
- Prefer compile-time checks - Catch errors before runtime
- Be explicit about ownership - Don't fight the borrow checker
- Write code that passes fmt/clippy first - Not after fixing
Error Handling
Application Code: Use anyhow
use anyhow::{Context, Result, bail};