writing-commit-messages
Write clear, conventional commit messages with proper type prefixes, scopes, and body content.
By spencerpauly · 371 installs
npx skills add spencerpauly/awesome-cursor-skills --skill writing-commit-messages
Source repository · Upstream listing
Writing Commit Messages
Write commit messages that are useful for humans and machines.
Format
Subject Line Rules
50 characters or less for the subject
Use imperative mood: "add feature" not "added feature" or "adding feature"
Don't capitalize the first letter after the type prefix
No period at the end
Types
Type When to use
feat New user facing feature
fix Bug fix
refactor Code restructuring without behavior change
docs Documentation changes
test Adding or updating tests
chore Build, CI, tooling, deps
perf Performance improvement
style Formatting, whitespace (not CSS)
ci CI/CD pipeline changes
revert Reverting a previous commit
Scope (Optional)
The area of the codebase affected:
feat(auth): add OAuth2 login flow
fix(api): handle null response from payments endpoint
refactor(db): extract query builder into module
Body (When Needed)
Explain why , not what (the diff shows what):
Footer (When Needed)
Examples
Good:
Bad:
When to Commit
Each commit should represent one logical change
Don't mix refactoring with feature work in the same commit
Don't commit half working code (use git stash instead)
Commit early and often on feature branches, squash before merge if needed
Breaking Changes
If the commit introduces a breaking change:
1. Add ! after the type: feat(api)!: change auth token format
2. Add BREAKING CHANGE: in the footer with migration instructions