name: git-commit-formatter description: Formats git commit messages according to Conventional Commits specification. Use when user asks to commit changes or write a commit message.
Git Commit Formatter
When writing a git commit message, follow the Conventional Commits specification.
Format
Allowed Types
- feat: New feature
- fix: Bug fix
- docs: Documentation only
- style: Formatting, no code change
- refactor: Code restructuring
- test: Adding tests
- chore: Maintenance tasks
Rules
- Type is mandatory and lowercase
- Scope is optional, in parentheses
- Description starts lowercase, no period at end
- Description must be under 72 characters
- Body explains "what" and "why", not "how"
Examples
feat(auth): add OAuth2 login supportfix: resolve null pointer in user servicedocs(readme): update installation instructions
Decision Tree
- If adding new functionality → use
feat - If fixing a bug → use
fix - If changing documentation only → use
docs - If changing code style without logic change → use
style