Conventional Commits Skill
Generate git commit messages following the Conventional Commits v1.0.0 specification.
Format
code
<type>(<scope>[,<scope>...]): <description> [optional body] [optional footer(s)]
Quick Reference
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Project Scopes: core, node, html-renderer, rollup, vite, demos, release
Multi-scope: When changes span multiple packages, combine scopes with commas: feat(core,node): add shared utility
See reference.md for full specification and guidelines. See examples.md for practical examples.
Workflow
- •Run
git statusto get an overview of modified files - •Run
git log --oneline -5to see recent commit style - •Run
git diff --cachedonly if more details are needed to understand the changes - •Determine appropriate type based on the nature of changes
- •Identify scope from affected package(s) — if changes span multiple packages, combine scopes (e.g.,
core,node) - •For breaking changes or new APIs: Check if downstream packages need their workspace dependency constraints updated (see reference.md)
- •Write concise description in imperative mood
- •Add body if explanation of what/why is needed
- •Always include
Co-Authored-By: Claude <noreply@anthropic.com>footer - •Validate message:
echo '<subject line>' > /tmp/commit-msg && pnpm exec commitlint --edit /tmp/commit-msg - •Stage files and commit — if commitlint fails (hook or manual), fix the message and retry