---
name: codex-review
description: Iteratively reviews and improves an implementation plan with an independent coding agent. Defaults to OpenAI Codex CLI using GPT-6 Astra with high reasoning and a read-only sandbox, but honors any reviewer tool, model, or harness explicitly selected by the user. Use for second-opinion plan reviews, adversarial risk checks, iterative approval gates, or requests to have Codex, Claude, Cursor, or another agent critique a plan before implementation.
title: codex-review
canonical_url: https://skilld.dev/gh/abdurshd/skills/codex-review
last_updated: 2026-10-09T04:30:22.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install abdurshd/skills/codex-review`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/codex-review`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/abdurshd/skills/codex-review) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/codex-review`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/codex-review --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/codex-review --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Iterative plan review

Run a bounded review loop between the active agent and an independent reviewer. The skill name records the default reviewer; it does not lock the workflow to Codex or to a particular host application.

## Reviewer selection

Resolve the reviewer once before round 1, in this order:

1. Use the reviewer tool, CLI, agent, or model explicitly named by the user.
2. Otherwise use a reviewer configured by the current project or session.
3. Otherwise default to OpenAI Codex CLI with `gpt-6-astra`, `model_reasoning_effort="high"`, regular service tier, and read-only access.

Treat host and reviewer as separate choices. Claude Code, Codex, Cursor, or another Agent Skills client may run this workflow while Codex, Claude, Cursor Agent, or another isolated coding agent performs the review.

Never silently replace an explicitly requested reviewer. If it is unavailable, report the missing executable, authentication, model access, or harness capability and stop. If only the default is unavailable, declare the fallback before using the host's standard isolated read-only reviewer.

## Harness-neutral review protocol

Use the host's native isolated-agent capability when it can select the requested reviewer and enforce read-only access. Otherwise invoke the selected reviewer through its authenticated non-interactive CLI.

The reviewer must be able to:

- read the plan and relevant repository context;
- return durable text;
- remain read-only;
- end with exactly `VERDICT: APPROVED` or `VERDICT: REVISE`.

Persistent reviewer sessions are preferred, not required. Resume the exact session when supported. For stateless reviewers, include the previous review, revised plan, and revision summary in the next request so no context is lost.

## Workflow

### 1. Create isolated review artifacts

Create one session-scoped temporary directory using the platform's safe temporary-directory mechanism and assign its absolute path to `REVIEW_DIR`. Keep these files inside it:

- `plan.md`: the current full implementation plan;
- `request-N.md`: the review request for round N;
- `review-N.md`: the reviewer's response for round N.

If no plan exists in the conversation or repository, ask the user what should be reviewed.

### 2. Run round 1

Ask the selected reviewer to inspect `plan.md` plus relevant read-only repository context and evaluate:

1. correctness and goal coverage;
2. risks, edge cases, and regression potential;
3. missing steps or verification;
4. simpler or safer alternatives;
5. security and data-loss concerns.

Require specific, actionable feedback and one exact final verdict.

The default Codex command is:

```bash
codex exec \
  -m gpt-6-astra \
  -s read-only \
  -c 'model_reasoning_effort="high"' \
  -o "$REVIEW_DIR/review-1.md" \
  "Read $REVIEW_DIR/request-1.md and review the plan it references. End with exactly VERDICT: APPROVED or VERDICT: REVISE."
```

Use the user's requested model or command instead when supplied. Capture the exact reviewer session identifier when the tool exposes one; never resume a global “last session” during concurrent work.

### 3. Present and classify the review

Show each round with reviewer identity:

```text
## Plan review - Round N
Reviewer: <tool/model>

<feedback>
```

- `APPROVED`: finish.
- `REVISE`: continue.
- Missing verdict with no actionable concern: treat as approved and note the inference.
- Missing verdict with actionable concerns: treat as revise.
- Five rounds reached: stop and report unresolved concerns.

### 4. Revise the plan

The active agent—not a hard-coded Claude or Codex role—must verify each finding and revise `plan.md`:

- apply confirmed improvements;
- reject stale, incorrect, or requirement-conflicting suggestions with reasons;
- preserve the user's explicit constraints;
- summarize each change for the next reviewer round.

### 5. Re-review

If the reviewer supports session resume, resume the captured session and point it to the revised plan and change summary. For default Codex:

```bash
codex exec resume "$REVIEW_SESSION_ID" \
  -c 'model_reasoning_effort="high"' \
  "Read the revised plan and revision summary in $REVIEW_DIR/request-N.md. Re-review and end with exactly VERDICT: APPROVED or VERDICT: REVISE."
```

If resume is unavailable or fails, start a fresh read-only review using a request packet containing the prior response, the revised plan path, and the revision summary.

### 6. Report and clean up

Report reviewer tool/model, rounds, final verdict, accepted revisions, rebutted findings, and unresolved concerns. Remove only the exact temporary directory created for this review after its path has been verified.

## Rules

- Maximum five rounds.
- Keep every reviewer read-only.
- Never claim approval when unresolved findings remain.
- Do not let reviewer feedback override explicit user requirements.
- Do not require slash-command syntax, a specific subagent API, or a particular host application.
- Default Codex requires an installed and authenticated `codex` CLI; alternative reviewers require their corresponding tool or native harness access.
