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.
npx agentmods add commands/v11g/codex-review-cc/code-reviewgit clone --depth 1 https://github.com/v11g/codex-review-ccWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.04503 |
| Opus 5 | $0.00000 | $0.02252 |
| Sonnet 5 | $0.00000 | $0.00901 |
| Haiku 4.5 | $0.00000 | $0.00450 |
Grade A, and why
code-review scanned grade A with 0 findings 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 2d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 295 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/codex:code-review — Codex correctness/security/reliability/simplification/performance review
Adversarially review the current branch's implementation diff: a Codex debate over
correctness, security, reliability, simplification, and performance, looping until Codex
approves. Codex is the hard gate. The command never commits — you do. Mechanics live in
tested sr_* helpers; adjudicating findings and editing code is your (the agent's) job.
$ARGUMENTS (optional): [base] ref to diff against (default main).
Every shell block below runs under bash.
codex-lib.shand its helpers use bash arrays and abort under zsh/sh, so each block is wrapped inbash <<'CODEX_SH' … CODEX_SH— it runs under bash even when your default shell is zsh. And because each block runs in a fresh shell (sourced functions and vars do not persist between calls), every block re-resolves and re-sources the lib, then hands values to the next block through a per-repo state file (sr_state_file/sr_state_save/sr_state_load). The shared preamble — resolveLIB, source it,sr_state_load "$STATE"— opens every block.
Phase 0 — Resolve scope
bash <<'CODEX_SH'
# Resolve the plugin's lib + checklists. Order: installed plugin root, project-local
# checkout, a manual ~/.claude install, then the plugin cache (the unset-env
# fallback). First hit wins; CKDIR is its sibling.
LIB=""; CKDIR=""
for d in "${CLAUDE_PLUGIN_ROOT:-}" ".claude/commands/codex" "${CLAUDE_HOME:-$HOME/.claude}/commands/codex" $(printf '%s\n' "${CLAUDE_HOME:-$HOME/.claude}"/plugins/cache/*/codex/* 2>/dev/null | sort -Vr); do
[ -n "$d" ] && [ -f "$d/codex-lib.sh" ] && { LIB="$d/codex-lib.sh"; CKDIR="$d/reference"; break; }
done
[ -n "$LIB" ] || { echo "codex-lib.sh missing — install the plugin or run install.sh"; exit 1; }
. "$LIB" || { echo "codex-lib.sh failed to source"; exit 1; }
command -v codex >/dev/null 2>&1 || { echo "codex CLI not on PATH"; exit 1; }
have="$(codex --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)"
sr_version_ge "${have:-0.0.0}" 0.140.0 || { echo "codex >= 0.140.0 required (have ${have:-none})"; exit 1; }
# Output mode. JSON (preferred): codex --output-schema returns schema-validated JSON,
# so structural parsing collapses to one sr_json_validate call — no fragile text grep.
# Falls back to markdown when no JSON parser (node), no schema file, or the schema is
# not strict-valid for codex (sr_schema_strict_ok) — so a bad schema degrades, not aborts.
# VFN/RFN/IDFN pick the parser so Phases 1.4/1.5 stay mode-agnostic.
SCHEMA=""; [ -n "$CKDIR" ] && SCHEMA="$(dirname "$CKDIR")/schemas/review-output.schema.json"
MODE=markdown; VFN=sr_parse_verdict; RFN=sr_round_findings; IDFN=sr_finding_ids
if sr_have_json && [ -f "$SCHEMA" ] && sr_schema_strict_ok "$SCHEMA"; then
MODE=json; VFN=sr_json_verdict; RFN=sr_json_round_findings; IDFN=sr_json_finding_ids
fi
# args: token 1 = base ref (default main); token 2 = optional design-doc name hint
set -f; set -- ${ARGUMENTS:-}; set +f
BASE="${1:-main}"
SCOPE="$(sr_diff_scope "$BASE")" || { echo "cannot resolve scope vs '$BASE'"; exit 1; }
MB="$(printf '%s' "$SCOPE" | cut -f1)"
BRANCH="$(printf '%s' "$SCOPE" | cut -f2)"
PAYLOAD="$(sr_review_payload "$MB")"
if [ -z "$PAYLOAD" ]; then echo "Nothing to review (no changes vs $BASE)"; exit 0; fi
# design docs (spec + plan) — referenced by path for correctness/spec-compliance, not embedded
DESIGN="$(sr_design_docs "${2:-$BRANCH}")"
SPEC_DOC="$(printf '%s' "$DESIGN" | cut -f1)"
PLAN_DOC="$(printf '%s' "$DESIGN" | cut -f2)"
REPO="$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)")"
LOG="$(sr_log_path "${REPO}-$(sr_root_hash)" "$(sr_sanitize_name "$BRANCH")")"
LOG="${LOG/spec-review-/codex-review-}" # code-review log namespace
DEP="$(sr_audit_summary)"
# Fresh-shell handoff: persist resolved scope for the debate-loop blocks.
STATE="$(sr_state_file code-review)"; : > "$STATE"
sr_state_save "$STATE" LIB CKDIR SCHEMA MODE VFN RFN IDFN BASE MB BRANCH SPEC_DOC PLAN_DOC REPO LOG DEP
echo "Scope: $BASE...HEAD ($BRANCH)"
echo "Mode: $MODE"
echo "Log: $LOG"
echo "Design: ${SPEC_DOC:-(none)} | ${PLAN_DOC:-(none)}"
echo "$DEP"
CODEX_SH
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.
- 2d ago First seen · 295 lines · 0 tokens per session scan A 345104a31cce
code-review is a command published in the GitHub repository v11g/codex-review-cc (6 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,503 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.