conventional-commit
Installation
SKILL.md
Conventional Commit
Generate a commit message that follows the Conventional Commits spec from what is currently staged.
Steps
- Read the staged changes:
git diff --cached --statfor the file overview.git diff --cachedfor the actual hunks. If nothing is staged, stop and tell the user togit addfirst — do not stage for them unless they ask.
- Infer the type:
feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert. - Infer an optional scope from the dominant directory or package touched.
- Write the message:
- Subject:
type(scope): summary— imperative mood, lowercase, no trailing period, ≤ 50 chars. - Body (only when the "why" is not obvious from the subject): wrap at 72 cols, explain motivation and contrast with previous behavior — not a restatement of the diff.
- Footer:
BREAKING CHANGE: <desc>when applicable; reference issues (Closes #123) only when the user mentions one.
- Subject:
- Show the proposed message and let the user confirm. Commit only when asked.