microsoft/python-environment-tools/rust-precommit

Claude Code and agent skill by microsoft/python-environment-tools

Trust tier 4
  • vendor
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

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.

Install

npx vskill@latest install microsoft/python-environment-tools/rust-precommit

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as microsoft/python-environment-tools/rust-precommit.

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.
  • After any fix, re-run the script until it reports ALL PRE-COMMIT CHECKS PASSED.

Notes

  • The script must be run from the repository root (or pass the workspace path as the first arg to the .sh variant / -WorkspacePath to the .ps1 variant).
  • Keep the script in sync with .github/copilot-instructions.md "Required Before Committing" section.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 29 Jun 2026.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
208
Repository forks
41
7-day trend score
27

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill CERTIFIED badge
[![vskill CERTIFIED](https://verified-skill.com/api/v1/skills/microsoft/python-environment-tools/rust-precommit/badge)](https://verified-skill.com/skills/microsoft/python-environment-tools/rust-precommit)

Something wrong with this skill or its page? Tell us.