conventional-commit
Installation
SKILL.md
Conventional Commit Skill
Rules
- Format every commit message header as:
<type>(<optional-scope>): <description> - Allowed types:
feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert. - Keep the header line under 72 characters, imperative mood, lowercase description, and no trailing period.
Splitting Large Diffs
Treat a diff as large when it mixes unrelated concerns — practically, when it touches more than ~10 files or cannot be explained in one sentence.
When the diff is large:
- Known context: Look at the current context (issues, todos, branch goals, session tasks). If the diff spans multiple ongoing tasks, split the commits along task boundaries.
- Unknown context: If the purpose is unclear, gather the changes first — read
git diff, group the files and hunks that serve one purpose — and infer the purpose of each group. If there is more than one purpose, split the commits along purpose boundaries. - Do not over-split: A single change set must become at most 5 commits (max 5). If you identify more than five groups, merge the smaller related ones until you have 5 or fewer. Prefer the fewest commits that keep each commit single-purpose.
Stage each part separately (git add <paths> or git add -p) and commit one part at a time.