agentleFS
shalombshalomb/agent-skills/skills/git-commit-formatter/SKILL.md

git-commit-formatter

Skill3 starsChanged 3 months agoMITView on GitHub

Structure and format Git commits under the Atomic Commit Protocol (ACP) — every commit self-contained, tested, documented, one logical change, in Conventional Commits format. Use whenever you are about to commit, or when ACP is mentioned and you need the rules or what the acronym means. This skill is the canonical definition of ACP. Triggers on: 'git commit', 'commit this', 'commit these changes', 'ACP', 'atomic commit', 'atomic commit protocol', 'conventional commits', 'what is ACP', 'commit message'.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 12 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    One Logical Change: Do NOT mix functional changes with refactoring or formatting.

    line 27
  2. Distinctive:

    Run the test suite and confirm it passes.

    line 30
  3. Very specific:

    Intentional Staging: Use git add <files> for specific paths.

    line 33
  4. Distinctive:

    MUST be 50 characters or less.

    line 51
  5. Distinctive:

    MUST be in the imperative mood (e.g., "Add feature", not "Added feature").

    line 52
  6. Distinctive:

    MUST NOT end with a period.

    line 54
  7. Distinctive:

    MUST be separated from the header by a single blank line.

    line 57
  8. Distinctive:

    MUST explain the reasoning and context behind the change (the "why"), rather than just repeating what the code does.

    line 58
  9. Distinctive:

    SHOULD wrap lines at 72 characters.

    line 59
  10. Very specific:

    SHOULD include an Impact: section and a Testing: section detailing how the code was verified (see Appendix B in the spec for an example).

    line 60
  11. Very specific:

    Do NOT add Signed-off-by or sign-off footers unless explicitly requested.

    line 64
  12. Distinctive:

    Do NOT include breaking-change markers or BREAKING CHANGE footers unless explicitly requested.

    line 65
  13. Distinctive:

    Do NOT push — only commit.

    line 66
  14. Distinctive:

    Review Diff: Run git diff --cached to catch accidental debug lines or unrelated changes.

    line 70
  15. Very specific:

    Verify Tests: Run tests (e.g., make test, pytest, npm test) and ensure the GREEN state.

    line 71
  16. Very specific:

    Match Conventions: Run git log -n 5 --pretty=format:%s to match existing project style.

    line 72
  17. Distinctive:

    Draft Message: Ensure it follows the ACP format and explains the "why".

    line 73

≈ “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 — Atomic Commit Protocol (ACP)

ACP = Atomic Commit Protocol. A specification for Git micro-commits: each commit is a complete, self-contained, logically indivisible unit of work — code, tests, and docs together, one logical change, never leaving the codebase inconsistent. Not to be confused with Agent Client Protocol, an unrelated Copilot CLI server mode.

You must adhere to the Atomic Commit Protocol (ACP) before making any git commit. The ACP guarantees that every commit is a complete, self-contained, and logically indivisible unit of work.

Core ACP Composition Rules

An Atomic Commit MUST contain the following elements. Do not commit until all conditions are met:

  1. One Logical Change: Do NOT mix functional changes with refactoring or formatting. Split unrelated changes into separate commits.
  2. Implementation & Verification:
    • You MUST include TDD tests that validate the implementation. At least one test MUST have failed prior to the implementation and pass afterward.
    • Run the test suite and confirm it passes. Never commit broken code.
  3. Documentation: You MUST include updates to end-user documentation or inline code comments that reflect the change and explain non-obvious logic.
  4. Cleanliness: You MUST remove all temporary files, build artifacts, debug statements (console.log, print), and leftover comments before committing.
  5. Intentional Staging: Use git add <files> for specific paths. Do NOT use git add . blindly.

For the full formal specification, including rationale and TDD mapping, read: references/acp-spec.md

Commit Message Format

<type>(<scope>): <Summary starting with Capital letter>

<Body explaining the "why", wrapped at 72 chars>

<Impact and Testing evidence>

1. The Header (Subject Line)

  • Type (Required): feat, fix, docs, refactor, chore, test, perf, style, ci
  • Scope (Optional): Short noun for the affected area (e.g., auth, api)
  • Summary (Required):
    • MUST be 50 characters or less.
    • MUST be in the imperative mood (e.g., "Add feature", not "Added feature").
    • SHOULD be Capitalized.
    • MUST NOT end with a period.

2. The Body

  • MUST be separated from the header by a single blank line.
  • MUST explain the reasoning and context behind the change (the "why"), rather than just repeating what the code does.
  • SHOULD wrap lines at 72 characters.
  • SHOULD include an Impact: section and a Testing: section detailing how the code was verified (see Appendix B in the spec for an example).

What NOT to Do

  • Do NOT add Signed-off-by or sign-off footers unless explicitly requested.
  • Do NOT include breaking-change markers or BREAKING CHANGE footers unless explicitly requested.
  • Do NOT push — only commit. The user decides when to push.

Steps Before Committing

  1. Review Diff: Run git diff --cached to catch accidental debug lines or unrelated changes.
  2. Verify Tests: Run tests (e.g., make test, pytest, npm test) and ensure the GREEN state.
  3. Match Conventions: Run git log -n 5 --pretty=format:%s to match existing project style.
  4. Draft Message: Ensure it follows the ACP format and explains the "why".
  5. Commit: Execute the commit. If the change spans multiple logical units, make separate, sequential atomic commits.

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.