agentleFS
mab-gomab-go/xmind-mcp/.agents/skills/commit-message/SKILL.md

commit-message

Skill9 starsChanged 22 days agoMITView on GitHub

Generates Git commit messages in the Chris Beams style from staged or unstaged diffs, with imperative subjects of 50 characters or fewer, a body that explains what and why, issue footers when applicable, and ASCII-only output. Use when invoked via /commit-message, or when the user asks for a commit message, help committing, or a summary of changes for a commit.

62 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use pr-description, changelog and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    pr-description

    Draft Nacelle PR titles, pull request descriptions, commit titles, commit descriptions, and squash commit messages. Use when asked for PR or commit wording, a branch summary, or a PR description that can be used in a commit. Omit validation sections from commit bodies and remove filler.

    Also in 9 projects that use this

  • HashiCorpSkill

    changelog

    Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 7 projects that use this

  • GoogleSkill

    grilling

    Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

    Also in 3 projects that use this

  • OpenAISkill

    brainstorming

    You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

    Also in 3 projects that use this

  • +2 more from google

The file

Show its rules and text

We split this skill into the rules it gives an agent

26 rules. 0 are common, 22 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 51 edited versions we read keep these.

  • 22

    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:

    Read the project's agent instructions (e.g.

    line 8
  2. Distinctive:

    Before generating a message:

    line 12
  3. Very specific:

    Check for failures: If the project has a build/test/lint workflow, confirm it passes or the user has acknowledged failures.

    line 14
  4. Distinctive:

    Determine scope: If both staged and unstaged changes exist, ask the user which set the message should cover.

    line 15
  5. Distinctive:

    If the project tracks generated files (lockfiles, generated code, schema dumps, generated docs), they are committed together with the …

    line 17
  6. Distinctive:

    If there are staged changes (git diff --staged): produce the message for the commit the user is about to make.

    line 22
  7. Distinctive:

    If nothing is staged but there are unstaged changes (git diff): produce a proposed message for those working tree changes.

    line 23
  8. Distinctive:

    If there are no local changes: ask whether to summarize the most recent commit (git show -1 --stat and git show -1 -p) for reference/amend …

    line 24
  9. Distinctive:

    If anything needed to infer intent is missing, ask before generating.

    line 30
  10. Distinctive:

    Use ASCII only in the commit message.

    line 34
  11. Very specific:

    Never use smart punctuation (e.g.

    line 35
  12. Distinctive:

    Keep it to 50 characters or fewer.

    line 52
  13. Distinctive:

    Must pass: prepend "If applied, this commit will " to the subject.

    line 53
  14. Distinctive:

    Omit: if the diff is truly trivial (e.g.

    line 70
  15. Distinctive:

    When a change alters what MCP clients see -- a tool's arguments, response fields, annotations, or error behavior -- say so, and say whether …

    line 73
  16. Distinctive:

    Write prose paragraphs separated by blank lines.

    line 74
  17. Very specific:

    Do not add labeled sections such as Features:, Changes:, or Fixes:.

    line 76
  18. Distinctive:

    Do not add Co-Authored-By, Signed-off-by, or other trailers unilaterally.

    line 82
  19. Distinctive:

    Place trailers after a blank line following the body (or subject if no body).

    line 83
  20. Distinctive:

    If no issue ID is provided, omit the footer entirely.

    line 91
  21. Distinctive:

    When a diff spans multiple unrelated concerns (e.g.

    line 95
  22. Distinctive:

    If the user wants one commit: Use the primary change as the subject.

    line 98
  23. Distinctive:

    Do not generate a message and then immediately run git commit unless the user explicitly asked you to commit.

    line 103
  24. Distinctive:

    Do not invent issue IDs or claim behavior changes not supported by the diff.

    line 104
  25. Distinctive:

    Do not add trailers (Co-Authored-By, etc.) unless explicitly requested.

    line 105
  26. Very specific:

    Run /verify-changes before generating a commit message to ensure the build passes.

    line 150

“Common” is measured: kept by at least 6 in 10 of the 51 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

Commit Message

Read the project's agent instructions (e.g. AGENTS.md), including any nested AGENTS.md in directories the change touches, before applying this skill. Project commit conventions override the defaults below.

Pre-flight

Before generating a message:

  1. Check for failures: If the project has a build/test/lint workflow, confirm it passes or the user has acknowledged failures. Do not generate a commit message for code that does not build.
  2. Determine scope: If both staged and unstaged changes exist, ask the user which set the message should cover. Do not silently choose.
  3. Check what belongs in the commit:
    • If the project tracks generated files (lockfiles, generated code, schema dumps, generated docs), they are committed together with the source change that produced them. Generated files the project ignores stay out.
    • Build output, coverage reports, local environment files, and secrets never belong in a commit. If any are in the diff, flag them before generating a message.

Input (in order of preference)

  1. If there are staged changes (git diff --staged): produce the message for the commit the user is about to make.
  2. If nothing is staged but there are unstaged changes (git diff): produce a proposed message for those working tree changes.
  3. If there are no local changes: ask whether to summarize the most recent commit (git show -1 --stat and git show -1 -p) for reference/amend use.

Output

  • Return the full commit message inside a single Markdown code fence.
  • This skill generates the message text only; it does not execute git commit. If the user explicitly says "commit this" or "make the commit," execute the commit with the generated message.
  • If anything needed to infer intent is missing, ask before generating.

Character policy

  • Use ASCII only in the commit message.
  • Never use smart punctuation (e.g. curly quotes, em dashes, the ellipsis character). Use straight apostrophe ('), straight quotes ("), hyphens (-), and three periods (...) only.
  • Self-check for non-ASCII before returning. Replace any with ASCII equivalents.

Required format

<Subject line>

<Body (optional)>

Closes #<ID> (only if an ID is provided)

Subject line

  • Imperative mood, capitalized, no trailing period.
  • No area: or type: prefix (e.g. api: ..., feat: ...) unless the project's conventions use one.
  • Keep it to 50 characters or fewer. Needing more usually means the subject is vague or the commit does too much (see Multi-concern diffs). 72 is the hard limit.
  • Must pass: prepend "If applied, this commit will " to the subject; the result must read as natural English and say what actually changes. "Improve the parser" passes the grammar test and says nothing.

Examples:

  • Add retry limit to export job
  • Fix off-by-one in pagination cursor
  • Update logging library to v2

Counterexamples (do not do this):

  • Added retry limit to export job (past tense)
  • fix pagination bug (not capitalized)
  • export: Add retry limit (area prefix, when the project does not use them)
  • Update logging library to v2. (trailing period)

Body (optional; what and why, not how)

  • Omit if the diff is truly trivial (e.g. typo, formatting, comment-only) and there is no meaningful motivation to record.
  • Wrap at 72 characters.
  • Explain what was wrong or missing, why this change fixes it, and any consequences a reader would not see in the diff (side effects, limitations, follow-up work). Leave how to the diff.
  • When a change alters what MCP clients see -- a tool's arguments, response fields, annotations, or error behavior -- say so, and say whether existing clients are affected.
  • Write prose paragraphs separated by blank lines. Do not restate the subject. Opening with "This commit ..." is fine when it reads naturally.
  • Bullets (-) are fine for a list of distinct reasons or effects. Never use them to list the edits file by file or step by step; the diff already shows that. Sub-bullets: indent 2 spaces. Wrapped continuation: 2 additional spaces.
  • Do not add labeled sections such as Features:, Changes:, or Fixes:. They turn the body into a changelog, and Fixes: can be mistaken for an issue trailer.
  • Reference files, modules, functions, or symbols in backticks when it helps the reader.
  • Quantify impact only when supported by the diff or context (e.g. lines removed, build time).

Trailers

  • Do not add Co-Authored-By, Signed-off-by, or other trailers unilaterally. Include only when the user or environment explicitly requests them.
  • Place trailers after a blank line following the body (or subject if no body).
  • Issue references are trailers too (e.g. Closes #123). They go at the bottom, never in the body.
  • ASCII-only rule applies to trailers.

Contextual logic

  • Infer the primary intent from the diff (e.g. "Extract helper", "Replace duplicated logic", "Standardize scripts").
  • Do not invent issue IDs, performance numbers, or behavior claims not evident from the diff or context.
  • If no issue ID is provided, omit the footer entirely.

Multi-concern diffs

When a diff spans multiple unrelated concerns (e.g. a refactor + a new feature + a typo fix):

  1. Flag it: Tell the user the diff contains distinct concerns and suggest splitting into separate commits.
  2. If the user wants one commit: Use the primary change as the subject. Give each secondary concern its own short paragraph in the body explaining what and why.
  3. If the user wants to split: Suggest which files or hunks belong to which commit.

Anti-patterns

  • Do not generate a message and then immediately run git commit unless the user explicitly asked you to commit.
  • Do not invent issue IDs or claim behavior changes not supported by the diff.
  • Do not add trailers (Co-Authored-By, etc.) unless explicitly requested.

Examples

Simple (no body):

Fix typo in README

With body:

Extract date parsing into shared helper

Three call sites parsed date strings with slightly different
rules, so the same input could be accepted in one place and
rejected in another. This commit moves parsing into one helper
so all callers behave the same way.

The helper uses the strictest of the existing rules. Inputs that
only the most lenient call site accepted, such as two-digit
years, are now rejected everywhere.

With bullets and an issue reference:

Add retry limit to export job

Failed exports were retried indefinitely, so a permanent error
kept a worker busy forever. This commit caps retries and marks
the job failed once the limit is reached.

This has two visible effects:

- A job that hits the limit now shows as failed instead of
  staying in progress forever
- Workers stuck on permanent errors are freed for other jobs

Closes #123

Related skills

  • Run /verify-changes before generating a commit message to ensure the build passes.

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.