| name | commit |
| description | Creates git commits with conventional commit messages. Use when the user says "commit", "commit changes", "create a commit", "save my changes", or asks to commit code. |
| allowed-tools | Bash, Read, Glob, Grep |
Git Commit
Analyze changes and create well-formatted commits using conventional commit format.
Instructions
- Run
git statusto see staged, unstaged, and untracked files - Run
git diff --staged(orgit diffif nothing staged) to view changes - Run
git log --oneline -5to match existing commit style - Stage changes with
git addif needed (ask user if unclear what to stage) - Create commit with conventional format (see below)
- Run
git statusto verify success
Conventional commit format
<type>[scope]: <description>
[optional body]
Types: feat, fix, docs, style, refactor, test, chore, build, ci, perf
Example:
feat(auth): add password reset flow
Implements forgot password email and reset token validation.
Closes #42
Rules
- MUST use imperative mood ("add" not "added")
- MUST keep first line under 72 characters
- MUST use heredoc for multi-line messages
- Never add "Generated with Claude Code" or attribution
- Never add Co-Authored-By headers
- Never use
git commit --amendunless explicitly requested - Never use
git pushunless explicitly requested - Never stage files containing secrets (.env, credentials, API keys)
Heredoc format
git commit -m "$(cat <<'EOF'
type(scope): description
Body text here.
EOF
)"