/core:commit-messagefrom core
Drafts Conventional Commit messages from staged changes. Invoked when the user asks for a commit message or when you are about to propose one proactively.
Ships in core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Draft a Conventional Commit message from staged changes.
commit-message.
Skip the notice when the user asked for the skill by name or slash command; spelling and spacing need not match.
A phrase from this skill's own trigger list is not a name — naming the work is not naming the skill.--cached / staged SCM state) as input, unless the user invokes the Context Override or Commit Train path, or the repository uses Jujutsu (Jujutsu Change path).AI-assistant: <AGENT> footer.| Situation | Path |
|---|---|
| Staged changes exist and land as one commit | Workflow |
| The user points at prior conversation work or a working document instead of the diff ("use what we just did", "skip the diff") | Context Override |
| The work is meant to land as several commits | Commit Train |
The repository uses Jujutsu (jj root succeeds) and the message describes one or more jj changes | Jujutsu Change |
Body Discipline governs the body on all four.
These rules govern body content. Apply them at draft time (step 8) and re-check before output (step 10).
Your reader meets this commit in two phases: Scan mode — they see the subject in git log, git blame, or a bisect and decide whether to open it.
Read mode — once opened, they read the diff and the durable artifacts around it: the specs, design docs, ADRs, README, changelog, and docstrings present in the repo at this commit.
The subject carries scan mode — name the area and effect concretely enough to distinguish from neighbors.
The body exists only when read mode leaves a question unanswered. If no gap exists, ship subject-only — most commits. Conversation weight is not reader weight: what felt load-bearing in the dialogue is rarely what the diff fails to convey.
Triggers 2 through 6 fire only where read mode leaves the answer missing. A docstring, an error message, or a comment carried in the diff that already states the why closes the gap, and no body line survives on top of it. Orientation is the exception: it answers a reconstruction burden spread across files, which the diff's own prose does not relieve.
A body line is warranted only when it fires one of these 6 triggers:
A trigger licenses a line; it does not oblige one. Where no trigger fires, ship subject-only, as most commits should.
Otherwise the body gets one short paragraph per capability the change introduces, plus at most one more carrying everything the other five triggers earned between them. A short paragraph runs one to four wrapped lines, and most bodies come to one or two.
Count capabilities, not named surfaces: a command's own flags and subcommands belong to it, and surfaces that only make sense together are one capability. Where orientation still runs long, compress it to the capability level first; if it will not compress because the capabilities are unrelated, the commit is doing several things and wants splitting (see Commit Train).
When the other triggers overflow their single paragraph, the surplus rationale belongs in a design doc or spec. Keep whichever line a reader is most likely to be hurt by not knowing, and drop the rest.
Where the repo keeps specs, design docs, or ADRs, those artifacts are the versioned home for contracts and rationale, and the commit body is not. Route only to what an artifact carries now, in this change or already in the repo; a doc that has yet to be written is not a home.
Announcing that this change fires an obligation the spec defines is not a restatement of it. The spec states the rule; the commit reports that it just fired, and which value it landed on.
This does not suppress orientation. Shape is what a reader invokes and what comes back; contract is the terms that answer holds to, including its normative guarantees, thresholds, exhaustive conditions, and edge cases. Naming the shape orients a reader who has not opened the spec, while reproducing the contract duplicates it. On a borderline line, ask which document a reader would cite to settle a dispute about it — if that document is the spec, let the spec carry it.
For every body line you are about to write, name which of the 6 cold-reader triggers it fires. If you can't name one, don't write the line — it's conversation weight or file inventory, not reader signal. "It feels useful to mention" is not a trigger.
A fired trigger is necessary, not sufficient. Where the answer already lives in a durable artifact or in the diff's own prose, the line still doesn't survive: routing and the Cold-reader test both outrank the trigger that licensed it.
Select the path (see § Paths).
If jj root succeeds, the repository uses Jujutsu: take the Jujutsu Change path.
If it is not the standard path, follow that path instead of the rest of this workflow.
Resolve repository root.
Prefer workspace root when known; otherwise run git rev-parse --show-toplevel.
Retrieve staged changes with git -C <repo-root> diff --cached, or with the harness's SCM tooling where it offers one scoped to an explicit repo root.
A large diff can exceed one tool call's output limit, so check what you received against git -C <repo-root> diff --cached --stat and page through the remainder before drafting; a message written from the first page reads complete.
Validate staged content exists. If empty, retry once with explicit repo root; if still empty, inform user and stop.
Analyze the staged diff. Identify changed files, behavior impact, logical scope, and likely commit type.
Calibrate to the repo.
Read recent bodies for the changed paths (git -C <repo-root> log -5 --format='%B' -- <changed paths>) and match the house convention.
Calibration governs how much to write and in what shape; it can lower the Budget but never raise it.
Incorporate user arguments/context when provided. Preserve explicit issue refs and constraints from user input.
Apply the Cold-reader test, Budget, and Trigger-naming rule (see § Body Discipline) to decide whether the body is warranted and which lines to write.
Read references/conventional-commit-rules.md.
Then draft the message covering only the lines named in step 8, applying those rules.
Self-check before returning, in order:
Revise or drop any failing lines before output.
Return only the final message in a fenced code block, ready for git commit -F -.
Use this path when the user explicitly directs you to draft from prior conversation work or a working document rather than from the staged diff. Body Discipline applies here too — conversation-derived drafts are the highest-risk source for conversation weight.
Identify the source the user pointed to: prior turns in this conversation, a referenced todo list, a plan, a handoff note, or another working document.
Extract the scope, intent, and behavior changes from that source.
Do not run git diff or any other SCM inspection.
If the source is ambiguous or insufficient (no clear scope, type, or "what changed"), ask the user one targeted clarifying question or fall back to the standard workflow — do not invent details.
Apply the Cold-reader test, Budget, and Trigger-naming rule (see § Body Discipline) to decide whether the body is warranted and which lines to write.
Read references/conventional-commit-rules.md.
Then draft the message, preserving any explicit issue refs and constraints the user provided.
Self-check before returning, using the same ordered list as workflow step 10.
Return only the final message in a fenced code block, ready for git commit -F -.
Use this path when the work spans several logical commits and is not yet staged. The staged-changes constraint does not apply; each message is drafted from its own group's diff.
Group the changed paths by concern, one group per commit you intend to propose.
Calibrate once (workflow step 6) against the areas the train touches, and apply that calibration to every message.
Draft each message from its own group's diff (git -C <repo-root> diff -- <paths>), applying Body Discipline per message.
Budget applies per commit.
Present the whole train before anything is staged: the grouping, then the messages in commit order. Staging and committing remain the user's call.
Return each message in its own fenced code block, in commit order.
Use this path when jj root succeeds. jj has no staging area: in a colocated repo git's index mirrors the parent of the working copy, so git diff --cached is empty and the standard workflow would stop with nothing staged.
Each jj change is its own diff, so draft from the change itself.
Run jj with --no-pager --color=never.
Identify the change or changes to describe: a change ID or revset the caller gave, or @ when none was given.
For a stack, draft one message per change, oldest first.
Retrieve each change's diff with jj diff --git -r <rev>.
Check it against jj diff --stat -r <rev> and page through the remainder before drafting, as in workflow step 3.
An empty change gets no message; report it.
Calibrate to the repo.
Read recent descriptions for the changed paths with jj log -r '::<rev>-' -n 5 --no-graph -T 'description ++ "\n"' <changed paths> and match the house convention, as in workflow step 6.
Apply workflow steps 5, 7, 8, 9, and 10 to each change's diff. Budget applies per change.
Return each message in its own fenced code block, in stack order, each preceded by the change ID it describes.
The messages are ready for jj describe -r <rev> --stdin.
Applying them is the caller's step.
references/conventional-commit-rules.md - subject/body/footer rules and examples.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub ahgraber/skills --plugin core3 skills in this plugin
/receiving-feedbackYou MUST use this when receiving feedback that evaluates a text-based work artifact you produced or are responsible for — code, specs, design docs, PRDs, proposals, plans, or prose — by asserting a defect, questioning a decision, supplying reasoning, or proposing a change for assessment. Also use when asked to implement external review comments that must first be assessed. Not for an unambiguous parameter choice, approval, confirmation, typo or formatting fix, or direct revision instruction that supplies no claim or rationale to evaluate./subagent-patternsUse when dispatching development work to one or more subagents and deciding how to shape each dispatch. Triggers: "use subagents", "orchestrate subagents", "delegate to a cheaper/stronger model", "big:little" / "little:big", "verifier / adversary / explorer / oracle subagent", "run this with subagents", "get an independent second opinion". Not for: the parallel code-review procedure (use `code-review`), or driving a separate agent CLI non-interactively.