commit-messages
Skill44 starsChanged 4 months agoMITView on GitHub
Write git commit messages in a narrative, reasoning-focused style. Use when creating commits, drafting commit messages, or when the user asks for help writing a commit message.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- lambdakilo/dotclaudetheir own version, first seen Nov 1, 2026
- geronco/commandvault-librarytheir own version, first seen Oct 13, 2026
- glennawatson/CSharpAgentSkillstheir own version, first seen Oct 1, 2026
- fworks-tech/agenthoodtheir own version, first seen Sep 28, 2026
- yoonation/ai-groundedtheir own version, first seen Jul 22, 2026
- lobomfz/skillstheir own version, first seen Apr 28, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- yoonation/ai-grounded★ 4same name
- fworks-tech/agenthood★ 3same name
- lambdakilo/dotclaude★ 3same name
- glennawatson/CSharpAgentSkills★ 2same name
- lobomfz/skills★ 2same name
- geronco/commandvault-library★ 1same name
- jarosser06/drift★ 1same name
- israel7852/claude-code-mastery★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- defragSkill
- diff-explainerSkill
- hierarchical-documentationSkill
- method-reviewSkill
- pentestSkill
- retroSkill
- structural-reviewSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 15 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
15
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Write commit messages that tell the story of *why* a change was made, not just what changed.
- Distinctive: line 41
Follow this structure (skip sections that aren't relevant for small changes):
- Distinctive: line 70
Living with this change: When a change introduces a new constraint, convention, or tool, include practical guidance for developers who'll …
- Distinctive: line 96
Only reference durable artifacts — planning documents, conversation context, and internal phase labels (e.g.
- Distinctive: line 99
Existing conventions: When the change follows an existing codebase pattern, name it ("following the pattern used by similar validation …
- Distinctive: line 103
Principles/constraints: Before describing a solution, state the constraints that guided it as a numbered list.
- Distinctive: line 113
Security implications: Call out security improvements even when they're a side effect.
- Distinctive: line 120
ENV variables: When introducing new environment variables, list them explicitly.
- Distinctive: line 209
Add nullable column / feature-flagged code (safe to deploy anytime)
- Distinctive: line 219
When fixing bugs introduced by earlier commits, tell the chain story:
- Distinctive: line 242
When asked to commit:
- Distinctive: line 244
Read the diff carefully.
- Distinctive: line 247
Write body following the narrative arc.
- Distinctive: line 248
Add enrichment (cross-refs, diagrams, benchmarks) where it helps.
- Distinctive: line 249
Verify line wrapping at 72 characters.
“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.
Files
Commit Messages
Write commit messages that tell the story of why a change was made, not just what changed. The reader should come away understanding the context, the decision, and the trade-offs.
Subject Line
Format: [TICKET-123] Imperative verb phrase (#PR) when a ticket exists,
or just Imperative verb phrase for small fixes/tooling.
- Imperative mood: "Add", "Fix", "Remove", "Prevent", "Handle" -- never past tense.
- No conventional-commits prefixes: No
feat:,fix:,chore:. - 50 chars max Drop words the context already implies -- e.g. "Add NOT NULL on" beats "Add NOT NULL constraint on" because "NOT NULL" already means constraint.
- PR number in parens at the end if it's a squash merge.
Examples:
[PROJ-123] Show contact subscriptions in CSVFix flaky cypress testRemove unused field from API payload (#123)
Body
Separate from subject with a blank line. Wrap at 72 characters. Use backticks for code references (class names, method names, constants) in the body.
Narrative Arc
Follow this structure (skip sections that aren't relevant for small changes):
- Context / current state: What the world looks like before this change. Ground the reader.
- Problem or motivation: What's wrong, missing, or desired. Name the specific concept or mechanism behind the problem rather than describing it loosely. "Not enforced at the DB level" is better than "the database didn't match" because it tells the reader exactly what kind of gap exists. Go further and name the real-world trigger -- the actors, behaviors, or patterns that made this change necessary now. "Customers hit this on every page reload" is stronger than "the cache can go stale" because it names who's affected and why it's urgent.
- Solution: The approach or strategy, not a play-by-play of the diff. Describe the shape of the change rather than enumerating files or functions. Use "This commit..." to demarcate from background.
- Design reasoning: Why this approach. State constraints or principles, discuss alternatives considered. Connect facts to the specific concerns they address -- "the table is small" is an assertion; "the table is small enough that the lock will be near-instant" is reasoning. The reader shouldn't have to infer why a fact matters.
- Scope boundaries: What's explicitly not included. Use phrases like "out of scope for this change" or "a follow-up will..."
- Incidental discoveries: Anything found along the way. "While digging into this, I discovered..."
- Future work: What should happen next, if anything.
- Living with this change: When a change introduces a new constraint, convention, or tool, include practical guidance for developers who'll encounter it. What should they do when it gets in their way? When is it appropriate to override or work around it? This is distinct from future work -- it's a playbook for coexisting with the change.
Voice and Tone
- First person: "I chose to", "I considered", "My philosophy was". The author is present in the narrative.
- Conversational but precise: Reads like explaining the change to a colleague over coffee, not like formal documentation.
- Length tracks reasoning, not diff size: A complex redesign gets section headers, diagrams, and benchmarks. But a subtle one-line bug fix that took days to hunt down can also warrant a page-long explanation tracing the investigation. Write as much as the reasoning demands, regardless of how many lines changed.
Enrichment (use when relevant)
- Section headers: For long messages, use markdown-style headers
(
Performance,Security,Notable choices, etc.) with underlines or blank-line separation. - Cross-references: Cite commit SHAs, PR numbers, Sentry links, or documentation URLs. The reader should be able to trace anything. Only reference durable artifacts — planning documents, conversation context, and internal phase labels (e.g. "Phase 1") don't survive into git history.
- Existing conventions: When the change follows an existing codebase pattern, name it ("following the pattern used by similar validation rules"). This orients the reader without requiring them to read other files.
- Principles/constraints: Before describing a solution, state the constraints that guided it as a numbered list.
- Alternatives considered: "I considered X but it broke constraint Y. Eventually I settled on Z."
- Code snippets / payload shapes: Include when they clarify the change (JSON shapes, SQL, small code examples).
- Mermaid diagrams: For complex control flow, show before/after as flowcharts or state diagrams.
- Performance data: Include benchmarks or query plan comparisons when the change has performance implications.
- Security implications: Call out security improvements even when they're a side effect.
- Deployment safety: Note whether the change is safe to deploy at any time, requires ordering, or is behind a feature flag. "This change was written to be safe to deploy any time."
- Verification: Describe how you confirmed the change works. "I verified this by...", "I was able to reproduce the error using..."
- ENV variables: When introducing new environment variables, list them explicitly.
- State combinatorics: For UI work, document the space of possible states (e.g. with TypeScript ADTs or a count of combinations).
Recurring Phrases and Conventions
These signal phrases appear naturally and serve specific roles:
- "This commit..." -- demarcates what the diff does vs. background.
- "Note that..." -- adds caveats the reader should be aware of.
- "While digging into this, I discovered..." -- incidental findings.
- "out of scope for this change" -- explicit scope boundary.
- "I've already spent my refactoring budget" -- scope discipline.
- "This is purely a refactor" or "pure refactor (ish)" -- declares no behavior change, sometimes with noted small exceptions.
- "A follow-up will..." -- promises future work without blocking now.
- "Longer-term, we probably want to..." -- non-blocking future vision.
Examples
Small fix
Fix ExampleService class typo
While browsing the code I discovered a typo in the ExampleService API. A
constant was written as `Inte::ExampleService` rather than
`Integrations::ExampleService`.Bug fix
[PROJ-456] Fix flaky contact search spec (#234)
The contact search spec can flake when generated names for the "match" and
"non-match" contacts happen to overlap. This hard-codes the names for this
specific test and removes generated names from the factory.Feature with design reasoning
[PROJ-123] Show contact subscriptions in CSV
Currently we don't show subscription data for archived contacts in the CSV
export because the association we use only returns active contacts. We want
to show all subscriptions associated with the contact that are accessible to
the user.
I wanted to maintain 3 principles:
1. Permission logic stays in the permission layer
2. No N+1: subscription data must be batch-loadable
3. Serializer is active/archived-contact agnostic
I considered a variety of solutions but they kept breaking one or more
of these constraints. Eventually I settled on a solution that worked
like this:
- DB view aggregates subscription IDs as an array on each
record. This is structural, no permission logic applied.
- Permission layer filters by tenant ID.
- Manual pre-loading of subscription IDs avoids N+1Refactor with before/after
[PROJ-789] Refactor session service
In the spirit of "make the change easy, then make the easy change",
this commit re-structures the entire tree of services into a form that
better suits the changes we're about to make.
Pure refactor (ish)
-------------------
This is mostly a pure refactor, with a couple small exceptions...
[... sections with mermaid diagrams showing before/after flow ...]Incremental Rollout Pattern
For risky or large changes, commit messages document a deliberate incremental strategy:
- Add nullable column / feature-flagged code (safe to deploy anytime)
- Backfill existing data or enable flag
- Make column non-nullable / remove flag (only after step 2 is done)
Each commit explains where it sits in the sequence: "Now that we've cleaned up the existing API keys, we can safely add the stricter constraints everywhere."
Incident Chain Narrative
When fixing bugs introduced by earlier commits, tell the chain story:
In abc12345..., we started moving away from archived records. Then we
tried to rein it back in with def67890..., but this is subject to
the default scope again. This commit adds thorough testing to ensure
we neither *over* select nor *under* select records to delete.Anti-Patterns
- "Updated files" or "Various fixes" -- say what actually changed.
- Starting the body with what the commit does rather than why.
- Passive voice ("it was decided") -- use "I chose" or "we decided".
- Explaining what the diff shows -- the reader can see the diff. Explain the reasoning behind it.
- Including coordination notes for the current team ("go talk to X about the credentials", "we need to follow up in Slack") -- commit messages are for future readers, not present-day task management.
- Adding
feat:/fix:prefixes.
Workflow
When asked to commit:
- Read the diff carefully.
- Identify the story: what was the state before, what changed, why.
- Draft subject line in imperative mood with ticket if available.
- Write body following the narrative arc.
- Add enrichment (cross-refs, diagrams, benchmarks) where it helps.
- Verify line wrapping at 72 characters.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

