rust-commit

Run cargo fmt, clippy, tests, and doc checks before committing Rust changes.

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/maxenko/claude-skills --skill rust-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-commit
Source: https://github.com/maxenko/claude-skills/tree/main/rust-commit
Command: npx skills add https://github.com/maxenko/claude-skills --skill rust-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines the Rust development workflow by ensuring any commit is CI-ready: formatting, linting, tests, and documentation checks run automatically to prevent broken builds.

Core Features & Use Cases

  • Format: applies cargo fmt across the project and verifies formatting before commit.
  • Lint: runs cargo clippy fixes, then confirms zero warnings for a clean codebase.
  • Test & Docs: executes cargo test and cargo doc to ensure correctness and docs integrity.
  • Commit: creates a focused, surgical commit containing only the changes related to the Rust work.

Quick Start

Run rust-commit with your commit message to ensure CI green, formatting, clippy, tests, and docs pass before committing.

Frequently Asked Questions about rust-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make sure my Rust code passes CI before committing?

To ensure Rust code passes CI before committing, you can automate formatting, clippy lint checks, tests, and documentation verification in sequential phases to prevent broken builds.

What is the best way to automate cargo fmt and clippy fixes before a git commit?

Automating cargo fmt and clippy fixes before a git commit applies formatting and lint corrections across the project, then verifies zero warnings to maintain a clean Rust codebase.

Does rust-commit work with standard Cargo commands like cargo test and cargo doc?

Yes, rust-commit works with standard Cargo commands by executing cargo test and cargo doc during its automated phase-based process to guarantee code correctness and documentation integrity.

How do I create a surgical git commit containing only my Rust changes?

Creating a surgical git commit with only your Rust changes requires running automated checks that filter formatting and lint fixes, ensuring the final commit contains solely your specific work.

Why does my Rust build break in CI after passing locally?

Rust builds break in CI after passing locally when formatting, clippy warnings, or documentation errors are missed, which automated pre-commit checks can resolve by enforcing phase-based validation.

When do I need to run automated Rust documentation checks before committing?

You need to run automated Rust documentation checks before committing when preparing changes for CI, executing cargo doc to ensure docs integrity and prevent broken builds from missing or faulty documentation.