codex-review
Skill5 starsChanged 5 months agoMITView on GitHub
Run an independent code review of any git scope — uncommitted changes, a commit range, a merge commit, a PR, or specific paths — via Codex CLI, opencode, or context-blind subagents, then triage every finding with an explicit disposition. Use when asked to "review this diff", "codex review", "review PR N", "review the merge commit", or to get a second opinion on changes before or after merge. For reviewing implementation plans rather than code, see plan-review-loop.
91 other projects use a version of this.
Adopted by
Most recently taken up by
- p-chan/agent-skillstheir own version, first seen Nov 8, 2026
- p-chan/skillstheir own version, first seen Nov 8, 2026
- Smirnov-Labs/claude-skillstheir own version, first seen Nov 8, 2026
- juriwiens/skillstheir own version, first seen Nov 8, 2026
- ryanportfolio/winuse-mcptheir own version, first seen Nov 8, 2026
- fab-codes/agent-workflow-templatetheir own version, first seen Nov 8, 2026
Used with
Projects with it also use addskill, apply-firmware and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ryanportfolioSkilladdskill
Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.
Also in 6 projects that use this
ryanportfolioSkillapply-firmware
Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.
Also in 6 projects that use this
- +10 more from ryanportfolio
Other versions91 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 91
- ClickHouse/ClickHouse★ 51ksame name
- chaseai-yt/claudex-loop★ 3.2ksame name
- morethanwords/tweb★ 2.7ksame name
- alinaqi/maggy★ 711same name
- alinaqi/claude-bootstrap★ 708same name
- ThibautBaissac/rails_ai_agents★ 665same name
- ai-analyst-lab/ai-analyst★ 304same name
- Sateezg/codex-bridge★ 248same name
- sd0xdev/sd0x-dev-flow★ 192same name
- sd0xdev/sd0x-harness★ 192same name
81 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 repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- analyze-variationSkill
- arxiv-searchSkill
- blakean-sceneSkill
- create-explanationSkill
- critic-loopSkill
- deepen-taskSkill
- deliver-changeSkill
- design-dnaSkill
- gloss-drift-auditSkill
- image-to-sceneSkill
- marketing-claritySkill
- market-pulseSkill
- media-kitSkill
- motion-craftSkill
- nextjs-i18n-seoSkill
- oss-licence-auditSkill
- plan-review-loopSkill
- shaughnessy-ichingSkill
- swapping-pptx-templatesSkill
- ui-ux-architectSkill
- unslopSkill
- upgrade-siteSkill
- vercel-build-speedSkill
- verify-changeSkill
- verse-to-promptSkill
- video-to-shortsSkill
- voice-calibrationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 9 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 79 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Run the resolver and use its output.
- Very specific: line 80
Read review-lanes.md (in this skill's directory) and select:
- Very specific: line 89
If a --focus was not given but the diff touches something whose correctness depends on a convention rather than a type (an index base, a …
- Very specific: line 96
Read reviewer-backends.md, beside this file in the installed skill directory, and pick the first backend that is installed, has quota, and …
- Distinctive: line 104
Run the reviewer in the background so its output stays visible and it can be killed if it stalls.
- Very specific: line 171
Every finding gets exactly one disposition line under ## Disposition:
- Very specific: line 181
If no check can catch it, write ENCODE: none — and the reason.
- Distinctive: line 183
Prefer the check that removes the class over the one that catches this instance.
- Distinctive: line 204
Do not fix pre-existing findings in this change.
- Very specific: line 205
Commit the review artifact: if the project tracks reviews/ (check whether the directory is in git — many projects gitignore it).
- Distinctive: line 211
Harvest recurring classes: When the project keeps review records, group their findings by class every so often.
- Very specific: line 224
Never codex exec review with a custom prompt — it will be rejected.
- Distinctive: line 225
Never let the reviewer see your reasoning about the change.
- Distinctive: line 226
Never fix pre-existing findings inside the change under review.
- Distinctive: line 227
Every finding gets a disposition, including the ones you reject.
- Distinctive: line 228
Every accepted serious finding names its ENCODE check, or says why none can exist.
- Very specific: line 229
Run the reviewer backgrounded so it can be watched and killed — and never through tail/head, which buffer to EOF and leave the output file …
- Very specific: line 232
Always < /dev/null on codex exec and opencode run.
- Very specific: line 234
Run OpenCode with the dedicated report-scoped agent and effective policy defined in reviewer-backends.md.
“Common” is measured: kept by at least 6 in 10 of the 79 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codex Review
An independent code review of a scope you choose, not a scope some tool chose for you.
Core principle: the reviewer must not have seen the conversation that produced the code. Its value is that it does not already believe the change is correct. Preserve that — never hand it your reasoning, only the diff.
No hook, no hidden state. This skill runs start-to-finish inside one
invocation. Nothing can wedge a session, and nothing needs cancelling. By default a
review is one-shot. Opt-in loop mode (--loop <id>, loop-mode.md)
is for a change reviewed more than once: each round is still one invocation, and
its only state is the round records it leaves under reviews/<id>/.
Lifecycle
resolve scope → assemble lanes → run reviewer → triage findings → actPhase 1 — Resolve the scope
Run the resolver and use its output. Do not construct a git diff by hand.
Locate the directory containing this SKILL.md using skill discovery.
The resolver is scripts/resolve-scope.sh inside that directory, and
review-lanes.md is beside this file. Use those installed paths while
keeping the working directory in the repository being reviewed. Do not
assume that repository contains an Inkstone checkout or a skills/ folder.
bash "<absolute installed codex-review directory>/scripts/resolve-scope.sh" <args>Substitute the discovered skill directory before running the command.
For a plugin install it is normally under ${CLAUDE_PLUGIN_ROOT}/skills/;
for a standalone install use the skill's actual location. On Windows use
an available Bash runtime such as Git Bash or WSL, with a path it can read.
Pass the user's scope arguments through unchanged, minus --focus and --holistic
(those are yours, not the resolver's) and the loop flags --loop, --base and
--rebaseline. With --loop <id>, follow loop-mode.md instead of
the resolver: scripts/rounds.py start resolves the round's scope. It emits SCOPE_LABEL, DIFF_ARGS,
PATHSPEC, REF_SHA, CHANGED_FILES, CHANGED_LINES, OVERSIZED.
| The user says | Resolves to |
| nothing | dirty tree → git diff HEAD; else branch vs merge-base with the default branch; else the last commit |
HEAD~3 | everything since that ref |
<sha> <sha> or a..b | that range |
| a merge commit sha | git diff <sha>^1 <sha> — detected automatically |
--commit <sha> | that one commit alone |
--pr 140 | the PR's base..head (needs gh) |
--staged / --uncommitted | index / working tree |
| trailing paths | pathspec-limits any of the above |
Echo SCOPE_LABEL to the user before running the review. A review of the wrong
range is worse than no review, because it reads as clean.
If OVERSIZED=true (default threshold 2000 changed lines): say so, and offer to
split by directory rather than proceeding. A reviewer given more than it will read
carefully returns confident shallow findings.
If the resolver warns of an empty scope, stop and resolve that first — it is almost always a reversed range or an over-narrow pathspec.
Phase 2 — Assemble the lanes
Read review-lanes.md (in this skill's directory) and select:
- Core lanes — always.
- Detected lanes — run the detection checks against the target repo.
- Project lanes — if
.claude/code-review-lanes.mdexists in the target repo, include its contents verbatim. Read it; do not summarize it. - Focus lane — from
--focus "...", if given. - Holistic lane — only with
--holistic.
If a --focus was not given but the diff touches something whose correctness depends
on a convention rather than a type (an index base, a unit, an ordering, a locale key),
name it explicitly in the prompt anyway. That class of bug is invisible to a generic
reviewer and obvious to a primed one.
Phase 3 — Run the reviewer
Read reviewer-backends.md, beside this file in the installed skill directory, and
pick the first backend that is installed, has quota, and passes its short smoke
test: Codex CLI, then opencode, then context-blind subagents, unless the user
explicitly selected a backend or model. Log which one
ran and why the earlier ones were skipped. The mechanics — the < /dev/null rule,
artifact write permissions, liveness probes, the tail/head buffering trap, the guard loop —
all live in that file; do not improvise them here.
Run the reviewer in the background so its output stays visible and it can be killed if it stalls. The prompt must contain, in this order:
- The exact diff command:
git diff <DIFF_ARGS> [-- <PATHSPEC>], and an instruction to review only its output first. Codex runs it; for the shell-disabled OpenCode agent, materialize that exact diff beforehand and supply the saved file to read. SCOPE_LABEL, so the reviewer knows what it is looking at.- One block per selected lane, each ending with the finding format.
- A consolidation instruction: dedupe overlapping findings, order by severity, and produce the complete Markdown artifact at the designated path using the backend's output contract. Include the Phase 4 format and backend/model metadata in the prompt.
Per finding: file:line, severity (critical/high/medium/low), lane, what is wrong,
why it is wrong, and a concrete fix.
Choose the Phase 4 artifact path before dispatch. Codex saves its final Markdown
through --output-last-message; OpenCode writes through its report-scoped file tool.
Confirm the artifact exists, is nonempty and matches the reviewed scope before triage.
The caller adds dispositions after reading the review; it does not invent findings.
Don't wait idle. The pass is long enough to run the diff's own cheap checks alongside it — linters, localization or script guards, a targeted test suite.
Phase 4 — Validate the reviewer-written artifact
Require the reviewer to write reviews/review-<YYYYMMDD-HHMMSS>-<REF_SHA>.md:
---
scope: <SCOPE_LABEL>
diff: git diff <DIFF_ARGS> [-- <PATHSPEC>]
files_changed: <n>
lines_changed: <n>
lanes: correctness, contracts, tests, security, nextjs, project(.claude/code-review-lanes.md), focus
reviewer: "<tool (model[, agent])> — <why earlier backends were skipped, if any>"
reviewed_at: <ISO 8601>
---
## Findings
### [critical] <one-line title>
**Where:** `path/to/file.ts:142` · **Lane:** correctness
<what is wrong, why, and the fix>
...
## Verification limitations
<checks the reviewer could not perform>
## Verdict
<ready | needs revision>The reviewer stops after the verdict. The caller appends ## Disposition in Phase 5.
Recording the exact diff command in the frontmatter is not decoration — it is the only way anyone later can tell what this review did and did not look at.
Phase 5 — Triage
Judge every finding yourself. The reviewer has no context and will be confidently wrong about deliberate decisions. Verify each claim against the code before accepting it, and reject the ones that are wrong — a review you agree with entirely is a review you did not actually read.
Every finding gets exactly one disposition line under ## Disposition:
- ACCEPTED — real, in scope. Fix it.
- DECLINED — with the reason. "Deliberate: adjust-during-render is the documented React pattern here" is a disposition. Silence is not.
- PRE-EXISTING — real, but not caused by this diff. Do not fix it here; that is scope creep wearing a helpful hat.
An ACCEPTED critical or high finding also gets ENCODE: the test, lint rule,
script or type that will catch the whole class next time, shipped with the fix.
If no check can catch it, write ENCODE: none — and the reason. A rule that lives
only in prose or in a reviewer's memory is broken again later; a check is not.
Prefer the check that removes the class over the one that catches this instance.
## Disposition
- [high] HexagramLines off-by-one on changingLines — ACCEPTED, fixed in <sha>;
ENCODE: property test tests/hexagram.test.ts (changing lines stay in 1–6)
- [high] stale cache key after locale switch — ACCEPTED, fixed in <sha>;
ENCODE: none — depends on the product's cache policy, which a person decides
- [med] bg-accent hardcoded in HexagramDisplay — PRE-EXISTING, filed #212
- [low] extract the combobox into a hook — DECLINED: churn exceeds the valuePhase 6 — Act
Ask before doing any of these. This skill reviews; it does not unilaterally rewrite or publish.
- Fix accepted findings — as follow-up commits, one logical fix per commit. Reference the review file in the commit message.
- File the rest — declined-but-real and pre-existing findings become
gh issue createcalls, so they survive outside a markdown file nobody reopens. Do not fix pre-existing findings in this change. - Commit the review artifact if the project tracks
reviews/(check whether the directory is in git — many projects gitignore it). - Feed the lesson back — as a check first. Ship each ENCODE check with its fix,
and show it failing on the unfixed code before you count it: a check never seen
to fail proves nothing. Only a lesson that needs judgment goes to
.claude/code-review-lanes.md, so the next review looks for it. - Harvest recurring classes. When the project keeps review records, group
their findings by class every so often. A class seen in two or more reviews
with no ENCODE check is the next check to build; propose it with the findings
that justify it. In loop mode,
rounds.py verdictnames recurring classes that no fix covered with a check, androunds.py statscounts serious fixes that came with one.
Rules
- Echo the resolved scope before reviewing. Always.
- In loop mode, write
decisions.mdbefore round 1, record every round withrounds.py, and stop whenrounds.py verdictsays STOP — never by feel, and never read STOP as approval to merge. - Never
codex exec reviewwith a custom prompt — it will be rejected. - Never let the reviewer see your reasoning about the change.
- Never fix pre-existing findings inside the change under review.
- Every finding gets a disposition, including the ones you reject.
- Every accepted serious finding names its ENCODE check, or says why none can exist.
- Run the reviewer backgrounded so it can be watched and killed — and never through
tail/head, which buffer to EOF and leave the output file empty for the whole run. - A watcher that produced no output is a broken watcher until proven otherwise.
- Always
< /dev/nulloncodex execandopencode run; without it a backgrounded run blocks on stdin forever, looking exactly like a slow review. - Run OpenCode with the dedicated report-scoped agent and effective policy defined in
reviewer-backends.md; reviewers may write findings but may not edit reviewed source. - Record the reviewer as tool and model, and say when it was same-model.
- On any tooling failure, report it and continue degraded — never leave the user unsure whether a review ran.
Attribution
ENCODE and the harvest step adapt "Encode lessons in structure" from Lauren Tan's pstack (MIT): when a fix is structural, the instruction is the symptom.
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.

