codex-gate

codex-gate is a skill for Claude Code from Angel45604/the-foreman. It costs 193 tokens per session (12,474 once invoked), scanned A, original, MIT.

An automated review and investigation workflow for Codex. It can check plans, architecture decisions, implementation phases, or pre-PR branches, and can also help find the root cause of a bug.

In plain words
What is it for?
Use it to review planned or completed work, repeatedly check fixes until review issues are resolved, assess architecture or feature decisions, and investigate bugs.
Why use it?
It provides a repeatable second review pass and separates fixable code issues from decisions that need a person. In investigation mode, it diagnoses problems without automatically changing the code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; names the ExitPlanMode tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is api-platform (:9800) runs the API under `nodemon -L`, watching ./projects/api + ./projects/shared..

Part of the the-foreman plugin — 5 skills shipped together

Good fit Use it to review planned or completed work, repeatedly check fixes until review issues are resolved, assess architecture or feature decisions, and investigate bugs.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Angel45604/the-foreman
agentmods
npx agentmods add skills/angel45604/the-foreman/codex-gate

Made for: Claude Code.

Or install the-foreman, the plugin that ships this one along with the rest of its 5 skills.

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 codex-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/angel45604/the-foreman/codex-gate/github.svg)](https://agentmods.dev/skills/angel45604/the-foreman/codex-gate)
Your own site
<a href="https://agentmods.dev/skills/angel45604/the-foreman/codex-gate"><img src="https://agentmods.dev/badge/skills/angel45604/the-foreman/codex-gate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex-gate

Your own site · 80×15
<a href="https://agentmods.dev/skills/angel45604/the-foreman/codex-gate"><img src="https://agentmods.dev/badge/skills/angel45604/the-foreman/codex-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 193 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,474 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00193 $0.12474
Opus 5.5 $0.00077 $0.04990
Sonnet 5.5 $0.00039 $0.02495
Haiku 4.5 $0.00019 $0.01247

Measured 7d ago against content hash 40bfe4f73b2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codex-gate 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 7d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (codex-gate.sh, codex-gate.test.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

> HTTP/`curl`, running tests/evals, or triggering jobs can have real, irreversible side effects (spend
plugin/skills/codex-gate/SKILL.md · 551 lines

How it starts

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

codex-gate — drive Codex as an automated review gate

<skill-dir> in the commands below = the directory containing THIS SKILL.md. Installed as a plugin that is the plugin's skills/codex-gate/ dir; installed as a personal skill it is ~/.claude/skills/codex-gate.

A user-global, local-only gate. The wrapper <skill-dir>/codex-gate.sh runs ONE Codex review (config-isolated, --sandbox read-only) and prints a one-line JSON status: {outcome, threadId, round, verdictPath, runDir, blockers, agentFixableBlockers, decisionBlockers, summary} (plus an additive coverage object for prepr/prepr-delta) where outcome ∈ APPROVE | BLOCK | INFRA_ERROR | OVERFLOW. YOU are the loop driver: read the status + the per-round verdict file, fix agent_fixable blockers, re-review via resume, and converge.

The investigate mode is a sibling workflow that reuses this exact machinery for a different job — root-causing a bug, not judging a change — and emits its own status. It does NOT review or auto-fix; see Investigation mode below.

Contract + Phase-0 pins: <skill-dir>/README.md. The contract source of truth is README.md (sibling of this file).

When the user invokes /codex-gate <mode> [args]

Run the matching mode and drive the loop below. Modes:

  • plan <file> — review a plan doc before ExitPlanMode. Code tier when run inside a git repo (so Codex can cross-check the plan against repo canon via read-only shell); doc tier when not in a repo.
  • bundle <dir> — review a PDR/ADR/execution-plan bundle (code tier; Codex reads repo canon).
  • phase-start <id> — snapshot the working tree BEFORE an implementation phase. Run this in the binding (before dispatching the implementer); it prints RUNDIR= / PHASE_HEAD= and writes nothing reviewable.
  • phase-review <id> — review just that phase's changes after the full Claude review bundle.
  • question <file> — ground a DECISION (architecture/feature) through Codex BEFORE you put it to the user via AskUserQuestion. Not a review gate — it emits an advisory GROUNDED status, not APPROVE/BLOCK. Code tier when run inside a git repo (Codex grounds in real code/canon); doc tier when not in a repo.
  • investigate <brief> — root-cause a bug through Codex (a SIBLING of the review gate, NOT a review). Drives Codex as an independent read-only investigator bound by a safety contract in the brief; emits a root-cause status, never APPROVE/BLOCK, never auto-fixes. See Investigation mode below.
  • prepr [base] [--multi] — whole-branch review before /commit-push-pr. --multi opts into multi-LENS review (see below) — the same diff judged through several specialized reviewer lenses.
  • prepr-delta [base] [--multi] — since-reviewed delta of prepr: review ONLY files that are unreviewed OR changed-since-reviewed (their current git hash-object is not an approved-reviewed sha in the review ledger). Files whose hash still matches a prior approval are listed (path + sha + verdict ref) in an explicit ALREADY REVIEWED & UNCHANGED section (proof, not silent omission). If every branch file is already reviewed+unchanged, it APPROVEs without calling Codex. Use it when a prepr OVERFLOWed (huge diff) but most of the surface was already approved in earlier phases, or to re-PR after a small follow-up without re-reviewing the whole branch. Shares the budget guard + lean packet
    • OVERFLOW path with prepr; same [base] default (merge-base chain).
  • config — report the gate's effective dials + source/runtime parity. Not a gate and not a review: a read-only diagnostic that calls Codex zero times, creates no run dir, and exits 0. See below. There is no mode that writes anything outside ~/.claude/codex-gate/ — resolving a reported drift is a manual copy the owner runs, see "Syncing the drift away" below.

Read the full file on GitHub · 551 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. 7d ago Changed · +26 lines 40bfe4f73b2b
  2. 2mo ago First seen · 525 lines · 193 tokens per session scan A c2ba4f5ad73e

Subscribe to this mod's changes

codex-gate is a skill published in the GitHub repository Angel45604/the-foreman (2 stars, last pushed 6d ago), licensed MIT. It adds 193 tokens to every session and 12,474 once invoked, about $0.0008 per session on Opus 5.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-31.

Related

Other skills, from other repositories

sync-bridge

Reviews and guides Chromium Sync Model API (DataTypeSyncBridge) implementations, including DataTypeStore persistence and forwards/backwards compatibility for sync specifics. Use when implementing or reviewing a DataTypeSyncBridge subclass, DataTypeStore usage, sync metadata persistence, conflict resolution, or…

chromium/chromium · 109 tokens

sync-model-processor

Reviews changes to Chromium Sync model internals in components/sync/model/, including ClientTagBasedDataTypeProcessor, ClientTagBasedRemoteUpdateHandler, ProcessorEntity, ProcessorEntityMetadata, and ProcessorEntityTracker. Use when modifying or reviewing processor state transitions, entity metadata tracking, conflict…

chromium/chromium · 98 tokens

adversarial-reviewer

Stress-test a code change for concrete correctness defects, unsafe assumptions, and failure modes. Use when the user explicitly asks for an adversarial review, a deep bug hunt, or to tear a change apart, or to check your own change before submitting it. Do not use for ordinary review, style feedback, or general…

emdash-cms/emdash · 72 tokens

gsd-ns-review

Invoke this Pi skill with /skill:gsd-ns-review.

open-gsd/gsd-core · 16 tokens

gitnexus

A code-graph analysis add-on for examining an existing codebase, including symbols, call paths, execution flows, and effects across repositories. It can query GitNexus through its command-line or MCP interfaces.

hashgraph-online/awesome-codex-plugins · 58 tokens

issue

Use when starting a chain from a GitHub issue — turning an issue URL or number into a triaged, planned, dispatched, and reviewed pull request. Classifies the thread (bug → root-cause discipline, feature → plan chain, question → drafted reply), synthesizes a spec from the issue's own acceptance criteria, then runs the…

jeremylongshore/tons-of-skills-marketplace · 115 tokens