
codex-review
Codex code review closeout: local dirty changes, PR branch vs main, parallel tests.
- Installs
- 83
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/steipete/agent-scripts --skill codex-review- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads codex-review automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Codex Review
Run Codex's built-in code review as a closeout check. This is code review (codex review), not Guardian auto_review approval routing.
Use when:
- user asks for Codex review / autoreview / second-model review
- after non-trivial code edits, before final/commit/ship
- reviewing a local branch or PR branch after fixes
Contract
- Treat review output as advisory. Never blindly apply it.
- Verify every finding by reading the real code path and adjacent files.
- Read dependency docs/source/types when the finding depends on external behavior.
- Reject unrealistic edge cases, speculative risks, broad rewrites, and fixes that over-complicate the codebase.
- Prefer small fixes at the right ownership boundary; no refactor unless it clearly improves the bug class.
- Keep going until Codex review returns no accepted/actionable findings.
- If a review-triggered fix changes code, rerun focused tests and rerun Codex review.
- For security-audit suppression changes, verify accepted findings remain auditable: suppressed findings stay in structured output, active output keeps an unsuppressible suppression notice, and aggregate findings cannot hide unrelated active risk.
- Never switch or override the review model. If the review hits model capacity, retry the same command a few times with the same model. The helper runs nested review in yolo/full-access mode by default; use
--no-yoloonly when intentionally testing sandbox behavior. - Stop as soon as the review command/helper exits 0 with no accepted/actionable findings. Do not run an extra direct
codex reviewjust to get a nicer "clean" line, a second opinion, or clearer closeout wording. - Treat the helper's successful exit plus absence of actionable findings as the clean review result, even if the underlying Codex CLI output is terse.
- If rejecting a finding as intentional/not worth fixing, add a brief inline code comment only when it explains a real invariant or ownership decision that future reviewers should know.
- If
gh/Gitcrawl reportsdatabase disk image is malformed, rungitcrawl doctor --jsononce to let the portable cache repair before retrying review; do not bypass the shim unless repair fails and freshness requires live GitHub. - If Gitcrawl reports a portable manifest mismatch, source/runtime DB health error, or stale portable-store checkout, run
gitcrawl doctor --jsonand inspectsource_db_health,runtime_db_health, andportable_store_statusbefore falling back to live GitHub. - Do not push just to review. Push only when the user requested push/ship/PR update.
Pick Target
Dirty local work:
codex review --uncommitted
Use this only when the patch is actually unstaged/staged/untracked in the
current checkout. For committed, pushed, or PR work, point Codex at the commit
or branch diff instead; do not force --mode local / --uncommitted just
because the helper docs mention dirty work first. A clean --uncommitted review
only proves there is no local patch.
Branch/PR work:
git fetch origin
codex review --base origin/main
Do not pass any prompt with --base. Some Codex CLI versions reject both inline
and stdin prompt forms, including helper commands shaped like
codex review --base <ref> -, with --base <BRANCH> cannot be used with [PROMPT]. If the helper hits this error, run plain codex review --base <ref>
and report that helper prompt injection was skipped.
If an open PR exists, use its actual base:
base=$(gh pr view --json baseRefName --jq .baseRefName)
codex review --base "origin/$base"
Committed single change:
codex review --commit HEAD
or with the helper:
/Users/steipete/Projects/agent-scripts/skills/codex-review/scripts/codex-review --mode commit --commit HEAD
Use commit review for already-landed or already-pushed work on main. Reviewing
clean main against origin/main is usually an empty diff after push. For a
small stack, review each commit explicitly or review the branch before merging
with --base.
Parallel Closeout
Format first if formatting can change line locations. Then it is OK to run tests and review in parallel:
scripts/codex-review --parallel-tests "<focused test command>"
Tradeoff: tests may force code changes that stale the review. If tests or review lead to code edits, rerun the affected tests and rerun review until no accepted/actionable findings remain. Once that rerun exits cleanly, stop; do not spend another long review cycle on redundant confirmation.
Context Efficiency
Codex review is usually noisy. Default to a subagent filter when subagents are available. Ask it to run the review and return only:
- actionable findings it accepts
- findings it rejects, with one-line reason
- exact files/tests to rerun
Run inline only for tiny changes or when subagents are unavailable.
Helper
Bundled helper:
~/.codex/skills/codex-review/scripts/codex-review --help
If installed from agent-scripts, path is:
/Users/steipete/Projects/agent-scripts/skills/codex-review/scripts/codex-review --help
The helper:
- chooses dirty
--uncommittedfirst - otherwise uses current PR base if
gh pr viewworks - otherwise uses
origin/mainfor non-main branches - auto-runs
PNPM_CONFIG_PM_ON_FAIL=ignore PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false PNPM_CONFIG_OFFLINE=true pnpm run checkin parallel when a repo haspackage.json,pnpm-lock.yaml,node_modules, and acheckscript; disable withCODEX_REVIEW_AUTO_TESTS=0 - use
--mode commit --commit <ref>for already-committed work, especially cleanmainafter landing - should be left in
--mode autoor forced to--mode branchfor PR/branch work; do not force--mode localafter committing - writes only to stdout unless
--outputorCODEX_REVIEW_OUTPUTis set - supports
--dry-run,--parallel-tests, and commit refs - runs nested review with
--dangerously-bypass-approvals-and-sandboxby default - branch mode may fail on Codex CLI versions that reject
--baseplus the helper's stdin prompt; on that exact parser error, rerun plaincodex review --base <ref>instead of falling back to a non-Codex reviewer - keeps accepting
--full-access; use--no-yoloorCODEX_REVIEW_YOLO=0to opt out - prints
codex-review clean: no accepted/actionable findings reportedwhen the selected review command exits 0
Final Report
Include:
- review command used
- tests/proof run
- findings accepted/rejected, briefly why
- the clean review result from the final helper/review run, or why a remaining finding was consciously rejected
Do not run another Codex review solely to improve the final report wording. If the final helper run exited 0 and produced no accepted/actionable findings, report that exact run as clean.
FAQ
What does the codex-review skill do?
Codex code review closeout: local dirty changes, PR branch vs main, parallel tests.
How do I install codex-review?
Run npx skills add https://github.com/steipete/agent-scripts --skill codex-review in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/codex-review/ (personal) or .claude/skills/codex-review/ (project).
Which AI agents can use codex-review?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is codex-review safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains codex-review?
It is published by steipete in steipete/agent-scripts. It has 83 recorded installs.
More from steipete/agent-scripts
video-transcript-downloader
steipete/agent-scripts
yt-dlp downloads: video, audio, subtitles, transcripts, clips, playlists.
brave-search
steipete/agent-scripts
Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content. Lightweight, no browser required.
skill-cleaner
steipete/agent-scripts
Codex/OpenClaw skill audit: live budget, usage, duplicates, compact descriptions.
create-cli
steipete/agent-scripts
CLI UX/spec: args, flags, help, output, errors, config, dry-run.
markdown-converter
steipete/agent-scripts
Markdown conversion: PDF, Office, HTML, data, OCR, audio, ZIP, YouTube.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.