Maintain repository quality by auditing commit hygiene and working tree state.

Install

mkdir -p .claude/skills/git-rules && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11687" && unzip -o skill.zip -d .claude/skills/git-rules && rm skill.zip

Installs to .claude/skills/git-rules

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Run after each commit to check commit hygiene, diff sanity, and whether the working tree is unexpectedly dirty.
111 charsno explicit “when” trigger
Beginner

Key capabilities

  • Verify new commit is inspectable and scoped
  • Check for whitespace or patch-shape issues in diffs
  • Check if the working tree is unexpectedly dirty after commit
  • Remind user to push only intentional changes

How it works

This skill runs a series of checks after each Git commit to ensure consistency in commit hygiene, diff quality, and the state of the working tree.

Inputs & outputs

You give it
A Git commit action
You get back
Feedback on commit hygiene, diff sanity, and working tree cleanliness

When to use git-rules

  • Verify commit hygiene
  • Check for whitespace issues in diffs
  • Ensure the working tree is clean
  • Audit post-commit repository state

About this skill

Git Rules Skill

Use this skill after every commit.

Purpose:

  • keep commit hygiene consistent
  • catch post-commit repository drift
  • make sure a commit leaves the repo in a reviewable state

Checks:

  • verify the new commit is inspectable and scoped
  • check for whitespace or patch-shape issues
  • check whether the working tree is unexpectedly dirty after commit
  • remind the user to push only intentional changes

This skill is lightweight and should run on every commit.

When not to use it

  • When the task is not related to post-commit checks
  • When the user intends to have a dirty working tree

Limitations

  • Only runs after a commit
  • Does not prevent commits with issues, only reports them

How it compares

This skill automates post-commit validation, providing immediate feedback on repository state and commit quality, rather than relying on manual review or later CI checks.

Compared to similar skills

git-rules side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
git-rules (this skill)05moReviewBeginner
resolve-conflicts818moReviewIntermediate
dependency-upgrade265moReviewIntermediate
git-commits214moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry