- Run
git status. Stop if this is not a Git repository or nothing is staged. - Run
git diff --stagedand use the conversation context to understand why the changes were made. - Propose one commit message following the rules below.
- Get explicit approval. Commit only after approval.
Use either:
type(scope): description
type: description
- Use imperative mood, lowercase, and no trailing period.
- For breaking changes, append
!:feat(api)!: rename foo to bar. - An optional body may follow a blank line; explain why, not what.
| Type | Use when |
|---|---|
feat |
New user-facing capability |
fix |
Corrects a bug |
perf |
Measurably faster or lighter, with the same behavior |
refactor |
Code restructure with no behavior change |
style |
Whitespace, formatting, or missing semicolons |
test |
Test-only changes |
docs |
Documentation or comment changes |
build |
Build inputs such as dependencies or packaging |
ci |
CI configuration only |
chore |
Repository housekeeping, such as lint config, .gitignore, or scripts |
revert |
Reverting an earlier commit |
I,we,now, orcurrently; let the diff speak for itself.- AI attribution such as
Co-authored-byorGenerated with...; this skill suppresses it. - Emoji unless the project convention requires them.
- Restating the filename when the scope covers it.