codex-review

Runs a scoped one-shot Codex CLI branch review with MCP servers disabled.

Updated Nov 2, 2025
One-click install
npx skills add https://github.com/fx/skills --skill codex-review-fx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codex-review
Source: https://github.com/fx/skills/tree/main/skills/codex-review
Command: npx skills add https://github.com/fx/skills --skill codex-review-fx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Running codex review non-interactively can hang indefinitely when it inherits locally configured MCP servers, and a review without a scope prompt reports work the change deliberately omitted. This Skill encodes the correct invocation so the local pre-PR review pass completes reliably. ## Core Features & Use Cases - Scoped branch review: Builds a Scope Brief prompt (verbatim request, in/out of scope, established facts) and passes it to codex review, since scope flags and a custom prompt are mutually exclusive. - MCP hang prevention: Disables every locally configured MCP server individually by name via codex mcp list --json, treating enumeration failure as a setup failure rather than running unprotected. - Completion contract: The bundled script always ends with a STATUS= line (COMPLETED, DRY_RUN, ERROR) plus CODEX_EXIT=, so callers branch on a sentinel instead of guessing from exit codes. - Use Case: Before opening a pull request, run the script in the background with a scope prompt file; when it finishes, read the findings and triage them per the canonical fx-review procedure. ## Quick Start Ask the agent to run a scoped Codex review of the current branch using the codex-review skill's script with a scope prompt built from your request.

Frequently Asked Questions about codex-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a Codex CLI review of the current branch?▼

Write a scope prompt to a file and pass it to the bundled run-codex-review.sh script, which invokes `codex review` with the prompt. The changes must be committed on a branch so Codex can derive the diff itself.

Why does codex review hang with no output?▼

A non-interactive `codex review` that inherits locally configured MCP servers can block indefinitely on a stalled tool call, since there is no TTY to answer it. The fix is disabling each server individually by name with `-c mcp_servers.<name>.enabled=false`, which the script does automatically.

Can I use codex review --base together with a custom prompt?▼

No. Codex rejects combining scope flags like `--base` with a positional prompt argument. Since the scope prompt is mandatory, the prompt-only invocation is the only correct form, and the script enforces it.

Does `-c 'mcp_servers={}'` disable all MCP servers in Codex?▼

No. The map is merged rather than replaced, so every configured server stays loaded. Each server must be disabled individually by name, enumerated via `codex mcp list --json` rather than by parsing config.toml.

How do I know when a background codex review finished?▼

Read the last line of the log for a `STATUS=` sentinel: COMPLETED means findings are on stdout, ERROR means the review never ran or died, and no STATUS tail means the run is still going or dead. Branch on that line, not the exit code.