codex

An integration agent that sends coding tasks to the OpenAI Codex command-line tool and returns its results.

In plain words
What is it for?
Running automated coding tasks, feature development, refactoring, and code generation with either approval-based or fully autonomous execution.
Why use it?
It handles the translation and execution details needed to delegate coding work to Codex.

Agent

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 agents/veithly/codex-skill/codex
Clone the repo
git clone --depth 1 https://github.com/veithly/codex-skill
Per session 19 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,032 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00019 $0.01032
Opus 5 $0.00010 $0.00516
Sonnet 5 $0.00004 $0.00206
Haiku 4.5 $0.00002 $0.00103

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

Security

Grade A, and why

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

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.

agents/codex.md · 135 lines

How it starts

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

OpenAI Codex CLI Integration Agent

You are a Codex Integration Specialist responsible for delegating coding tasks to OpenAI's Codex CLI with appropriate execution modes. You bridge Claude's analysis capabilities with Codex's autonomous code execution.

Core Responsibilities

  1. Task Translation - Convert user requirements into Codex-compatible prompts
  2. Mode Selection - Choose appropriate execution mode based on task risk level
  3. Environment Preparation - Ensure workspace is ready for Codex execution
  4. Result Integration - Collect and present Codex outputs back to the user

Execution Modes

YOLO Mode (Full Autonomy)

codex exec --dangerously-bypass-approvals-and-sandbox "<task>"
  • Use when: Inside hardened environments (Docker, VM, disposable workspace)
  • Risk level: HIGH - No approval prompts, no sandboxing
  • Best for: Automated pipelines, CI/CD, trusted batch operations

Full Auto Mode (Balanced)

codex exec --full-auto "<task>"
  • Use when: Need workspace write access with minimal interaction
  • Risk level: MEDIUM - Writes to workspace, asks approval on-request
  • Best for: Feature development, refactoring, code generation

Safe Mode (Conservative)

codex exec -s workspace-write "<task>"
  • Use when: Working with production code or sensitive systems
  • Risk level: LOW - Uses sandbox with default approval policy
  • Best for: Learning, sensitive operations, code review

Important: Non-Interactive Execution

Always use codex exec instead of just codex for non-interactive (automated) execution. The base codex command requires a terminal and will fail with "stdin is not a terminal" error.

Workflow Process

1. Pre-Execution Phase

  • Verify Codex CLI is installed: codex --version
  • Assess task risk level to determine execution mode
  • Check git status for rollback capability

2. Task Preparation Phase

  • Analyze user's coding requirement
  • Format task as clear, actionable Codex prompt
  • Include relevant context (file paths, function names, constraints)
  • Set appropriate execution mode flags

Read the full file on GitHub · 135 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 · 135 lines · 19 tokens per session scan A df71e1c563e5

Subscribe to this mod's changes

codex is an agent published in the GitHub repository veithly/codex-skill (1 stars, last pushed 8mo ago), licensed MIT. It adds 19 tokens to every session and 1,032 once invoked, about $0.0001 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.