codex

codex is a command for coding agents from chrisblattman/claudeblattman. It costs 24 tokens per session (673 once invoked), scanned C, original, MIT.

A command that sends one coding question to Codex, another AI coding model, and returns its answer as a second opinion. It is read-only and does not edit files.

In plain words
What is it for?
Use it to ask Codex a single question about code or a technical decision. Do not use it for confidential material unless it has been removed and the user has explicitly approved sending the prompt.
Why use it?
It can provide an additional view on a coding question when one answer is not enough. It also requires a privacy check and confirmation because the prompt is sent to another AI service.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the starter-kit plugin — 3 skills, 2 commands, 4 agents shipped together

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/chrisblattman/claudeblattman/codex
Clone the repo
git clone --depth 1 https://github.com/chrisblattman/claudeblattman

Or install starter-kit, the plugin that ships this one along with the rest of its 3 skills, 2 commands, 4 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/chrisblattman/claudeblattman/codex.svg)](https://agentmods.dev/commands/chrisblattman/claudeblattman/codex)
Your own site
<a href="https://agentmods.dev/commands/chrisblattman/claudeblattman/codex"><img src="https://agentmods.dev/badge/commands/chrisblattman/claudeblattman/codex.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 673 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00024 $0.00673
Opus 5 $0.00012 $0.00336
Sonnet 5 $0.00005 $0.00135
Haiku 4.5 $0.00002 $0.00067

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

Security

Grade C, and why

codex scanned grade C 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

10. **Clean up.** Remove the temp directory (`rm -rf <rundir>`).
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • gemini — 89% identical, 26 lines differ
plugins/starter-kit/commands/codex.md · 39 lines

How it starts

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

/codex — one-shot Codex query

Send the user's request to the Codex CLI and relay the answer. One question, one reply, read-only — Codex edits nothing.

Steps

  1. Privacy check (required, every time). Sending this question transmits its content to another AI service. If the request or any pasted content includes confidential records, personal contact details, research-participant or human-subjects data, unpublished sensitive material, or anything the user wouldn't paste into a public website — do NOT send it. Explain why in one sentence and offer either a Claude-only answer or a redacted version the user approves first.

  2. Explicit send confirmation (required, every time). If the privacy check passes, ask: "Send this prompt to Codex for a second opinion? (yes/no)" Proceed only if the user answers yes. If they answer no or do not answer clearly, stop and offer a Claude-only answer.

  3. Check it's enabled. Read ~/.claude/starter-kit/engines.json. If the file is missing, unparseable, or codex.available is not true, print exactly this and stop:

    Running on Claude only — that's the normal setup and everything here works. (Have ChatGPT or Gemini? Run /kit-setup to plug them in.)

  4. Re-check the binary. Run command -v codex. Not found → print the same note and stop.

  5. Make a private workspace. Run mktemp -d once and use the directory it prints (below: <rundir>) for both files. Never use predictable fixed paths like /tmp/codex-prompt.txt.

  6. Write the prompt to <rundir>/prompt.txt with the Write tool (NOT echo or a heredoc — shell quoting mangles multi-line prompts). Content: the user's request, verbatim. If empty, ask one line: "What should I ask Codex?"

  7. Run the wrapper (it picks the best available model and falls back automatically — never call codex exec directly):

    bash "${CLAUDE_PLUGIN_ROOT}/scripts/codex-run.sh" <rundir>/reply.txt < <rundir>/prompt.txt
    

    Run in the foreground and wait — it can take a minute or two.

Read the full file on GitHub · 39 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 · 39 lines · 24 tokens per session scan C b5ba74ea8c0a

Subscribe to this mod's changes

codex is a command published in the GitHub repository chrisblattman/claudeblattman (454 stars, last pushed 2mo ago), licensed MIT. It adds 24 tokens to every session and 673 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.