Commit
Commit the current work, runs the quality, consistency and passport gates, branches...
Install
npx skills add pedrohcgs/claude-code-my-workflow --skill commit -g -a claude-code -y- Repository
- pedrohcgs/claude-code-my-workflow1.7k
- Category
- Git and review
- Updated
- 1mo ago
- License
- MIT
- Context cost
- Mediumabout 2,076 tokens
- Runs scripts
- No, instructions only
What it does
Commit the current work, runs the quality, consistency and passport gates, branches off main if needed, stages specific files, and writes a commit whose subject states what is now true. Pushes and opens a pull request only with --pr or when the user asks; never merges, a merge happens only when the user explicitly says to merge. Use ONLY on explicit commit intent, user says "commit", "let's commit this", "open a PR", or prefixes with `/commit`. Do NOT auto-invoke on vague end-of-task phrases ("we're done", "wrap up"), those require explicit confirmation first. Never force-pushes or skips hooks.
Commit
Verify the gates, then commit. A commit is not a pull request, and a pull request is not a merge.
This skill stops after the commit. It pushes and opens a pull request only with --pr or when the
user asks, and it never merges, a merge happens only when the user explicitly says to merge
that pull request (see "Merging" below). Reviewers such as Codex and Copilot comment after a pull
request opens; merging before they report skips their review.
Steps
Step 0: Quality Gate (Pre-Commit)
Run before branching. For every changed .qmd, .tex, or .R file that has quality rubrics, run:
python3 scripts/quality_score.py <changed-file-paths>
- If any file scores below 80, halt and report the findings. The user must either fix the issues or explicitly override with phrases like "commit anyway" or "skip quality gate". Once
./scripts/install-hooks.shhas been run,.githooks/pre-commitre-runs the same ≥80 gate on the staged.qmd/.tex/.Rfiles, so carry an approved override into Step 4 asSKIP_QUALITY_GATE=1 git commit ...and record the override reason in the commit message. That variable skips only the quality score; the backtest still runs. Never fall back togit commit --no-verify. - If all files score 80+, continue.
Spawn the verifier agent (via the Agent tool with subagent_type=verifier) to run compilation/render checks on the changed files. Report pass/fail before committing.
Step 0b: Consistency Gate (Pre-Commit)
Runs unconditionally. The full backtest suite, all ten gates (surface-sync count claims like "18 agents, 61 skills, 37 rules, 11 hooks" and marked tables, skill integrity, model currency, links, spec conformance, staleness, repo hygiene, derived counts, ledger coverage, hook battery):
./scripts/backtest.sh

