Skip to content
Skills Library
AI & agents · Review & audit

codex-review

/codex-review

Get a second-opinion code review from OpenAI Codex via the `codex-run` CLI — dispatch it, wait on it correctly, verify what it found, and post it only when a human says so. Use ONLY when the user names Codex explicitly: "review this with codex", "codex review", "codex-review", "get a second opinion from codex", "what does codex think of this PR". Handles both a GitHub PR (`codex-run review`) and a local change with no PR (`codex-run review-local`, rendered through preview-diff). A plain "review this PR", with no mention of Codex, belongs to pr-shepherd instead — as does round two, once the aut

Repository
agent-tools ↗
Licence
MIT
Last repository change
12.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 12.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Get a second-opinion code review from OpenAI Codex via the `codex-run` CLI — dispatch it, wait on it correctly, verify what it found, and post it only when a human says so. Use ONLY when the user names Codex explicitly: "review this with codex", "codex review", "codex-review", "get a second opinion from codex", "what does codex think of this PR". Handles both a GitHub PR (`codex-run review`) and a local change with no PR (`codex-run review-local`, rendered through preview-diff). A plain "review this PR", with no mention of Codex, belongs to pr-shepherd instead — as does round two, once the aut

Triggers from the description

review this with codexcodex reviewcodex-reviewget a second opinion from codexwhat does codex think of this PRreview this PR
Original author description

Get a second-opinion code review from OpenAI Codex via the `codex-run` CLI — dispatch it, wait on it correctly, verify what it found, and post it only when a human says so. Use ONLY when the user names Codex explicitly: "review this with codex", "codex review", "codex-review", "get a second opinion from codex", "what does codex think of this PR". Handles both a GitHub PR (`codex-run review`) and a local change with no PR (`codex-run review-local`, rendered through preview-diff). A plain "review this PR", with no mention of Codex, belongs to pr-shepherd instead — as does round two, once the aut

How it works

  1. When this skill is the wrong one
  2. Dispatch
  3. Waiting: background, always
  4. The run directory
  5. Verify every finding before acting on it
  6. Posting needs an explicit go-ahead
  7. What the checkout is, and is not
  8. Budget
  9. Stopping to ask
Original SKILL.md headings · 136 lines, 956 words
SKILL.md preview
---
name: codex-review
description: >-
  Get a second-opinion code review from OpenAI Codex via the `codex-run` CLI —
  dispatch it, wait on it correctly, verify what it found, and post it only when
  a human says so. Use ONLY when the user names Codex explicitly: "review this
  with codex", "codex review", "codex-review", "get a second opinion from
  codex", "what does codex think of this PR". Handles both a GitHub PR
  (`codex-run review`) and a local change with no PR (`codex-run review-local`,
  rendered through preview-diff). A plain "review this PR", with no mention of
  Codex, belongs to pr-shepherd instead — as does round two, once the author has
  addressed the findings.
---

# Codex review — a second opinion, verified before it lands

`codex-run` drives the Codex CLI non-interactively and leaves the review on disk,
so this session can dispatch it, wait, read it, check it, and decide what to do.
Full CLI surface: `codex-run/README.md`. Machine-local setup, the sandbox
details, and the running "things that bit" list live in
`~/projects-new/project-docs/docs/agent-tools/2026-09-09-codex-run-local-ops.md`
— read that rather than re-deriving them here.

## When this skill is the wrong one

- **"Review PR #N"** with no mention of Codex → `pr-shepherd`. Don't offer a
  Codex run as a substitute; it costs 5–8 minutes and a big token window.
- **Round two** — the author pushed fixes and wants them checked → `pr-shepherd`,
  verified against the saved `review.md`. That file on disk is the point. Do not
  spend a second Codex run re-reviewing what you already have a review of.

## Dispatch

```bash
codex-run review <project> <pr>                    # a GitHub PR
codex-run review-local <project> <base> <head>     # no PR; rendered via preview-diff
```

`<project>` is a path, a bare directory name resolved under `$CODEX_RUN_ROOTS`, or
a GitHub `owner/name`. Both commands go to the background and print a run id.

Hand a PR review a **clean worktree** rather than the canonical checkout, which is
routinely on someone else's dirty branch — concurrent reviews need one each.

## Waiting: background, always

```bash
codex-run wait <id> --timeout 1500     # run this as a BACKGROUND Bash call
```

Two failure modes to avoid:

- **Never poll in a loop.** Dispatch, then one background `wait`. The harness
  completion notification is what wakes the session.
- **Never run `wait` in the foreground.** Reviews outlast the foreground tool
  timeout, so the call is killed and the exit code — the whole point — is lost.

Exit codes: **0** done, **1** failed (read `stderr.log`), **124** timed out with
the run still going (it is not dead; `wait` again or check `status`).

## The run directory

`~/.local/share/codex-run/runs/<id>/` — `meta.json`, `prompt.md`, `events.jsonl`,
`stderr.log`, `status`, and the output file.

**`status` is the completion signal, not the output file.** It holds
`created` → `running` → `done` | `failed`, and is written after codex exits;
`done` requires both a zero exit and a non-empty output. `codex-run wait` polls
exactly this. Watching the output file instead cannot separate a finished run
from a failed one, and codex writes that file itself, before the status settles.

