# Rust Pre Commit

> Run the Weave quality gate (cargo fmt, clippy, tests) before committing. Use when you want to verify the working tree is clean and CI-ready.

- Skill: `breferrari/rust-pre-commit` (Agent Skill)
- Install (CLI): `npx skillmds@latest add breferrari/rust-pre-commit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/breferrari/rust-pre-commit/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: breferrari (https://skillmd.com/u/breferrari)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/breferrari/rust-pre-commit

---


## Weave pre-commit quality gate

Run the three checks in order. Stop and report on the first failure — do not proceed to the next step if one fails.

1. `cargo fmt --all` — formats all code in place; then run `git diff --name-only` to list any files that were changed and need to be staged before committing
2. `cargo clippy -- -D warnings` — lint, deny all warnings
3. `cargo test` — run all unit + integration + E2E tests

Report clearly:
- Which checks passed ✓
- Which failed ✗ and what output was produced
- What the developer needs to fix before committing

