commit-message
Conventional Commits: reads the staged diff and proposes `type(scope): summary`, with body/footer when needed. One logical change = one commit…
by crewforth★ 26 GitHub stars
Install commit-message in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Commit Message (Conventional Commits v1.0.0)
Trigger phrases: "commit message", "make a commit", "conventional commit", "write a commit", "git commit"
Format: type(scope): summary + (optional blank line + body) + (optional footer).
The project decides the format and the language — read that FIRST
Conventional Commits below is the default, not a law. Before writing anything, read ./CLAUDE.md for a
## Conventions section (Commit language: / Commit format:). A declared format REPLACES the shape below —
ticket-prefixed subjects, smart-commit trailers (#comment, #time), gitmoji, whatever the team runs on. A
declared language replaces "the project's established language" guess. Nothing declared → read git log --oneline -20 first: a history with a shape of its own (another language, a ticket prefix, plain sentences) is the convention, and the message matches it. Only an empty or mixed history falls back to the defaults here.
Whatever the request hands you verbatim — a ticket id, a #time 1d, a required prefix — goes into the
message EXACTLY as given. Rewriting a literal someone typed is the worst failure this skill has: it looks
correct and books the wrong number. If a literal contradicts the format, say so and ask; never silently adjust
it. Same rule for the rest of the message: everything else is yours to word, the literals are not.
Type (required)
feat— new feature ·fix— bug fixdocs— docs only ·refactor— restructure with no behavior changeperf— performance ·test— add/fix testsbuild— build/dependency ·ci— CI configurationchore— maintenance/automated ·revert— revert a previous commitstyle— formatting (no logic)
Which type? (deciding when ambiguous)
- A new capability for the user? →
feat. Fixing an existing wrong behavior? →fix. - Behavior the same, only the structure changed? →
refactor(if behavior changed it'sfeat/fix, not refactor). - Touched only tests/docs/formatting? →
test/docs/style(don't touch code logic).
Scope (optional, preferred)
The affected area/module: auth, api, backend, db, frontend, session, agent, etc.
One word, consistent with the project's module name.
Summary line
- In the project's established language (English by default for open source), imperative/summary mood, start lowercase, NO period at the end, ≤ ~72 characters.
- Say what it does, not how; avoid vague words ("fix", "update", "wip").
✅
feat(auth): one-time code TTL + brute-force limit❌fix: bug· ❌update· ❌changes
Body (required for some changes, recommended for the rest)
After a blank line: the WHY (motivation) + notable consequences/tradeoffs. Wrap at ~72 characters. Leave context for the future reader who opens git-blame — the diff already shows the "what"; you write the "why".
- Required for a breaking change, a security fix, a data or schema migration and a revert (what was reverted, and why). Those are the commits someone reads under pressure later; a subject alone does not carry them.
- Cover every staged file, including changes this session did not make; for those, say only what the diff shows.
- Do not write a reason you were not given. A subject with no body beats an invented why.
- A discarded alternative worth remembering may go on its own line,
Rejected: <the option> (<why>), so a later session does not propose it again.
Footer (optional)
BREAKING CHANGE: <description>— a backward-incompatible breaking change (triggers SemVer MAJOR,releaseskill).Refs: #<issue>/Closes #<issue>.
Atomic commit — splitting a mixed diff
If a diff contains several logical changes, split it; don't cram it into one commit:
git add -p # pick hunk by hunk; stage related changes separately
git add <specific/file>
Each commit focused on a single topic; "feat + fix + refactor" doesn't belong in one commit.
The lines that describe a change belong to its commit: its CHANGELOG entry, its README line, its docs. They are part of the same logical change, not a second one, so stage them with it. A separate "docs: changelog" commit after the code is a second commit, and so a second approval (§4.4): the approval covers what is staged and HEAD at that moment, and a commit added later is not covered by it.
Good / bad
Worked good-vs-bad commit examples: references/examples.md.
Rules
- Atomic: one logical change = one commit.
- No commit without DoD: don't propose a message until
/simplify+ tests green +sonarqube-checkper the DoD quality line (## Stack→Quality analysis:) pass. - If there is no staged diff, warn; ask the user about the
git addscope with explicit options. - Don't run
git commitsilently; propose the message, wait for approval.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- references/examples.md
FAQ
What does the commit-message skill do?
Conventional Commits: reads the staged diff and proposes `type(scope): summary`, with body/footer when needed. One logical change = one commit. crew-commit-agent applies it.
How do I install the commit-message skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the commit-message skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…