rust-guidelineslisted
Install: claude install-skill stevencarpenter/agents
# Rust Guidelines
Use this as the shared Rust language rubric for agents. Prefer repo-local conventions when they are deliberate and documented, but push back when they produce unidiomatic, fragile, or unsound Rust.
## Source Of Truth
- Rust API Guidelines: https://rust-lang.github.io/api-guidelines/checklist.html
- Microsoft Pragmatic Rust Guidelines: https://microsoft.github.io/rust-guidelines/
- Microsoft agent-ready Rust guidance: https://microsoft.github.io/rust-guidelines/agents/all.txt
- Async Rust Book: https://rust-lang.github.io/async-book/
The Microsoft `rust-guidelines` repository is MIT licensed. This repo summarizes and links to those guidelines rather than vendoring `all.txt` for now.
## Core Rubric
- Prefer strong domain types, newtypes, enums, and validated constructors over primitive obsession.
- Prefer borrowed inputs such as `&str`, `&[T]`, and `impl AsRef<Path>` when ownership is unnecessary.
- Keep ownership transfer explicit. Do not clone `String`, `Vec`, `Arc`, or large values without a reason.
- Use concrete types and generics before `dyn` unless dynamic dispatch is intentional.
- Avoid vague Java-style names such as `Manager`, `Service`, `Factory`, and `Util` when a domain name exists.
- Public APIs should be hard to misuse: clear argument types, builders for genuinely complex construction, and additive feature design.
- Public types should implement `Debug` where useful and expose canonical docs or examples for nontrivial APIs.
- Libraries sho