rust-precommit Skill
Run the mandatory PET Rust pre-commit checks (cargo fmt + cargo clippy -D warnings) before every commit. Invoke whenever you are about to commit Rust changes, after applying review feedback, or whenever you need to verify formatting and lint cleanliness. Published by microsoft in python-environment-tools.
What is rust-precommit Skill?
Run the mandatory PET Rust pre-commit checks (cargo fmt + cargo clippy -D warnings) before every commit. Invoke whenever you are about to commit Rust changes, after applying review feedback, or whenever you need to verify formatting and lint cleanliness. Published by microsoft in python-environment-tools. This profile combines repository metadata with install, compatibility, and usage signals so developers can quickly decide whether it fits their agent workflow before opening the source repository.
Automated repository signals based on public metadata such as recency, license, installation evidence, and adoption. These are not a security audit or endorsement.
Key capabilities
- Includes SKILL.md support
- Reusable instructions support
- Developers using python-environment-tools
Technical details
- Install or run with Copy skill directory
When to use rust-precommit Skill
- Use it for developers using python-environment-tools.
Built with
Editorial notes
Source
- Creator: microsoft
- Repository: microsoft/python-environment-tools
- Skill file: .github/skills/rust-precommit/SKILL.md
What it does
Run the mandatory PET Rust pre-commit checks (cargo fmt + cargo clippy -D warnings) before every commit. Invoke whenever you are about to commit Rust changes, after applying review feedback, or whenever you need to verify formatting and lint cleanliness.
Skill instructions
Rust Pre-Commit Checks The PET maintainer workflow requires cargo fmt --all and cargo clippy --all -- -D warnings to pass before every commit. This skill wraps both into a single script invocation. When to use - Before staging any Rust changes for commit. - After fixing review comments on a PR, before pushing. - Whenever the agent is asked "run pre-commit checks" or "validate the Rust code". How to run From the workspace root: Windows (pwsh) powershell ./scripts/rust-precommit.ps1 macOS / Linux bash ./scripts/rust-precommit.sh Both scripts: 1. Run cargo fmt --all (auto-formats; fails only on unrecoverable errors). 2. Run cargo clippy --all -- -D warnings (treats warnings as errors). 3. Exit non-zero on the first failure so callers can gate commits. Handling failures - fmt failure: rare; usually a syntax error preventing parsing. Fix the underlying compile error first. - clippy failure: read the diagnostic, fix the code. Do not add [allow(...)] to suppress unless absolutely justified. -
Explore related resources
Frequently asked questions
What is rust-precommit?
rust-precommit is a open-source AI agent skill with Copy skill directory. Run the mandatory PET Rust pre-commit checks (cargo fmt + cargo clippy -D warnings) before every commit.
Who is rust-precommit best for?
rust-precommit is best for reusing agent instructions, scripts, and references.
How do I install rust-precommit?
Install or run rust-precommit using Copy skill directory. Check rust-precommit for the latest setup command.
Is rust-precommit actively maintained?
rust-precommit may need a closer maintenance check before production use.
Auto-fetched from GitHub.