commit

Run cargo fmt, clippy, and tests before committing and pushing Rust code.

77|10|Updated Feb 1, 2025
One-click install
npx skills add https://github.com/ahtavarasmus/lightfriend --skill commit-ahtavarasmus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit
Source: https://github.com/ahtavarasmus/lightfriend/tree/main/.claude/skills/commit
Command: npx skills add https://github.com/ahtavarasmus/lightfriend --skill commit-ahtavarasmus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validate code quality before committing by running all checks, then commits and pushes.

Core Features & Use Cases

  • Automated quality gate: runs cargo fmt --check, cargo clippy, and cargo test to ensure formatting, linting, and tests pass.
  • Deterministic commit workflow: checks git status, stages changes, and prompts for a commit message.
  • Safe push & rollback: pushes to the remote only after successful checks, with clear failure messaging.

Quick Start

Initiate the commit workflow by following the prompts to format, lint, test, stage, commit, and push.

Frequently Asked Questions about commit

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

FAQPage Schema
How do I run cargo fmt, clippy, and tests before a git commit in Rust?

To validate code quality before committing in Rust, this workflow runs cargo fmt --check, cargo clippy, and cargo test as automated quality gates. It ensures formatting, linting, and tests pass before staging changes with git add and pushing to the remote.

What is a deterministic commit workflow for Rust projects?

A deterministic commit workflow for Rust projects enforces strict code quality by running cargo fmt, clippy, and test checks. It then checks git status, stages changes, prompts for a commit message, and safely pushes only after all checks pass successfully.

Can I use this commit workflow in CI pipelines for Rust?

Yes, this commit workflow is applicable to CI-style workflows for Rust projects requiring deterministic commit hygiene. It safely pushes to the remote only after successful checks, providing clear failure messaging and rollback handling for CI environments.

What happens if cargo clippy or cargo test fails during the commit process?

If cargo clippy or cargo test fails during the commit process, the workflow halts and prevents the git push. It provides clear failure messaging and guardrails to ensure no unverified code is committed or pushed to the remote repository.

Do I need to manually stage files before running this git commit workflow?

No, you do not need to manually stage files. The workflow checks git status and automatically stages changes with git add after formatting, linting, and tests pass, then prompts you for a commit message before pushing.