Stage all changes (including submodules), commit with an auto-generated message, fix ALL pre-commit hook and compliance failures, and push. Handles submodules automatically. NEVER uses --no-verify.
Project Configuration: Before using this skill, read
project.config.yamlin the project root. It defines project-specific paths, commands, conventions, and tooling.
Stage all changes, generate contextual commit messages, fix every compliance and hook failure, and push to the remote — including all submodules with pending changes.
--no-verify — not on commit, not on push, not ever. If hooks fail, fix the code./commit-push
/commit-push fix auth token expiry bug
If the user provides a message after the command, use that as the commit message for the parent repo. Submodules get their own auto-generated messages based on their changes.
Check .gitmodules for registered submodules, then check each for uncommitted or unpushed changes:
git submodule foreach --quiet 'if [ -n "$(git status --porcelain)" ] || [ -n "$(git log @{u}.. 2>/dev/null)" ]; then echo "$sm_path"; fi'
Also check the parent repo for dirty submodule pointers:
git diff --name-only | grep -E '^\.' # e.g., .standards, docs/public-docs
git status --short
For EACH submodule with uncommitted changes, process it before the parent repo:
cd <submodule-path>
git status
git diff --stat
git log --oneline -5
git add -A
git commit -m "[message]"
If hooks fail: read every error, fix every issue, re-stage and retry. Same fix loop as Step 8 below.
git push
If push is rejected because remote has newer commits:
git pull --rebase && git push
If there are rebase conflicts, report them and stop — do NOT continue to the parent repo.
cd <project-root>
Report each submodule result as you go: ✓ .standards — [hash] [message]
git status --porcelain
If empty (and no submodule pointer changes), report "No changes to commit." and stop.
git status
git diff --stat
git diff --cached --stat
git log --oneline -5
If the user provided a message, use it. Otherwise generate one:
feat:, fix:, chore:, docs:, refactor:, test:, style:git add -A
This stages everything including updated submodule pointers.
Before attempting the commit, proactively run compliance checks and fix everything:
nice -n 10 {{config:commands.compliance.fast}}
If no compliance command is configured, skip to Step 8.
Parse EVERY error from the output and fix it. Common error categories:
F841 unused variable, E501 line too long)get_auth_context instead of get_current_userAfter fixing, re-run compliance:
nice -n 10 {{config:commands.compliance.fast}}
Repeat this fix loop until compliance reports 0 critical errors. Maximum 5 iterations. If after 5 iterations there are still errors, list every remaining error and ask the user — but do NOT use --no-verify.
Attempt the commit:
git commit -m "[message]"
If commit succeeds: Continue to Step 9.
If commit fails due to pre-commit hooks:
Pre-commit hooks run a second layer of checks (ruff, formatting, trailing whitespace, etc.). When they fail:
Read the FULL error output carefully. Parse every single error message.
For each error, fix it:
{{config:commands.lint.fix}}Re-stage all changes (hooks and your fixes may have modified files):
git add -A
Retry the commit with the same message:
git commit -m "[same message]"
If it fails again, read the NEW error output. It may be different errors now. Fix those too. Re-stage and retry.
Repeat until the commit succeeds. Maximum 5 attempts total. If after 5 attempts it still fails, list every remaining error and ask the user — but do NOT use --no-verify.
git push
If push fails because there's no upstream branch:
git push --set-upstream origin $(git branch --show-current)
If push fails because pre-commit is not found (stale hook path):
uv run pre-commit install or fix the hook's Python path--no-verifyIf push fails because remote has new commits:
git pull --rebase && git push
If rebase conflicts occur, report them to the user and stop.
Report the full result:
Committed and pushed:
Submodules:
✓ .standards — [hash] [message]
✓ docs/public-docs — [hash] [message]
○ (no changes)
Parent repo ([branch]):
[commit hash] [commit message]
[N files changed, X insertions, Y deletions]
Fixes applied:
- [list any issues that were fixed during the process]
pre-commit not found): Reinstall hooks, do NOT use --no-verify.These are never acceptable, regardless of circumstances:
| Forbidden | Why | Do Instead |
|---|---|---|
--no-verify on commit | Bypasses all quality checks | Fix the issues |
--no-verify on push | Bypasses push hooks | Fix the issues or reinstall hooks |
| Committing with known errors | Ships broken code | Fix every error first |
| Asking user to fix lint/format | Wastes their time | You have the tools, fix it yourself |
| Skipping compliance "because pre-existing" | Pre-existing errors are still errors | Fix them or, if truly out of scope and unfixable, ask user |
git add -A to stage everything (untracked, modified, deleted)