commit-message
Skill0 starsChanged 4 months agoMITView on GitHub
Enforce Conventional Commits discipline — infer type (feat/fix/refactor/…) and scope from the staged diff and changed file paths, and produce a structured `type(scope): subject` message. Goes beyond basic AI commit generation by applying CC rules and scope inference. Triggered by "write a commit message", "what should I commit this as", "help me commit", "what should my commit say", "commit msg", "suggest a commit message", "how do I phrase this commit", "write a good commit", "commit-message".
34 other projects use a version of this.
Adopted by
Most recently taken up by
- parkbarg/claude-skillstheir own version, first seen Oct 3, 2026
- microsoft/nvxtheir own version, first seen Oct 3, 2026
- sheshbabu/zentheir own version, first seen Oct 2, 2026
- abigayleh/claude-workflow-plugintheir own version, first seen Sep 27, 2026
- laodao-ai/laodao-skillstheir own version, first seen Sep 26, 2026
- Manshooo/astral-genesistheir own version, first seen Sep 25, 2026
Used with
Projects with it also use error-handling, changelog and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 3 projects that use this
HashiCorpSkillchangelog
Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.
Also in 4 projects that use this
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 6 projects that use this
OpenAISkillbrainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Also in 3 projects that use this
Other versions34 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 34
- mergisi/awesome-openclaw-agents★ 4ksame name
- github/copilot-cli-for-beginners★ 2.8ksame name
- sheshbabu/zen★ 1.2ksame name
- microsoft/nvx★ 296same name
- danielvm-git/bigpowers★ 252same name
- Aedelon/claude-code-blueprint★ 120same name
- c-kick/hnl-agent-skills★ 51same name
- iamwjun/localcoder★ 39same name
- whyashthakker/agent-skills-marketing★ 19same name
- jiatastic/open-python-skills★ 9same name
24 more not listed
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 repository21 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- ci-cd-pipelineSkill
- requirements-synthesisSkill
- security-hardeningSkill
- spec-driven-developmentSkill
- workflow-from-chatsSkill
- architecture-decision-recordsSkill
- commit-history-auditSkill
- deslopSkill
- document-thisSkill
- env-drift-checkSkill
- handoffSkill
- minimal-diff-reviewSkill
- onboardingSkill
- pre-commit-checkSkill
- pr-review-canvasSkill
- pr-summarySkill
- release-readinessSkill
- requirements-qaSkill
- sync-docs-after-editSkill
- write-changelogSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
9
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 52
Use the repo's recent log as a reference — match existing scope conventions if present.
- Distinctive: line 63
No period at the end
- Distinctive: line 68
Add a body when:
- Distinctive: line 92
Do not run git commit — that is the user's decision.
- Distinctive: line 98
If the staged diff is empty, say so and stop.
- Distinctive: line 99
If the diff is large and spans unrelated concerns, flag it: "This diff touches X and Y — consider splitting into two commits."
- Distinctive: line 100
Do not use git commit -m or make the commit.
- Distinctive: line 103
Never fall back to unstaged changes when the staged diff is empty — that produces a message for content the user hasn't actually chosen to …
- Distinctive: line 104
When the diff spans many unrelated top-level directories, don't force a single scope onto it — say the scope is ambiguous and let the user …
“Common” is measured: kept by at least 6 in 10 of the 27 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
✏️ Skill: commit-message
Purpose
Produce a structured, Conventional Commits-compliant commit message from the staged diff — not a free-form summary. Separate from pre-commit-check (which audits the staged diff for issues; this writes the message after the audit passes).
Trigger phrases
- "write a commit message"
- "what should I commit this as"
- "commit-message"
- "generate a commit message"
- "what's a good commit message for this"
Steps
1. Read the staged diff and recent history
git diff --cached # staged changes — the primary input
git log --oneline -10 # recent messages — infer repo's convention and scope patterns2. Infer the type
| Type | Use when |
feat | New capability visible to a user or caller |
fix | Corrects a defect or wrong behaviour |
refactor | Restructures code without changing observable behaviour |
docs | Changes to documentation only |
test | Adds or fixes tests |
chore | Build scripts, CI config, dependency bumps, tooling |
perf | Measurable performance improvement |
style | Formatting, whitespace — no logic change |
Pick the single most accurate type. If the diff spans multiple types, pick the dominant one and note the others in the body.
3. Infer the scope
Derive scope from the primary directory or module affected:
| Changed path | Scope example |
src/auth/ | auth |
skills/core/commit-message/ | commit-message |
hooks/git-guard.sh | hooks |
| Root-level config only | omit scope |
Use the repo's recent log as a reference — match existing scope conventions if present.
4. Write the subject line
type(scope): imperative description of what changedRules:
- Imperative mood: "add", "fix", "remove" — not "added", "fixes", "removing"
- ≤72 characters total (type + scope + colon + space + description)
- No period at the end
- Lowercase after the colon
5. Write the body (if needed)
Add a body when:
- The why is not obvious from the subject
- The diff spans multiple concerns
- There is a breaking change
Separate subject from body with a blank line. Wrap body at 72 characters.
For breaking changes, append:
BREAKING CHANGE: <what changed and how callers must adapt>6. Output
Present the commit message in a code block, ready to copy:
type(scope): subject
Optional body explaining the why, not the what.Then ask: "Ready to commit with this message, or would you like to adjust it?"
Do not run git commit — that is the user's decision.
Output
A single commit message block. No explanation unless the type choice is non-obvious.
Notes
- If the staged diff is empty, say so and stop.
- If the diff is large and spans unrelated concerns, flag it: "This diff touches X and Y — consider splitting into two commits."
- Do not use
git commit -mor make the commit. Write the message only.
Gotchas
- Never fall back to unstaged changes when the staged diff is empty — that produces a message for content the user hasn't actually chosen to commit.
- When the diff spans many unrelated top-level directories, don't force a single scope onto it — say the scope is ambiguous and let the user pick, or recommend splitting the commit.
git log --oneline -10on a very young repo (first few commits) may not have enough history to reliably infer a scope/type convention — say so rather than pattern-matching on 1–2 examples.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