```bash
RD=~/.local/share/codex-run/runs/<id>
cat "$RD/status"
cat "$RD/$(jq -r .output "$RD/meta.json")"   # review.md for reviews, result.md otherwise
```

## Verify every finding before acting on it

Codex is good and it is not always right: true findings and a confidently wrong
one can arrive in the same review.

**First check, every time: does the diff actually contain the file the finding
names?** A false positive can name a file the branch never touches.

```bash
git diff --name-only <base>...<head>     # three dots: merge base, what really changed
```

A finding can also be wrong about code that is genuinely in the diff.

Then confirm the mechanism in the code before you repeat the finding as fact.
Report what survives, and say plainly which findings you discarded and why.

## Posting needs an explicit go-ahead

```bash
codex-run post <id>              # posts review.md as a PR review via gh
codex-run post <id> --force      # only with a stated reason
```

Never post unprompted. `post` reads `review.md` from disk, so the pause is there
for a human to edit the review first — that is the design, not an oversight. It
resolves the verdict before dispatch and downgrades to `--comment` on the user's
own PRs. It refuses when the PR head has moved since the review, because a
verdict would then be attached to code nobody read; `--force` overrides that and
needs a reason you can state.

## What the checkout is, and is not

The directory you pass is **context and caches, not the thing under review.**
Codex works with cwd set to that checkout (`codex exec -C "$dir"`) and reads the
PR over the network with `gh` — description, diff, CI, existing comments. Nothing
is checked out into your tree, which is why the checkout stays on whatever branch
it was on with no modifications.

When Codex wants to *run* something it materializes the head elsewhere — a
temporary clone under `/tmp`, or a `git archive` — so **it will not mutate your
working tree.** Verified: it does this in roughly a quarter of review runs, and
never issues `git worktree add`.

One thing to know when you hand it a linked worktree: that worktree's git
metadata lives in the main repo's `.git`, outside the workspace-write sandbox.
Dispatching commands pass `--add-dir "$(git rev-parse --git-common-dir)"` so a
handed worktree can check out the branch it is reviewing (without it, checkout
dies on `index.lock`). That flag does not reach `post`, which resumes
the thread rather than starting one: `codex exec resume` accepts neither
`--add-dir` nor `-s/--sandbox`, only `-c`.

When Codex does hit a sandbox block it routes around rather than asking, because
`codex exec` has **no approval mode at all** — `-a/--ask-for-approval` exists
only on the interactive `codex`, so there is nobody for a non-interactive run to
ask. The Codex Desktop app runs `on-request` ("Approve for me"), which is why the
same operation can succeed there after a prompt and look like a codex-run-only
problem.

## Budget

Reviews take **5–8 minutes** and **0.6M–1.4M input tokens**, overwhelmingly
cached. `codex-run limits` prints the 5h and weekly windows; check it before
dispatching a batch.

## Stopping to ask

Stop and ask rather than guessing when: the project or base/head is ambiguous;
`wait` returns 124 twice; the run is `failed` and `stderr.log` is not
self-explanatory; a finding contradicts something you verified; or posting would
be the first GitHub write of the session.

Versions

RepositoryScoreLicence
This page · mparrett/agent-tools100MIT
augchan42/inkstone100MIT
ClickHouse/ClickHouse100Apache-2.0
smirnov-labs/claude-skills100MIT
FrancoStino/opencode-skills-collection100MIT
closedloop-ai/claude-plugins100Apache-2.0
arjunrajlaboratory/mycelium100MIT
Phoenixn82/ai-workflow-kit100MIT
jscraik/Agent-Skills100Apache-2.0

Database snapshot: 13.11.2026 · package version 4a61649638b7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90codex
    Ask OpenAI's Codex CLI for help — a second opinion, a code review or a delegated task. Use when the user says "/codex", "ask Codex", "have Codex do it" or "second opinion".
  • 100codex
    Run OpenAI Codex CLI (via AWS Bedrock) non-interactively to get a second opinion, review a diff, or delegate a task. Use when the user asks to "run codex", "ask codex", or get a Codex review/answer.
  • 100second-opinion
    Use when the user wants a second opinion or an outside review from OpenAI's GPT through the Codex CLI — phrases like "second opinion", "ask ChatGPT", "ask GPT", "ask Codex", "review with GPT", "what would GPT say", in any language. GPT only reads and answers; Claude shows its…
  • 100codex-plan-review
    Get a second opinion on your current implementation plan by sending it to Codex for independent review. Use after brainstorming, after writing a plan, or when you want to iterate on a plan before execution. Triggers on 'get a second opinion', 'review plan with codex', 'codex…
  • 100second-opinion
    Get a second opinion from another AI model (currently OpenAI models, via the codex CLI) on a design decision, a stubborn bug, a code review, or any question where an independent take is valuable. Use only when the user explicitly asks for one -- "get a second opinion", "ask…
  • 95codex-exec
    Run OpenAI Codex CLI non-interactively to execute tasks, generate code, or get a second opinion. Use this skill whenever the user says "run codex", "ask codex", "codex exec", "have codex do", "send to codex", "pipe to codex", or wants to delegate a task to Codex for a second…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.