post
Skill0 starsChanged 3 months agoMITView on GitHub
Scoped second-model review after implementing, before committing — OpenAI Codex reviews exactly the paths a change touched, then does the job the diff cannot do; derive the consumers the change failed to reach, from the repository rather than from the diff. Use on any change with a diff, as a step inside committing. Requires the `codex` CLI on PATH.
18 other projects use a version of this.
Adopted by
Most recently taken up by
- flung-official/flung-claude-plugintheir own version, first seen Nov 8, 2026
- dcbruck/claude-skillstheir own version, first seen Oct 20, 2026
- Lzdevmendes/motion-studiotheir own version, first seen Oct 15, 2026
- ayrshare/ayrshare-social-media-api-claude-plugintheir own version, first seen Oct 13, 2026
- Suge8/friedbuntheir own version, first seen Oct 11, 2026
- devinat1/skillstheir own version, first seen Oct 6, 2026
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- danium/lateral-thinking★ 311same name
- N1arko/redaktura-skills★ 130same name
- analystacademy/claude-skills★ 35same name
- ayrshare/ayrshare-social-media-api-claude-plugin★ 19same name
- imMamdouhaboammar/linkedin-animated-infographics★ 14same name
- Suge8/friedbun★ 12same name
- Epistates/sparX★ 3same name
- robertnowell/marketing-pipeline★ 2same name
- dcbruck/claude-skills★ 1same name
- devinat1/skills★ 1same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- adjudicateSkill
- mapSkill
- preSkill
The file
Files
The post half — scoped review, plus the job the diff cannot do
Two jobs, and the second matters more:
- findings — defects inside the paths you name. Each carries a
defect_class: the general shape it is an instance of, stated independently of the file it was found in, so you can sweep every sibling surface at once instead of meeting the same shape again next pass. - unreached_consumers — surfaces outside those paths that consume what
changed and did not move. Codex derives these from the repository's
consumer map (
CONSUMERS.md, if present — see themapskill) and by grepping the identifiers the change introduced — never from the diff, because the diff cannot contain what its author forgot. Treat this list as the real output.
Steps
Run it, scoped. Name exactly the paths this change touched:
"${CLAUDE_PLUGIN_ROOT}/scripts/codex-failsafe.sh" post <path> [<path>...] "${CLAUDE_PLUGIN_ROOT}/scripts/codex-failsafe.sh" post --staged "${CLAUDE_PLUGIN_ROOT}/scripts/codex-failsafe.sh" post --since mainScope is not optional. The worktree may hold unrelated uncommitted work; an unscoped review attributes it to this change and makes every finding unresolvable.
The returned
reviewed_pathsechoes the scope back, and the runner compares that echo against the scope it resolved and exits 3 on any mismatch. Displaying the echo is not enough: an empty or substituted array satisfies the schema and prints without complaint, so the run that reviewed nothing and the run that found nothing are the same two lines on a terminal — and a reader who has just seen a clean findings list is the least likely person to check. On exit 3, adjudicate nothing from the run; the raw file is still written, because evidence of a scope violation is worth keeping.- Read
unreached_consumersfirst. Each entry names the consumer, what it consumes, and a command whose output would show it is already consistent. Run that command. Either the consumer moves in this change, or the entry is refuted with the command's output — nothing in between. - Adjudicate every finding per
reference/adjudication.md:
confirmed/refuted(with evidence) /governed/out-of-scope/open. "I disagree" is not a disposition. - Write the ledger entry beside the raw claims file (same stamp,
.jsoninstead of.codex.json) — the task, the scope, each claim with its disposition and evidence. The raw*.codex.jsonis evidence and is never rewritten. - Then commit. A
confirmedclaim routes as: fix, plus extend the test or check that should have caught it, plus sweep itsdefect_classacross every sibling surface before the next pass.
How many passes, and when to stop
The post half is cheap enough to repeat, and that is the trap. Run repeatedly against a tree you keep editing, it measures when you stopped changing things rather than when the work became sound — and a rule phrased as "consecutive clean passes" is then counting your own edits, not the reviewer's agreement. Clean is also weak evidence on its own: a run can go clean twice in the middle and produce its deepest finding several passes later.
- Stop after one clean pass over a tree you have not edited since. A fix owes exactly one more pass — the fix is the new target, and one clean read of it is the whole of what another pass buys.
- A claim you have already adjudicated does not make a pass unclean. An
openitem re-derived on five consecutive passes is one gap with five independent derivations behind it, which is evidence rather than five findings. Record the count in the ledger and let the pass count as clean. - Budget six passes per target. Blowing it is a finding about the scope, not about the change: two targets are interleaved, or one is too large to review as a unit. Say which in the ledger, and stop.
Reviewing the code the review asked for
A confirmed finding often routes to "extend the test or check", so that code is written during the review — and it is then reviewed as though it were part of the original change. It is not. It is a second target, with its own defect density, and a review can spend half its findings on code that did not exist when it began.
Three habits cost most of that, and all are the author's rather than the tool's:
- Growing a check arm by arm. Each comparison added under review pressure
is fresh surface, and the next pass finds a defect in it. Settle the whole
scope in one decision — the pre half's
consumerslist usually already names it — then write it once, then review it once. - Not aiming a pass at it. An unscoped pass over deliverable-plus-new-check reasons from the deliverable, because that is where the argument is, and it re-derives the same claim while the new code sits unread. Run one pass scoped to the new code alone. The second target needs its own pass, not a share of one.
- Letting the reviewer find instance two. A second model reporting the
second occurrence of a shape you already fixed costs a full cycle and
teaches nothing the first occurrence did not. That is what
defect_classis for.
When each half runs
| Change | pre | post |
| Crosses a module/package boundary, touches a schema, contract, or vocabulary others consume, adds a guard, or asserts totality ("every", "all", a named count) | yes | yes |
| Any other change with a diff | — | yes |
| No diff (a question, a read, an explanation) | — | — |
Nothing fires either half automatically; running the post half is a step
inside committing, decided each time. (An optional fail-open pre-commit hook
ships in optional/hooks/ for those who want the mechanical reminder — read
its header for why it is not the default.)
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.

