commit
Reviews, validates and commits authorized changes, merges the task branch into local dev, pushes dev and arms the staging promotion. Use when a task is ready to land, when the user says commit, ship o
SKILL.md.claude/skills/commit/SKILL.md
GitHubContext
Claude Code fills these in; in Codex, run the commands.
- Current git status: !
git status - Current diff (staged and unstaged): !
git diff HEAD - Recent commits (for style reference): !
git log --oneline -5
Your task
Analyse the diff and write a conventional commit message:
- Format:
type(scope): description— types: feat, fix, chore, refactor, style, docs, test, ci - Keep the subject line under 72 characters
- Add a body if the change is non-obvious (what changed and why, not how)
- If multiple logical changes exist, note that and suggest splitting
- Format:
Format and lint the files you touched and run the targeted tests of what changed (root
AGENTS.md→ Always); GitHub CI on the PR is the full gate. Runpnpm verify:changedonly for work you are not pushing, or with--fullbefore a risky merge. Review the final diff and resolve failures before committing. Then runnode scripts/guardrails/risk-tier.mjs --base origin/dev: forstandardorhighrisk, run/code-reviewfirst (Codex:/review; a fresh-context reviewer) unless it already ran on this diff, and fix or answer each finding. If a gate fails twice on the same error, stop and report it (failure budget inAGENTS.md). For web UI changes ingmsorgaa-admin, also runpnpm e2e(a SKIP means no dev server is running; say so in the recap). Tests, builds, commits and pushes are heavy commands: on the shared machine they run through~/.local/bin/heavy, one at a time (the hooks enforce it;docs/agents/tool-usage.md→ Heavy commands).Stage only authorized changes, preserving unrelated staged and unstaged work. Commit with the reviewed message. Do not bypass hooks or force-push.
Integrate current
origin/devinto the task branch, validate the combined result with the checks above, then push the task branch; never push todev, and never force-push. If remote dev advances, integrate and revalidate before updating the PR. Unattended scheduled runs (docs/agents/routines.md) do the same from theiragent/<n>-<slug>branch. Then, one command per call, with long text written to a file first (no heredocs, no long inline--body):- Write the step 7 recap to a file and open the PR into
dev:gh pr create --base dev --title "<title>" --body-file <file>. - Wait for CI:
gh pr checks <num> --watch --fail-fastuntil it exits 0 on the PR head. - Get the fresh-context review of that head, write it to a file and post it,
naming the reviewer:
gh pr comment <num> --body-file <file>. Fix or answer each finding. Arisk:highPR also needs a cleansecurity-reviewerpass, named in the PR body. For a cross-tool review, post the block frompnpm agents:handoffas a PR comment the same way. - Enforcement files (hooks,
.claude/settings.json,.codex, Codex rules,.github, rulesets,.husky, rootpackage.json, guardrail scripts that are not tests): stop after CI and review; the owner merges the PR (the hook refuses an agent merge). Agent-rules files (skills, role briefs,docs/agents, guardrail tests, the rootAGENTS.md): run thesecurity-revieweron the head, and read Codex's GitHub review of that exact head. Only when both are clean, add both lines to the PR body (gh pr edit <num> --body-file <file>), each alone on its line with the full 40-character head sha:Security review: no open findings (<reviewer>, <sha>)andCodex review: no blocking findings (<sha>). A new push means both reviews and both lines again. No Codex review of that head: stop and say so; do not merge. - Once CI is green on the head and the review has no open blocking finding,
merge it yourself, alone in its command:
gh pr merge <num> --repo Marcus100/grenmet --merge --match-head-commit <full head sha>. - Send the owner a phone alert: the PR number, title and link. For a
agent-rules PR send a separate alert that lists the files changed.
Use
PushNotificationwhen the session has it; otherwise comment on the open issue labelledfactory-landed.
In a cloud session
gh pris blocked: use thegh apiforms indocs/agents/tool-usage.md→ GitHub from a cloud session (create the PR, list the check runs, comment, and merge withgh api -X PUT repos/Marcus100/grenmet/pulls/<num>/merge -f sha=<full head sha> -f merge_method=merge). Full rule:docs/agents/workflow.md→ Merging into dev.- Write the step 7 recap to a file and open the PR into
Use PRs for
dev → staging → mainpromotion, reusing an existing promotion PR. Once the PR is merged intodev, stop: say what is now waiting ondev. Open or update the staging PR (following/release) only when the owner asks for it; the owner reviews and merges intostaging(agents do not arm auto-merge). Main merges and production publication or deployment still require separate authorization.Run the
file-frictionskill for anything you worked around during this task.End with a recap for the user (and the staging PR body when you promote):
- Changed: one line per commit.
- Gates: each check run and its result.
- Outcome:
success,flawed(shipped but needed rework or left known gaps),blocked(missing credential, service or decision) ormanual(deliberately left for a human), with the reason. - Friction: issue numbers filed or commented, or
none.
When the work was an agent task, post a run record with
node scripts/agents/run-record.mjs --kind run ... --post <issue>; seedocs/agents/run-records.md.