review-codex

review-codex is a command for Claude Code from 0xUXDesign/ai-codebase-boilerplate. It costs 16 tokens per session (1,834 once invoked), scanned A, original, MIT.

A command that sends a separate OpenAI model an adversarial security review of changes on the current Git branch. It first checks for an API key and whether there are changes to review.

In plain words
What is it for?
Use it to review the current branch for security weaknesses, gather codebase context, and receive a cold-start second opinion.
Why use it?
A second model can provide another perspective on security issues and may spot problems missed during the first review. It requires an OpenAI API key and a branch with changes compared with main.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/0xuxdesign/ai-codebase-boilerplate/review-codex
Clone the repo
git clone --depth 1 https://github.com/0xUXDesign/ai-codebase-boilerplate

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for review-codex

README.md
[![agentmods](https://agentmods.dev/badge/commands/0xuxdesign/ai-codebase-boilerplate/review-codex.svg)](https://agentmods.dev/commands/0xuxdesign/ai-codebase-boilerplate/review-codex)
Your own site
<a href="https://agentmods.dev/commands/0xuxdesign/ai-codebase-boilerplate/review-codex"><img src="https://agentmods.dev/badge/commands/0xuxdesign/ai-codebase-boilerplate/review-codex.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,834 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.01834
Opus 5 $0.00008 $0.00917
Sonnet 5 $0.00003 $0.00367
Haiku 4.5 $0.00002 $0.00183

Measured 4d ago against content hash d8bc29c12641, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

review-codex scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Call the Chat Completions API via curl. Use the Bash tool's `timeout` parameter (300000ms / 5 minutes).
template/.claude/commands/review-codex.md · 202 lines

How it starts

The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are orchestrating an adversarial security review of the current branch using an OpenAI model. Claude hydrates the prompt with codebase context, then dispatches to a different model for a cold-start review — different model, different blind spots.

Phase 0: Prerequisites

Run these checks sequentially. Stop at the first failure.

  1. Check if OPENAI_API_KEY is set:

    echo "${OPENAI_API_KEY:+set}"
    

    If NOT set, print:

    review-codex: OPENAI_API_KEY not set.
    
    To use this command:
      export OPENAI_API_KEY=sk-...
    
    Or add it to your shell profile (~/.zshrc, ~/.bashrc).
    This command requires an OpenAI API key to dispatch reviews to a different model.
    

    STOP.

    If set:

    • API_BASE="https://api.openai.com/v1"
    • MODEL="gpt-4.1" (or override with REVIEW_CODEX_MODEL env var if set)
    • Print: Backend: OpenAI API (direct)
  2. Get the diff stat:

    git diff main --stat
    

    If empty (no changes vs main), print:

    review-codex: No changes to review (branch matches main).
    

    STOP.

  3. Print header:

    Review-Codex: <branch> @ <directory> (<model>)
    

    Use git branch --show-current and pwd for the values.

Phase 1: Gather Context

Collect all of the following. Run independent steps in parallel where possible.

1a. Git data

  • git diff main — full diff (save to variable for Phase 2)
  • git diff main --name-only — affected file list

1b. Codebase reconnaissance (best-effort)

Search the codebase for context about the changed areas:

  1. Read CLAUDE.md if it exists — extract architecture section and any security rules
  2. For the most-changed files, read surrounding context (imports, module structure)
  3. If Pharaoh MCP tools are available, use get_codebase_map and get_blast_radius on the most-changed functions

1c. Large diff handling

If the diff exceeds 2000 lines:

  • Filter to only security-relevant files: anything in paths containing auth, crypto, db, api, middleware, config, token, session, oauth, webhook, secret, key, password, login, permission, tenant, admin, or handler/route files.
  • Print a note: Large diff (N lines). Filtered to M security-relevant files. Run on a smaller branch for full coverage.
  • Use the filtered diff for the prompt.

Read the full file on GitHub · 202 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 202 lines · 16 tokens per session scan A d8bc29c12641

Subscribe to this mod's changes

review-codex is a command published in the GitHub repository 0xUXDesign/ai-codebase-boilerplate (11 stars, last pushed 5mo ago), licensed MIT. It adds 16 tokens to every session and 1,834 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.