Commit Message Generator
When to Use
Use this skill when creating commit messages or when the user asks to commit changes.
Instructions
- •Analyze staged changes with
git diff --staged - •Identify the type: feat, fix, refactor, docs, test, chore, style, perf
- •Detect scope from the most changed directory or module
- •Write a concise message focusing on "why" not "what"
Format
code
<type>(<scope>): <description> [optional body explaining why, not what] [optional footer: BREAKING CHANGE, Closes #issue]
Examples
- •
feat(auth): add OAuth2 login with Google provider - •
fix(api): handle null response from payment gateway - •
refactor(db): extract connection pooling to separate module - •
docs(readme): add installation instructions for Windows
Guidelines
- •Keep subject line under 72 characters
- •Use imperative mood ("add" not "added")
- •Don't end subject with period
- •Separate subject from body with blank line