skills/commit-message/SKILL.md
Use whenever a Conventional Commit message is being drafted — whether the user asks ("write commit message", "draft commit from staged changes", "generate conventional commit", "message for git commit -F -") or you are about to propose one proactively after finishing work (e.g. completing tasks, wrapping up a feature, or summarizing staged changes). Invoke before writing the message inline. Not for creating commits, amending history, or full code review.
npx skillsauth add ahgraber/skills commit-messageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Draft a Conventional Commit message from staged changes.
commit-message.--cached / staged SCM state) as input, unless the user invokes the Context Override path.AI-assistant: <AGENT> footer.These rules govern body content. Apply them at draft time (step 7) and re-check before output (step 9).
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 to understand what changed.
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.
The diff shows what changed and where, but not why or how to act on it. A body line is warranted only when it fires one of these 5 triggers:
For every body line you are about to write, name which of the 5 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.
Could the subject alone carry this commit? Drop the body entirely. Does any body line restate the subject? Drop it.
Check for a context override. If the user directs you to draft from prior conversation work or a working document (e.g. "use what we just did", "based on the todo list above", "from our discussion", "skip the diff"), follow the Context Override path below 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.
Prefer get_changed_files with repositoryPath: <repo-root> and staged state.
If that tool is unavailable, use SCM tooling with explicit repo context.
If SCM tooling is unavailable, use git -C <repo-root> diff --cached.
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.
Incorporate user arguments/context when provided. Preserve explicit issue refs and constraints from user input.
Apply the Cold-reader test 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 7, 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, get_changed_files, 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 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, in order:
Return only the final message in a fenced code block, ready for git commit -F -.
references/conventional-commit-rules.md - subject/body/footer rules and examples.development
Use when the user wants rigorous, non-sycophantic editorial feedback on a draft, essay, blog post, or argument through back-and-forth dialogue — pressure-testing thesis, structure, argument, clarity, tone, and evidence. Triggers: "be my sparring partner", "pressure-test this draft", "poke holes in my argument", "is this ready to publish", "sharpen this post", "where is this weak". Not for one-shot copyediting, proofreading, or ghostwriting.
testing
Use when distilling the through-line gist of one or more sources — the spine, argument, tension, or recurring frame running through a set of documents, notes, research, or transcripts, OR across the ideas within a single rich piece — into a few concise paragraphs. Triggers: "synthesize", "what's the through-line/gist", "extract the insight", "pull these together". Not for faithful summary or condensation that covers what a source says, nor for comparisons or catalogs where enumeration is the deliverable.
development
Use when writing or reviewing tests in any language, or diagnosing a suite that is slow, brittle, or hard to read. Triggers: "write tests", "how should I test this", "what kind of test", "test is flaky/fragile", "should I mock this", "test is hard to read". For Python-specific guidance see `python-testing`.
development
Use when writing, debugging, or explaining Strudel live-coding music patterns — mini-notation syntax, pattern functions (fast/slow/every/off/stack), synth/sample selection, audio effects, scale/chord/voicing API, or EDM production recipes. Triggers: "write a Strudel pattern", "how do I make a bassline in Strudel", "what does .every() do", "strudel drum beat", "strudel chord voicing", any Strudel code question.