rust-quality-gate
This protocol enforces a three-stage quality check for Rust code: format validation, clippy linting, and test execution, each halting on failure. It's designed for the trusty-tools monorepo and clarifies crate naming conventions, test output interpretation, and handling of pre-existing failures. Use it before any PR merge or when code changes are ready to commit.
rust-quality-gate runs format, lint, and test checks in sequence to validate Rust code before merging.
AI-generated summary based on this skill's SKILL.md
Install
bobmatnyc/claude-mpm-skills/rust-quality-gate · repository language: Python
git clone https://github.com/bobmatnyc/claude-mpm-skills
cp -r claude-mpm-skills/toolchains/rust/quality/rust-quality-gate ~/.claude/skills/rust-quality-gateFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is rust-quality-gate and when should I use it?
rust-quality-gate is a three-stage quality protocol for Rust code that runs format validation, clippy linting, and test execution in sequence, halting on any failure. Use it before merging code or when your changes are ready to commit. It's designed for the trusty-tools monorepo and ensures code meets formatting standards, passes linting checks, and has no broken tests.
How do I run cargo fmt clippy test in the right sequence?
rust-quality-gate enforces a strict three-gate sequence: first cargo fmt to validate formatting, then clippy for linting warnings, then cargo test for the full workspace test suite. Each stage halts on failure, preventing later stages from running. This ensures code quality gates are applied consistently before any merge.
Is my Rust code ready to merge with rust-quality-gate?
rust-quality-gate verifies your code is merge-ready by running all three quality checks: format compliance, clippy linting, and workspace-wide tests. If all stages pass without halting, your code meets the quality standards. The protocol also clarifies crate naming conventions and helps distinguish pre-existing test failures from new ones introduced by your changes.
How does rust-quality-gate validate shared library changes?
rust-quality-gate executes workspace-wide tests with proper crate scoping, which validates that changes to shared libraries don't break dependent crates. By running the full test suite across all crates in the trusty-tools monorepo, it catches integration issues that single-crate testing might miss.
Can rust-quality-gate distinguish pre-existing test failures?
rust-quality-gate provides guidance on triaging and distinguishing pre-existing test failures from new ones introduced by your code changes. This helps you identify whether a failure is caused by your modification or was already present, making it easier to focus on actual regressions during code review.
SKILL.md
rendered from the published skill — quoted content, verbatim
Rust Quality Gate Protocol
When to Invoke
Invoke this protocol when: - Any implementation task completes and code changes are ready to commit - User asks "check quality", "run tests", "run clippy", "is this ready", or
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 2 files
toolchains/rust/quality/rust-quality-gate/SKILL.md
toolchains/rust/quality/rust-quality-gate/metadata.json