Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add anhnguyen0905/codex-mcp/plugin install codex-flowWrote 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.
[](https://agentmods.dev/skills/anhnguyen0905/codex-mcp/preflight)<a href="https://agentmods.dev/skills/anhnguyen0905/codex-mcp/preflight"><img src="https://agentmods.dev/badge/skills/anhnguyen0905/codex-mcp/preflight/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.
<a href="https://agentmods.dev/skills/anhnguyen0905/codex-mcp/preflight"><img src="https://agentmods.dev/badge/skills/anhnguyen0905/codex-mcp/preflight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.02631 |
| Opus 5 | $0.00032 | $0.01316 |
| Sonnet 5 | $0.00013 | $0.00526 |
| Haiku 4.5 | $0.00006 | $0.00263 |
Grade A, and why
preflight 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 today.
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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Preflight (Phase 0 — run FIRST, it is a gate)
Nothing downstream is safe until these pass. Do not interview, plan, or execute until the gate is green.
Step 1 — Health gate
Call mcp__codex__codex_health with { deep: true } ONCE before anything else. The deep input adds
a one-shot read-only codex exec probe and returns execProbe
(ok | quota | model | error | skipped) plus execProbeMessage next to loggedIn; read
execProbe from that single call instead of re-probing later phases.
- Tool call fails / server missing → the MCP server isn't set up. Point the user to the codex-mcp
README install steps (or
node scripts/doctor.mjs), then offer the command's Executor fallback: fix and re-check, or continue with Claude as executor. Never continue silently. loggedIn: false→ tell the user to runcodex login(ChatGPT Plus/Pro/Team, or setOPENAI_API_KEY), then offer the same Executor fallback choice. Proceed only after a re-check showsloggedIn: trueor the user explicitly chose the fallback.execProbe: quotaorexecProbe: model→ logged in but unable to execute. QuoteexecProbeMessageand offer the Executor fallback right away; aquotaormodelprobe result is sufficient on its own and requires NO unhealthy health re-check.execProbe: error→ reportexecProbeMessageverbatim, then offer the same fallback choice.loggedIn: truewithexecProbe: ok(orskipped) → report the Codex version, recordexecutor: codex, and continue.- The analysis lane of the Fast-path gate needs no Codex session and no fallback decision; when its optional Codex second opinion fails, the analysis is delivered Claude-only with the failure named in the "what I verified" note.
Step 2 — Resume check (don't clobber an interrupted run)
If .codex-flow/STATE.md exists, treat it as an interrupted run even when PLAN.md or TASKS.md has
not been created yet:
- Read
.codex-flow/STATE.mdas the resume authority. Its approval fields decide which phases may be skipped; any phase whose approval is not recorded MUST be re-run. The existence of PLAN.md/TASKS.md is NOT proof of approval. - When both
.codex-flow/PLAN.mdand.codex-flow/TASKS.mdexist, runnode "${CLAUDE_PLUGIN_ROOT}/scripts/context-slice.mjs" --resumeand read.codex-flow/RESUME.mdinstead of the raw files. If the helper is unavailable in a standalone install, fall back to reading PLAN.md and TASKS.md directly. If the helper is present but exits non-zero, surface the error to the user and STOP; never use the standalone fallback for a failing helper. When either file does not exist, read only the control files that exist; do not require a missing TASKS.md to resume an earlier phase. - When TASKS.md exists, show its task Statuses. Ask resume vs restart in every case except
phase: complete, which archives and starts fresh without a resume offer (see below). - Before scheduling anything, reconcile every task whose Status is
in-progress. Read its recorded Session line. The resume slice's Task statuses section carries Session content for every in-progress task even though it embeds the full task text only for the first unfinished task; do not assume the other in-progress task blocks are embedded. A launching line may be sequential (- Session: launching (base: <short sha>)) or parallel (- Session: launching (base: <short sha>, worktree: <path>, branch: <name>)). Extract the base sha from either launching form or the completed-session form. Then cross-checkgit log --oneline <base sha>..HEADandgit statusfor changes to the task's declaredFiles:since that base. Report the evidence and ask the user to choose exactly one: continue in the recorded session (when a real session id exists) / review the work as-is / reset to pending. For reset to pending, roll back through the checkpoint commit whencheckpointCommitsis enabled. Never blindly re-execute an in-progress task. phase: complete→ terminal, not resumable. Do NOT offer resume: archive the run's control files to.codex-flow/archive/<timestamp>/and begin fresh, exactly as Restart does. Resume is offered only for a non-completephase.- Resume → first run
node "${CLAUDE_PLUGIN_ROOT}/scripts/flow-state.mjs" check, adding--tasks .codex-flow/TASKS.mdwhenever that file exists so the terminal-status validation runs (node "${CLAUDE_PLUGIN_ROOT}/scripts/flow-state.mjs" check --tasks .codex-flow/TASKS.md); when it reports only missing keys on a legacy file, add them withset(currentTask -,taskStage idle,wave -) and continue; any other violation is surfaced to the user before routing. Then skip only the phases whose approvals STATE.md records, and route from STATE.md's recordedphase. Forphase: execution, enter Phase 4 at the first task not marked done. Before that, first route bytaskStageregardless ofcurrentTask(currentTasknames the task in sequential mode; in parallel mode it is-andwavenames the wave):reviewing→ resume Phase 5 for that task;launchingorexecuting→ run the in-progress reconciliation above before anything else;handoff→ finish Phase 5 step 7's durable handoff (or the wave's Step 3.8);merge-conflict→ surface the conflict to the user and STOP;idle→ the next pending task. Forphase: review, resume Phase 5 completion work; when all tasks are done butphaseis notcomplete, also resume Phase 5 for the final dual review, requirement ID-walk, improvement gate, cost/report delivery gates, and completion write instead of concluding there is no work. For an earlier phase, enter its first unapproved gate. Treat every[verify]block as a hypothesis: confirm it againstgit diffand the current code before relying on it. Record the currentgit rev-parse HEADasresumeHeadand updatephase; apart from the legacy-key backfill above, change no other STATE.md key as part of the resume operation. The reconciliation choice for an in-progress task (continue / review as-is / reset) is made first; thetaskStagerouting then applies to the task as the user left it. - On resume, reuse the report dir recorded under
## Session reportin PLAN.md; create it only if missing. - Restart → archive the old control files that exist to
.codex-flow/archive/<timestamp>/, then begin fresh.
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.
- today Changed · +16 lines 59a619f986a2
- 5d ago Changed · +31 lines 8f7263109212
- 9d ago First seen · 107 lines · 65 tokens per session scan A f6a333e7fc54
preflight is a skill published in the GitHub repository anhnguyen0905/codex-mcp (3 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 2,631 once invoked, about $0.0003 per session on Opus 5. 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 skills, from other repositories
prowler-commit
Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
comet-github
A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.
github-skill
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
re0-merge
Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…
nvca-chart-release
Release NVCA Operator chart changes from the native monorepo source to the vendored Helm chart. Use when updating the vendored NVCA Operator chart, changing NVCA image refs, publishing helm-nvca-operator, or validating the chart against a self-managed control plane.