agentleFS
octivioctivi/skills/git-commits/SKILL.md

git-commits

Skill1 starsChanged 5 months agoMITView on GitHub

Draft, rewrite, and review Git commit messages using Conventional Commits and commit hygiene rules. Use whenever the user asks for commit text, commit message fixes, type/scope selection, breaking-change notation, trailers (for example See or Co-authored-by), splitting work into atomic commits, or commit readiness before a PR, even if they ask in informal terms like "polish this commit message".

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. parcadei/Continuous-Claude-v3★ 3.9ksame name
    2. hodstack/hodstack★ 70same name
    3. DaleSeo/git-skills★ 1same name
    4. Klohto/agent-skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write clear, structured commit messages that explain what changed and why.

    line 8
  2. Distinctive:

    Use this table as the single source of truth.

    line 16
  3. Distinctive:

    Do not add explanatory prose unless the user explicitly asks for explanation.

    line 63
  4. Very specific:

    If fixes are needed, include Proposed message after findings.

    line 69
  5. Distinctive:

    If a user asks for a non-supported type, keep the intent but map to allowed types:

    line 73
  6. Very specific:

    When mapping is used in rewrite or review, explicitly state: Mapped requested type <x> to <y> to satisfy FMT-2.

    line 80
  7. Very specific:

    If requested type is unsupported, apply Unsupported type mapping.

    line 96
  8. Distinctive:

    Add body only when extra context is needed.

    line 99
  9. Very specific:

    Add footers/trailers (See:, Co-authored-by:, BREAKING CHANGE:) as needed.

    line 100
  10. Distinctive:

    Ensure final message is copy-paste ready for git commit.

    line 106
  11. Distinctive:

    Ensure unsupported type requests are mapped and explained when required by output mode.

    line 107

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “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

Git Commits

Write clear, structured commit messages that explain what changed and why.

Goal

Help readers and tools quickly understand commit intent, impact, and context.

Canonical rules table

Use this table as the single source of truth.

IDScopeRequirement
FMT-1Message shapeCommit message MUST follow: <type>[optional scope]: <subject>, optional body, optional footer(s), with blank lines between sections.
FMT-2Allowed typesType MUST be one of: feat, fix, docs, refactor, chore, revert.
FMT-3Header lengthHeader SHOULD be <= 50 chars and MUST be <= 72 chars.
FMT-4Subject styleSubject MUST be imperative/present tense and MUST NOT end with a period.
FMT-5Breaking changesIf the commit introduces a breaking API change, header MUST use ! and message MUST include BREAKING CHANGE: <description> with migration impact.
FMT-6ScopeScope is optional and SHOULD be used when it improves clarity.
FMT-7Unsupported type requestsIf the requested type is outside the allowed set, output MUST map to the closest allowed type. In rewrite and review modes, output MUST explicitly explain the mapping; in draft mode, explanation SHOULD be omitted unless the user asks for rationale.
FMT-8Non-subject line lengthEvery commit message line after the header SHOULD be <= 72 chars and MUST be <= 100 chars.
BODY-1Body usageBody is optional; when present it MUST explain motivation, context, and behavior change (not only implementation detail).
BODY-2Body formattingBody SHOULD wrap normal prose at ~72 chars per line to satisfy FMT-8; prefer shorter links or rewording over lines that would exceed 100 chars.
FTR-1Trailer formatFooters/trailers SHOULD follow Token: value (or Token #value) so they remain compatible with git interpret-trailers.
FTR-2Tracking linksUse See: trailers for tracker/docs/reference URLs; emit one URL per line.
FTR-3Co-authorsUse Co-authored-by: Name <email> trailers when multiple people co-authored the change.
REV-1Revertsrevert commits SHOULD repeat reverted header and body SHOULD include This reverts commit <hash>.
HYG-1AtomicityCommits SHOULD be small, logical, and atomic; avoid mixing unrelated changes.
HYG-2Whitespace changesSignificant whitespace-only changes SHOULD be in a separate commit.
HYG-3TestsIf code changes require test updates, include test updates in the same commit.

Semver intent by type

  • feat -> minor version intent
  • fix -> patch version intent
  • docs -> patch version intent
  • refactor -> no release bump intent
  • chore -> no release bump intent
  • revert -> depends on reverted change impact

Input model

<type>[optional scope]: <subject>

[optional body]

[optional footer(s)]

Output contract

Choose exactly one mode based on user intent:

  1. draft
    • Output only one final commit message, ready to paste into git commit.
    • Do not add explanatory prose unless the user explicitly asks for explanation.
  2. rewrite
    • Output one rewritten commit message first.
    • Then provide a short Why this is better list focused on violated rule IDs.
  3. review
    • Output Findings first, ordered by severity and linked to rule IDs.
    • If fixes are needed, include Proposed message after findings.

Unsupported type mapping

If a user asks for a non-supported type, keep the intent but map to allowed types:

  • feature -> feat
  • bugfix, hotfix -> fix
  • perf -> refactor
  • style, test, ci, build -> chore

When mapping is used in rewrite or review, explicitly state: Mapped requested type <x> to <y> to satisfy FMT-2.

Type compatibility with other skills

  • This skill enforces a strict output type set (feat, fix, docs, refactor, chore, revert) per FMT-2.
  • This restriction applies to messages authored/rewritten by this skill, not to historical commits that may already use broader Conventional Commit variants.
  • The common-changelog skill MAY ingest broader input types from history (perf, style, test, ci, build) and classify them for changelog purposes.

Authoring workflow

  1. Identify the smallest logical change set; recommend split commits if input is too broad.
  2. Choose type (and optional scope) by user impact.
  3. If requested type is unsupported, apply Unsupported type mapping. Explain mapping in rewrite/review; in draft, explain only when user asks for rationale.
  4. Draft concise imperative subject.
  5. Add body only when extra context is needed; explain why and behavior delta.
  6. Add footers/trailers (See:, Co-authored-by:, BREAKING CHANGE:) as needed.
  7. Run Quality checklist.

Quality checklist

  • Validate all applicable FMT-*, BODY-*, FTR-*, REV-*, and HYG-* rules.
  • Ensure final message is copy-paste ready for git commit.
  • Ensure unsupported type requests are mapped and explained when required by output mode.
  • For detailed conventions and more examples, verify against references/git-commit.md.

Prompt templates

  • Write a Conventional Commit message for these staged changes.
  • Rewrite this commit message to follow Conventional Commits and explain why your version is better.
  • Split this change into 2-3 atomic commits and propose a commit message for each.

References

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.