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:

  1. Cargo.toml (root and per-crate) / Cargo.lock — edition, MSRV (rust-version), workspace members, feature flags, existing [lints] table.
  2. rust-toolchain.toml / rust-toolchain — pinned compiler version, components (clippy, rustfmt, llvm-tools-preview), targets.
  3. Existing config files: clippy.toml, rustfmt.toml / .rustfmt.toml, deny.toml, .cargo/config.toml, .cargo/audit.toml, .pre-commit-config.yaml, any scripts/check*.sh / scripts/lint*.sh / justfile / Makefile targets (make check, just lint, make ci).
  4. CLAUDE.md / AGENTS.md — canonical commands already documented.
  5. Source layout: top-level src/, crates/, examples/, tests/, benches/, workspace members in [workspace.members], build.rs scripts, generated files (OUT_DIR, tonic-build, prost-build).
  6. Native / FFI deps — look for build.rs, *-sys crates, bindgen, cc, cxx, or [target.'cfg(...)'.dependencies]; these change how every gate must be invoked (system libs, target triple, cross-compilation).

Features and target-cfg — detect once, use everywhere

Installs
1
GitHub Stars
1
First Seen
Jul 9, 2026
rust-quality-gates — tomevault-io/skills-registry