| name | commit |
| description | Analyze staged/unstaged changes and create a git commit that follows the project's detected conventions. Use when the user asks to commit, create a commit, or save changes to git. Push only if the user explicitly says "then push" in the same request. |
Smart Git Commit
Create a commit whose message matches how this repo already writes commits. Push only on explicit request.
Steps
1. Verify git state
Run git status --short. If this is not a git repo or there are no changes, stop and say so.
2. Learn project conventions
git log --oneline -30
Also read any project docs that state commit rules (README, AGENTS.md, .cursor/rules/).
Determine: format (conventional, ticket-prefixed, plain), casing, scope style, body usage. Match the detected pattern exactly. Never default to conventional commits if the project uses something else.
2b. Load voice profile (if it exists)
Read .cursor/skills/voice/profiles/commit-messages.md and .cursor/skills/voice/profiles/anti-patterns.md. These fill gaps the project pattern does not constrain (verb mood, abbreviations). The project pattern always wins on conflicts. Skip silently if the files do not exist.
3. Stage changes
If nothing is staged, stage modified tracked files with git add -u. Then run git diff --cached --stat.
4. Commit
git commit -m "$(cat <<'EOF'
<message matching project pattern>
EOF
)"
Scan the draft against the voice anti-patterns before committing.
5. Push — only if explicitly requested
Push only if the user said "push" in this same request. Prior approvals do not carry forward.
Rules
- No "Co-authored-by", no AI signatures, no emojis.
- Never modify git config.
- Never push unless "push" is in the current request.
- Always read
git log first. Never guess the commit format.