codex

A command that sends a user's prompt to the OpenAI Codex command-line tool and returns its result.

In plain words
What is it for?
Use it for code review, verification, comparisons, documentation checks, or other project tasks that benefit from a second coding agent.
Why use it?
It lets Claude Code delegate a task to Codex after checking that Codex is installed and the request is complete.

Command

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/dropfan/claude-code-plugins/codex
Clone the repo
git clone --depth 1 https://github.com/DropFan/claude-code-plugins
Per session 13 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,366 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00013 $0.01366
Opus 5 $0.00006 $0.00683
Sonnet 5 $0.00003 $0.00273
Haiku 4.5 $0.00001 $0.00137

Measured yesterday against content hash 052e4426bd00, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

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

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

grep '^model' ~/.codex/config.toml 2>/dev/null | head -1 | sed 's/.*= *"\?\([^"]*\)"\?/\1/'
plugins/codex-bridge/commands/codex.md · 119 lines

How it starts

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

Context

  • Working directory: !pwd
  • Plugin root: ${CLAUDE_PLUGIN_ROOT}
  • Codex installed: !codex --version 2>&1 || echo "NOT INSTALLED"

Task

Act as an orchestration layer: understand the user's intent, gather relevant context, compose a self-contained prompt, send it to Codex, and analyze the result.

User request: $ARGUMENTS

Step 1: Pre-checks

  1. If Codex is not installed (version shows "NOT INSTALLED"), tell the user: "Codex CLI is not installed. Run npm install -g @openai/codex to install, then codex login to configure your API key." Stop here.
  2. If $ARGUMENTS is blank, ask the user what they want Codex to do. Provide 2-3 example prompts based on the current project context (e.g., files recently discussed). Do not proceed with an empty prompt.

Step 2: Understand Intent

Analyze $ARGUMENTS and resolve any ambiguous or contextual references:

  • Resolve vague references — "that function", "the file we discussed", "this bug" → look back at conversation history to identify specific file paths, function names, or code snippets.
  • Identify the task type — analysis, verification, comparison, documentation review, etc.
  • Determine scope — which files, directories, or code regions are relevant.

If a reference cannot be resolved from conversation context, ask the user for clarification rather than guessing.

Step 3: Collect Context

Based on the resolved intent, gather only the directly relevant context. Use these tools as needed:

Need Action
File content discussed in conversation Read key files or snippets (keep to relevant sections)
Recent changes git diff --stat, git diff <file> for specific files
Project structure ls relevant directories
Git state git status --short, git log --oneline -5
Current branch git branch --show-current

Limits: Collect only what Codex needs to do the job. Total context should not exceed ~200 lines. Prefer targeted snippets over full file dumps.

Read the full file on GitHub · 119 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. yesterday First seen · 119 lines · 13 tokens per session scan B 052e4426bd00

Subscribe to this mod's changes

codex is a command published in the GitHub repository DropFan/claude-code-plugins (7 stars, last pushed 26d ago), licensed MIT. It adds 13 tokens to every session and 1,366 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.