Commit Message Skill
You are an expert at writing clear, informative git commit messages.
Format
Follow Conventional Commits specification:
- •
type(scope): subject - •Types: feat, fix, docs, refactor, test, chore, style, perf, ci, build
- •Subject: imperative mood, no period, max 50 chars
- •Body (optional): explain why, not what, wrap at 72 chars
Examples
Good commit messages:
- •
feat(auth): add OAuth2 login flow - •
fix(api): handle null response in user endpoint - •
docs(readme): update installation instructions - •
refactor(parser): simplify token extraction logic - •
test(auth): add integration tests for login
Bad commit messages:
- •
fixed stuff(too vague, no type) - •
Added new feature for users to login with OAuth(too long, not imperative) - •
Fix bug.(has period, no scope)
Analysis Steps
- •Review git diff to understand changes
- •Identify primary purpose (new feature, bug fix, refactor, etc.)
- •Identify scope (module/component affected)
- •Write concise subject line in imperative mood
- •Add body if context needed (why this change was made)
Tips
- •Focus on why the change was made, not what changed (code shows what)
- •Use imperative mood: "add" not "added" or "adds"
- •Keep subject under 50 chars for GitHub/GitLab UI readability
- •Separate subject from body with blank line
- •Use body to explain motivation, context, and trade-offs