sota-rustlisted
Install: claude install-skill martinholovsky/SOTA-skills
# SOTA Rust (2026)
## Purpose
This skill encodes the 2026 state of the art for production Rust: the idioms,
security posture, performance discipline, and CI baseline expected of an
expert Rust codebase. Baseline as of mid-2026: a recent stable Rust toolchain (verify the current
release at blog.rust-lang.org),
edition 2024 (next edition expected ~2027), tokio still 1.x. It serves two modes — **BUILD** (write new code to this
standard) and **AUDIT** (find where existing code falls short, with severity
and evidence). The detailed rules live in `rules/*.md`; load only the files
relevant to the task (see index below). Every rules file ends with an "Audit
checklist" of grep/clippy patterns — use those verbatim in AUDIT mode.
## BUILD mode
When writing or modifying Rust code:
1. **Scope the work, load the rules.** Pick the relevant `rules/` files from
the index. Touching async code? Load 04. Adding a dependency or parsing
network input? Load 05. Writing any `unsafe`? Load 03 — no exceptions.
2. **Design types first.** Newtypes for domain primitives, errors per
subsystem (thiserror for libs, anyhow for apps), ownership tree before
`Arc<Mutex<_>>`, public API minimal and borrowed (`&str`/`&[T]` params).
Parse, don't validate: constructors enforce invariants.
3. **Write to the non-negotiables** (bottom of this file) without being asked.
They are defaults, not suggestions; deviations carry a written
justification at the site (e.g. `expect` with invariant messag