agentleFS
jggomezjggomez/expert-ai-developer-skills/skills/commit-expert/SKILL.md

commit-expert

Skill28 starsChanged 3 months agoApache-2.0View on GitHub

Guidelines, best practices, and script validators to verify commit message formats and configure local git commit hooks.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT end the subject line with a period.

    line 29
  2. Distinctive:

    Use the imperative mood (*"Fix billing typo"* instead of *"Fixed billing typo"* or *"Fixes billing typo"*).

    line 30
  3. Very specific:

    Use interactive rebase (git rebase -i HEAD~N) to squash intermediate "wip" or fixup commits before pushing.

    line 38
  4. Distinctive:

    Antigravity: Ensure that every commit created during the COMMIT phase of Loop Engineering complies with Conventional Commits.

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Commit Expert Skill

Overview

This skill enforces high-quality, readable, and bisectable Git commit histories. It acts as a Git Version Control Specialist and History Architect, ensuring that all commits follow the 7 rules of git messaging, utilize standard Conventional Commits prefixes, maintain atomic boundaries, and validate formatting through automated hook scripts.

When to Use

Trigger Scenarios

  • Authoring commit messages for staged code changes.
  • Setting up or validating local git commit-msg hooks.
  • Squashing, interactive rebasing, or cleaning up messy commit histories before PR submission.
  • Enforcing Conventional Commits standards across an engineering team.

When NOT to Use

  • Authoring Pull Request descriptions or branch reviews: Route to pull-request-expert.
  • Pre-commit quality and linting checks: Route to build-and-ci-gates.
  • Writing application source code: Route to code-implementer.

Process

Phase 1: Conventional Commits Message Formulation

Structure every commit message following the 7 rules of git commit messages:

  1. Subject Line:
    • Format: <type>(<scope>): <imperative summary> (e.g. feat(auth): add refresh token endpoint).
    • Limit subject to 50 characters maximum.
    • Do NOT end the subject line with a period.
    • Use the imperative mood ("Fix billing typo" instead of "Fixed billing typo" or "Fixes billing typo").
  2. Body (when context is required):
    • Separate subject from body with a single blank line.
    • Wrap body lines at 72 characters.
    • Explain what and why, not how.

Phase 2: Atomic Staging & Clean History

  1. Stage only logically cohesive changes in a single commit (one feature, fix, or refactor per commit).
  2. Use interactive rebase (git rebase -i HEAD~N) to squash intermediate "wip" or fixup commits before pushing.

Phase 3: Automated Validation

Validate the commit message format using the automated validator script:

python3 ./skills/commit-expert/scripts/validate_commit_msg.py .git/COMMIT_EDITMSG

Usage

Commands & Automation Scripts

# Validate a specific commit message file or git edit message
python3 ./skills/commit-expert/scripts/validate_commit_msg.py .git/COMMIT_EDITMSG

Example Prompts

  • "Format a Conventional Commit message for these staged authentication changes."
  • "Audit the recent 5 commit messages on this branch against the 7 rules of git."
  • "Help me set up a local commit-msg git hook to block non-conventional commit messages."

Host Execution Instructions

  • Claude Code: Validate commit message files before running git commit.
  • Antigravity: Ensure that every commit created during the COMMIT phase of Loop Engineering complies with Conventional Commits.

Red Flags

  • Vague commit subjects like "fixes", "updates", "wip", or "changes".
  • Exceeding 50 characters on the subject line or ending with a trailing period.
  • Blending multiple unrelated tasks (e.g. a bug fix and an unrelated refactor) into one giant commit.
  • Using past tense ("added feature") instead of imperative mood ("add feature").

Verification

  • Commit message conforms to <type>(<scope>): <summary>.
  • Subject is under 50 characters, uses imperative mood, and has no period.
  • Blank line separates subject and body.
  • Automated validation script passes:
    python3 ./skills/commit-expert/scripts/validate_commit_msg.py .git/COMMIT_EDITMSG

References

  • Git Commit Best Practices & Guidelines
  • Configuring Git Hooks for Commit Quality

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.