codex-review
Skill0 starsChanged 32 days agoMITView on GitHub
Pre-PR code review on the current branch using the OpenAI Codex CLI, with an iterative fix 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 repository33 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authoritative-text-rulesSkill
- breachreaperSkill
- bug-to-contractSkill
- code-review-gateSkill
- codex-contract-test-reviewSkill
- codex-plan-reviewSkill
- copilot-reviewSkill
- debtreaperSkill
- diff-rootSkill
- docreaperSkill
- done-checkSkill
- driftreaperSkill
- file-adrSkill
- file-issueSkill
- file-pubdocSkill
- file-pullreqSkill
- finding-to-auditSkill
- finding-triageSkill
- gate-miss-to-issueSkill
- gh-body-auditSkill
- gh-body-conventionsSkill
- implementSkill
- land-via-integration-branchSkill
- quality-listSkill
- read-issueSkill
- reimreSkill
- research-and-implementSkill
- researchSkill
- review-pipelineSkill
- review-telemetrySkill
- stage-commit-pushSkill
- todo-checkSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 3 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 79 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 52
If any of the above is yes, skip codex exec review and use codex exec "<inline prompt>" instead.
- Very specific: line 63
When read-issue.sh exits nonzero, stop and report its message instead of running the review.
- Very specific: line 67
Run git log <root-rev>..HEAD --oneline and git show <sha> to read the commits.
- Distinctive: line 68
Read each file the prompt names in full, and re-read by line range any part a read reports as truncated.
- Distinctive: line 85
When presenting review output, triage each finding:
- Very specific: line 118
Every finding of the latest triage is closed, as finding-triage defines closed.
- Very specific: line 122
Stdin redirect: every codex exec invocation needs </dev/null.
- Distinctive: line 123
Run fresh: run each review with fresh context — fresh reviews are the correct approach for iteration.
- Very specific: line 124
Non-interactive only: Always use codex exec review, not codex review, when running from scripts or automation.
“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
Orchestrate codex exec review to review branch changes and iterate on fixes.
The root
The caller supplies the root — the ref the change under review is measured from — on diff-root's consumer contract. Apply that contract here, halt included. Every --base command below resolves the merge base in its own block, as that skill's per-command conversion requires.
Core commands
Review branch diff against base
mb=$(git merge-base <root-rev> HEAD)
test -n "$mb" || { echo "no merge base for <root>"; exit 1; }
codex exec review --base "$mb" -o <output-file> </dev/nullThis runs git diff <base-SHA> internally and reviews the entire diff. The review covers all committed changes on the current branch relative to the base — both the original work and any subsequent fix commits.
Other review modes
| Command | Scope |
codex exec review --uncommitted </dev/null | Staged + unstaged + untracked changes |
codex exec review --commit <SHA> </dev/null | A single commit's diff |
codex exec "<inline prompt>" </dev/null | Free-form prompt with inline context (see "Switching to exec with inline context" below) |
Output options
| Flag | Effect |
-o <file> | Write final review message to file |
--json | Emit JSONL event stream to stdout |
"custom prompt" | Positional arg — additional review instructions |
Switching to exec with inline context
codex exec review --base ... operates on git diff alone — it cannot read GitHub Issues, ADRs, or any design intent encoded outside the diff. For self-contained changes this is fine; for phased rollouts where the judgement criteria live outside the diff, review mode systematically misjudges intentional design decisions as regressions. Switch to free-form codex exec "<inline prompt>" to attach the context.
Trigger — before every codex review, check:
- Is this commit part of a numbered phase in a tracked Issue?
- Does the relevant ADR contain phrases like "unmeasured → sentinel X", "tracked separately in a follow-up", "intentional default until
<later phase>", "out of this phase's scope"? - Are there thresholds, defaults, or scoped-off paths that look like bugs from the diff but are ADR / Issue-intentional?
If any of the above is yes, skip codex exec review and use codex exec "<inline prompt>" instead.
Why the workaround is needed: --base and the positional [PROMPT] are mutually exclusive on codex exec review, so phase context cannot be attached to a review invocation. The free-form codex exec "..." accepts an arbitrary prompt that can direct codex to read the surrounding context first.
Inline prompt template — when the change has a tracking Issue, save it before each prompt is written, to a fresh file from mktemp:
mktemp # prints <issue-file>
"${CLAUDE_SKILL_DIR}/../read-issue/scripts/read-issue.sh" <n> > <issue-file>When read-issue.sh exits nonzero, stop and report its message instead of running the review. Delete <issue-file> once the read has failed or codex has exited.
The prompt names, each by its absolute path so codex doesn't have to search, the relevant ADRs and, when the change has a tracking Issue, <issue-file> as that Issue. It should tell codex to:
- Run
git log <root-rev>..HEAD --onelineandgit show <sha>to read the commits. - Read each file the prompt names in full, and re-read by line range any part a read reports as truncated.
- Enumerate explicitly which states are intentional (sentinel values, scoped-off paths, deferred behaviors) and must NOT be flagged as regressions.
- List what the review should focus on (forwarding correctness, default / expert contract consistency, docstring drift, missed call sites, etc. — project-specific).
- List what to ignore — the enumerated intentional states from step 3.
For non-phased self-contained changes, keep using vanilla codex exec review --base ... in the form Core commands gives. The inline-context workaround is only needed when judgement criteria live outside the diff.
Triaging review output
codex review operates on git diff output alone — it has no access to the broader project context, test results, runtime behavior, or design rationale. This means a significant fraction of its findings will be false positives: technically plausible concerns that don't apply given information the reviewer can't see.
Typical false positive patterns:
- Assumed standard behavior: "this regex won't match standard X format" when the actual data uses a project-specific format (verified by tests)
- Missing context on intentional decisions: flagging a design choice as a bug when it was deliberate and tested
- Hypothetical edge cases: warning about inputs that can't occur given the system's constraints
When presenting review output, triage each finding:
- Read the review output and identify each distinct finding (usually formatted as
[P1/P2] summary — file:line) - Cross-check against project context you already have — test results, prior conversation, code you've read.
- Classify each finding under the
finding-triageSSOT dispositions, applying each per its definition there. The common codex-review cases areactionable,false-positive, anduncertain-validity. - Present the triage to the user, not the raw output. Lead with actionable items, note dismissed items with reasoning.
Review-fix loop
Each iteration runs a full, unbiased review of the entire diff against base. Do NOT inject previous review comments into the prompt — this narrows the reviewer's focus and risks missing new regressions introduced by the fix. The reviewer should always see the code with fresh eyes.
Procedure
Run review
mb=$(git merge-base <root-rev> HEAD) test -n "$mb" || { echo "no merge base for <root>"; exit 1; } codex exec review --base "$mb" -o /tmp/codex-review.md </dev/null- Triage the output using the process above. Present classified findings to the user.
- Take each finding that is not closed, as
finding-triagedefines closed, as its disposition directs; where that is an edit, the user (or Claude) makes it and commits. If this step changed no file and the review is now clean, stop here. - Re-run the review — same command, same flags. The new diff includes the fix commits, so the reviewer sees the full picture: original changes plus fixes.
- Re-triage — a finding dismissed as false positive in iteration N may become relevant in iteration N+1 if the fix changed the surrounding code. Don't carry over dismissals blindly.
- Repeat steps 3–5 until the review is clean.
What "clean" means
Every finding of the latest triage is closed, as finding-triage defines closed. A valid but minor finding keeps whichever SSOT disposition it earns — minor-ness alone never closes it.
Important constraints
- Stdin redirect: every
codex execinvocation needs</dev/null; hang signal is absence of theOpenAI Codex v...banner afterReading additional input from stdin.... - Run fresh: run each review with fresh context — fresh reviews are the correct approach for iteration.
- Non-interactive only: Always use
codex exec review, notcodex review, when running from scripts or automation. Theexecvariant runs non-interactively and exits when done. - Timeout: Set timeout to 600000ms (10 minutes) when calling from Bash. Reviews of large diffs can take several minutes.
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.

