agentleFS
michaelm7456michaelm7456/claude-skills/skills/commit-message-writer/SKILL.md

commit-message-writer

Skill0 starsChanged 4 months agoMITView on GitHub

Drafts a commit message from the currently staged diff, matching the repo's existing commit conventions. Use when the user asks to 'write a commit message', 'draft a commit message for this', or invokes /commit-message. Reads staged changes and recent git log to match style — never runs git commit or git add itself.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 2

    Distinctive

    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. Very specific:

    Check recent history (git log -10 --oneline) to detect the repo's convention — conventional-commit prefixes (feat:/fix:/chore:/docs:), …

    line 17
  2. Distinctive:

    If the staged diff spans clearly unrelated changes (touching separate features/modules with no shared purpose), flag it rather than …

    line 18
  3. Distinctive:

    Don't fabricate an issue/ticket reference — only include one if it's clearly relevant (mentioned by the user, or present in the branch …

    line 33

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

Purpose

Draft a commit message for changes the user has already staged, grounded in the actual diff and the repo's existing conventions, so writing the commit isn't a separate manual step.

Trigger

/commit-message, or phrasing like "write a commit message", "draft a commit message for this", "what should the commit message be". If nothing is staged, ask whether to use unstaged changes or which files to include — don't guess.

Gather

  1. Inspect what's staged: git diff --staged --stat and the full git diff --staged for substance, not just file names.
  2. Check recent history (git log -10 --oneline) to detect the repo's convention — conventional-commit prefixes (feat:/fix:/chore:/docs:), imperative vs. past tense, typical subject line length, whether body paragraphs are used at all.
  3. If the staged diff spans clearly unrelated changes (touching separate features/modules with no shared purpose), flag it rather than papering over it with a vague message — that's usually a sign the changes belong in separate commits.

Write

  • Subject line — imperative mood ("Add X", "Fix Y", not "Added"/"Adds"), matching the repo's length convention and prefix style if one is established.
  • Body — only if the change needs more than the subject to explain itself: a short paragraph or bullets on why, not a restatement of the diff. Skip it entirely for small, self-explanatory changes.

Voice

Plain and specific, weighted toward why over what — the diff already shows what changed. No "This commit does the following:" framing, no filler.

Ground rules

  • Drafts message text only — never runs git commit, git add, or any other git write operation.
  • Works from staged changes by default; only considers unstaged changes if the user explicitly asks.
  • Don't fabricate an issue/ticket reference — only include one if it's clearly relevant (mentioned by the user, or present in the branch name).

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.