| name | commits |
| description | Commit necessary changes with appropriate separation. Use when: (1) User says 'commit', 'commits', or 'save changes', (2) Claude has made changes that need committing, (3) User wants commits with proper grouping and conventional messages. Handles .gitignore updates, file selection, logical grouping, clean commit messages. |
| argument-hint | [push] [--no-push] [--push-auto] |
Commits Command
Make commits for all necessary changes in the working directory.
Argument Handling
Check $ARGUMENTS for these flags (case-insensitive, hyphens optional):
- "push": Also push to the remote after committing.
- "--nopush" or "--no-push": Before committing, invoke
/push-forbid to disable automatic pushing for the rest of the session.
- "--pushok" or "--push-ok" or "--pushauto" or "--push-auto": Before committing, invoke
/push-auto to enable automatic pushing for the rest of the session.
Execution Strategy (Token Cost Optimization)
Offload the commit workflow to a Haiku subagent so the expensive main session context (the session model — currently Fable 5) only sees a summary — not the full git diff, file-selection reasoning, or commit-message drafting.
Step 0: Pre-check (skip subagent when nothing to do)
Before anything else, run these two checks via Bash:
git status --porcelain
git rev-list --count @{upstream}..HEAD 2>/dev/null || echo "unknown"
Based on the results:
- → Report "Nothing to commit or push." and . Done.