rust-best-practices

Installation
SKILL.md

Rust Best Practices

Guidance for writing idiomatic, performant, and safe Rust code. This is a development skill, not a review skill -- use it when building, not reviewing.

Quick Reference

Topic Key Rule Reference
Ownership Borrow by default, clone only when you need a separate owned copy references/coding-idioms.md
Clippy Run cargo clippy -- -D warnings on every commit; configure workspace lints references/clippy-config.md
Performance Don't guess, measure. Profile with --release first references/performance.md
Generics Static dispatch by default, dynamic dispatch when you need mixed types references/generics-dispatch.md
Type State Encode state in the type system when invalid operations should be compile errors references/type-state-pattern.md
Documentation // for why, /// for what and how, //! for module/crate purpose references/documentation.md
Pointers Choose pointer types based on ownership needs and threading model references/pointer-types.md
API Design Unsurprising, flexible, obvious, constrained -- encode invariants in types references/api-design.md
Ecosystem Evaluate crates, pick error handling strategy, stay current references/ecosystem-patterns.md

Gates

Related skills

More from existential-birds/beagle

Installs
19
GitHub Stars
57
First Seen
Apr 9, 2026