| name | quick-commit |
| description | Use when the user asks to commit changes. Runs parallel git status/diff/log, drafts a conventional commit message, stages files by name, and handles pre-commit hook failures. |
When the user asks to commit, follow this exact protocol.
Step 1: Assess (run in parallel)
git status
git diff && git diff --staged
git log --oneline -5
Step 2: Draft Message
- Summarize the nature:
feat: (new), fix: (bug), refactor:, test:, docs:, chore:
- Focus on why, not what
- Match the repo's existing commit style
- Concise: 1-2 sentences
- Do NOT commit files that likely contain secrets (
.env, credentials.json, etc.)
Step 3: Stage and Commit
- Stage specific files by name — never
git add -A or git add .
- Create the commit using HEREDOC format:
git commit -m "$(cat <<'EOF'
feat: add user authentication with JWT
EOF
)"
- Run
git status after commit to verify success
Step 4: Handle Pre-Commit Hook Failures
If a pre-commit hook fails:
- The commit did NOT happen
- Fix the issue (lint error, type error, etc.)
- Re-stage the fixed files
- Create a NEW commit — do NOT use
--amend (that would modify the previous commit)
Rules
- Only commit when explicitly asked
- Never use
--no-verify to skip hooks
- Never update git config
- Never use
-i flag (interactive mode not supported)
- Warn the user if they ask to commit files that look like secrets