rust-quality-gates
Installation
SKILL.md
Rust Quality Gates Setup
Set up a quality gate system for a Rust project. The prescribed checker command is prek run --all-files. The deliverables are a .pre-commit-config.yaml that points prek at a check.sh orchestrator, a clippy.toml / rustfmt.toml pair (plus a [lints] table in Cargo.toml), and any extra tool configs (deny.toml, cargo-machete ignore lists) — wired to the repo's actual workspace layout and feature matrix. For larger repos, Step 12 describes the upgrades that production setups use.
Step 1: Assess the repo before touching anything
Before writing or installing anything, understand the repo. Two outcomes are possible: a mature system already exists (stop and defer — Step 2), or it doesn't (proceed from Step 3).
Gather in parallel:
Cargo.toml(root and per-crate) /Cargo.lock— edition, MSRV (rust-version), workspace members, feature flags, existing[lints]table.rust-toolchain.toml/rust-toolchain— pinned compiler version, components (clippy,rustfmt,llvm-tools-preview), targets.- Existing config files:
clippy.toml,rustfmt.toml/.rustfmt.toml,deny.toml,.cargo/config.toml,.cargo/audit.toml,.pre-commit-config.yaml, anyscripts/check*.sh/scripts/lint*.sh/justfile/Makefiletargets (make check,just lint,make ci). CLAUDE.md/AGENTS.md— canonical commands already documented.- Source layout: top-level
src/,crates/,examples/,tests/,benches/, workspace members in[workspace.members],build.rsscripts, generated files (OUT_DIR,tonic-build,prost-build). - Native / FFI deps — look for
build.rs,*-syscrates,bindgen,cc,cxx, or[target.'cfg(...)'.dependencies]; these change how every gate must be invoked (system libs, target triple, cross-compilation).