codex-commit
Skill118 starsChanged 37 days agoMITView on GitHub
Group changes into atomic commits, draft and lint COMMIT_AGENTMSG, get an independent Codex review, explicitly confirm with the operator, commit through the protected wrapper, and rebase. Use whenever a tbhb repository task ends in a commit or the user asks to commit.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyze-sessionSkill
- codex-analyze-sessionSkill
- codex-fix-proseSkill
- codex-fix-prSkill
- codex-merge-prSkill
- codex-prSkill
- codex-rebaseSkill
- codex-resolve-rebase-conflictsSkill
- codex-review-commit-messageSkill
- codex-review-pr-descriptionSkill
- codex-review-prose-fixSkill
- codex-review-squash-messageSkill
- codex-watch-prSkill
- codex-write-pr-descriptionSkill
- codex-write-prose-fixSkill
- commitSkill
- fix-proseSkill
- fix-prSkill
- merge-prSkill
- prSkill
- rebaseSkill
- releaseSkill
- resolve-rebase-conflictsSkill
- review-commit-messageSkill
- review-pr-descriptionSkill
- review-prose-fixSkill
- review-squash-messageSkill
- watch-prSkill
- write-pr-descriptionSkill
- write-prose-fixSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 9
Run from the repository that contains the changes.
- Very specific: line 11
Stop on an interrupted Git operation or missing precondition.
- Distinctive: line 13
Use the recommended base from preflight.
- Distinctive: line 19
Only after receiving that verdict, run:
- Distinctive: line 28
After any edit to the draft or index, repeat the prose pass and independent review before stamping again.
- Distinctive: line 34
After confirmation, commit only through:
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Commit workflow
Run from the repository that contains the changes. Start with .agents/skills/codex-commit/scripts/preflight.sh.
Stop on an interrupted Git operation or missing precondition. Create and maintain an update_plan checklist for base, grouping, staging, draft, prose, review, gates, confirmation, commit, and rebase.
Use the recommended base from preflight. Read the whole diff and divide it into independently revertible logical changes. Stage every path by name with git add --. Never use git add ., git add -A, or git add --all. Confirm the index with the cached stat and short status.
Write the complete message to repo-root COMMIT_AGENTMSG. Use <type>(<scope>)?(!)?: <imperative description>. The body records why the change exists rather than restating the diff. Use only checked claims. Omit counts, sales language, and provenance. Hard-wrap body lines at 72 and trailers at 100. Put Assisted-by before the required Signed-off-by printed by preflight.
Invoke codex-fix-prose on COMMIT_AGENTMSG mise run lint-commit-msg. Then delegate codex-review-commit-message with fork_turns: "none", supplying only the repository root, optional --amend, and instruction to follow that skill. Resolve every finding and repeat prose lint plus independent review until it returns exactly VERDICT: PASS.
Only after receiving that verdict, run:
bash .agents/skills/codex-commit/scripts/stamp-review.sh <repo-root> <verdict-file>
mise run lint-commit-msgSave the delegated agent's exact final response in the verdict file. The stamping script accepts only VERDICT: PASS and records both the draft digest and the staged tree.
After any edit to the draft or index, repeat the prose pass and independent review before stamping again.
Confirmation and commit
Default mode always requires explicit operator confirmation unless preflight reports commit: GRANTED. Show the staged paths and complete message first. When the workflow needs confirmation, end the turn and ask Commit this message? Present Commit it, Revise the message, Restage and redraft, and Stop here. Don't commit in the turn that asks. The original request to commit doesn't count as this final confirmation.
After confirmation, commit only through:
bash .agents/skills/codex-commit/scripts/commit.shThe wrapper verifies the review digest and staged manifest. It accepts only --amend. Never invoke git commit directly or bypass hooks.
Rebase onto the recorded base with rebase.updateRefs=false, rebase.autoSquash=false, and --autostash. Never use a bare git stash pop. A conflict routes to codex-rebase. Report the resulting commit and any remaining atomic groups.
CODEX_THREAD_ID keys pre-approval. Without it, ask for confirmation. Ask despite a grant if review findings remain, a gate required judgment, grouping changed, or the commit exceeds the task’s scope.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

