From claude-skill-commit-message
Generate a commit message following ~/.gitmessage template. Strict no-redundancy rules: each fact appears in exactly one section. Output only — never runs git commit. Use when user says "write commit message", "generate commit", "/commit-message".
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-skill-commit-message:commit-messageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a commit message following this template (loaded from `~/.gitmessage`):
Generate a commit message following this template (loaded from ~/.gitmessage):
!cat ~/.gitmessage
Run git diff --staged (and git status if needed) to understand the changes.
Default: produce a fenced code block containing the commit message. Nothing else — no preamble, no explanation.
Exception: when the multi-concern rule (see bottom) triggers, surface the split offer in prose first and await user response. Proceed to the code block only after the user decides.
git log.[PURPOSE], [IMPACT], detailed description) keep
articles — causal prose reads better with them.These verbs rarely carry information; they wrap a filler phrase. Name the actual action or effect instead.
Commit bodies render as plain text in git log, VS Code timeline, and default GitHub
commit views. Only pull-request bodies render markdown. Default output: plain text, no
backticks, no bold, no italics.
Use backticks only when a token would be ambiguous or unreadable without them:
"usage: cli ...", "module-not-measured"^(src|tests)/.*\.py$, *_test.pyDo not backtick: file paths, module names, CLI flags, config keys, shell commands, tool names, package names, function names. These read fine bare — pyproject.toml is obviously a filename; --pytest is obviously a flag; make type is obviously a command.
Visual separation carries at least as much signal as section headers.
[SECTION] header and after its last line.[PURPOSE] or gets dropped.[PURPOSE], [IMPACT], detailed description): max 2 sentences. Past 2
→ convert to bullets.Every sentence and bullet must add concrete information. Decision procedure: delete the phrase. If the sentence still carries the fact, the phrase was filler — keep it deleted. If nothing survives, the whole sentence was filler — drop it entirely.
Specific banned phrases (examples of the rule above, not exhaustive):
Match body size to decision surface, not diff size.
[CHANGES] plus [PURPOSE] when the why is
non-obvious.[IMPACT] only when users must act or behavior visibly changed.[CHANGES] bullets: 3-8 typical. Past 8 → commit probably too big (see multi-concern
rule).Body section order:
[CHANGES][PURPOSE][IMPACT][FILES ADDED] / [FILES REMOVED][DEPENDENCIES ADDED] / [DEPENDENCIES UPDATED] / [DEPENDENCIES REMOVED][REFERENCES]Closes, Refs, BREAKING CHANGE)Fill only sections that apply. Omit empty sections entirely (header included). Never
emit placeholder lines like - <list of files>. Strip all comment lines (lines starting
with #) from output.
type(scope): description.! goes before the colon, after the closing paren if scope is
present. With scope: type(scope)!: description. Without scope: type!: description.[PURPOSE] for the why.[CHANGES][DEPENDENCIES UPDATED].[DEPENDENCIES REMOVED] + [DEPENDENCIES ADDED], omit from [CHANGES] — put swap
rationale in [PURPOSE].[PURPOSE][IMPACT] — PURPOSE = why triggered, IMPACT = what changed for
users.[IMPACT][PURPOSE].[FILES ADDED] / [FILES REMOVED][FILES MODIFIED] is not used — git show --stat already reports modified files and
the section duplicates that signal.- path — role only when a file's contribution cannot
be inferred from [CHANGES] or header.[DEPENDENCIES ADDED] / [DEPENDENCIES UPDATED] / [DEPENDENCIES REMOVED]package.json, pyproject.toml,
poetry.lock, package-lock.json, .pre-commit-config.yaml rev bumps.- name: version (e.g. - ruff-pre-commit: v0.15.11)- name: old → new (e.g. - ruff: ^0.11.12 → ^0.15.11)- name: last-known-version (e.g. - pyupgrade: ^3.15)- plus X, Y, Z to latest for the
rest.[REFERENCES]Closes #n — one per line. Only when the commit actually closes the issue.Refs #n — one per line. For related issues mentioned but not closed.BREAKING CHANGE: description — only for actual breaking changes. Must pair with !
in header. Must be the final footer; anything after becomes part of the note.[CHANGES] does not also appear
in prose or [PURPOSE].[CHANGES] are mutually exclusive for the same info. Header fully
describes change → omit [CHANGES].[PURPOSE] and [IMPACT] must not mirror each other. Use both only when cause and
effect are genuinely distinct and both non-obvious.[PURPOSE] are mutually exclusive for the why. Use prose or
structured section, not both.[CHANGES] and [DEPENDENCIES *] are mutually exclusive for pure dep swaps —
dependency sections carry the swap; [CHANGES] carries rationale or config impact
only if any remains.[FILES *] role descriptions and [CHANGES] bullets are mutually exclusive — if a
file's role is already in [CHANGES], the file list stays bare.If [CHANGES] would contain 5+ bullets spanning 2+ distinct scopes, the commit is a
split candidate. Before generating, surface this to the user with a concrete offer:
5 bullets cross 2 scopes (pyproject, ci). Want me to write separate messages for each scope?
Proceed with the single-commit form only if the user declines the split.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub jekwwer/claude-skill-commit-message --plugin claude-skill-commit-message