codex

A coding-agent add-on that delegates programming work to the OpenAI Codex command-line tool through non-interactive shell commands.

In plain words
What is it for?
Use it for feature work, bug fixes, refactoring, tests, migrations, code reviews, and other multi-step repository changes.
Why use it?
It gives the agent a prescribed way to handle larger coding tasks while choosing safer settings for implementation, review, or diagnosis.

Skill for Claude CodeCodex

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 skills/ldclabs/anda-bot/codex
Any agent
npx skills add ldclabs/anda-bot --skill codex
Clone the repo
git clone --depth 1 https://github.com/ldclabs/anda-bot

Made for: Claude Code, Codex.

Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,745 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.00095 $0.01745
Opus 5 $0.00048 $0.00873
Sonnet 5 $0.00019 $0.00349
Haiku 4.5 $0.00010 $0.00175

Measured 2d ago against content hash 395384376c8a, 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 2d 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.

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.

skills/codex/SKILL.md · 163 lines

How it starts

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

Codex CLI Delegation for Agent's Shell Tool

This skill is written for shell tool. Assume there is no PTY. Do not use interactive Codex TUI flows.

Non-Interactive Rules

  • Use codex exec for every delegated task.
  • Do not run bare codex, codex resume, app-server flows, desktop app flows, tmux, or commands that wait for keyboard input.
  • Do not pass PTY-only options. If older guidance says pty=true, ignore it in the agent.
  • Place global flags after the subcommand, for example codex exec --cd "$PROJECT" ....
  • Prefer --sandbox workspace-write --ask-for-approval never for implementation tasks. This keeps edits inside the workspace and avoids approval prompts that the shell cannot answer.
  • Use --sandbox read-only for review, diagnosis, or planning tasks.
  • Avoid --dangerously-bypass-approvals-and-sandbox / --yolo unless the user explicitly asks for an unsafe fully trusted run.
  • Do not install Codex automatically unless the user asked you to. If missing, fall back to Claude Code or work directly.

Selection Policy

Prefer Codex first for coding work. Before invoking it, run a quick availability check:

if command -v codex >/dev/null 2>&1; then
  codex --version
  codex login status >/dev/null 2>&1
elif command -v claude >/dev/null 2>&1; then
  echo "Codex is unavailable; use the claude-code skill instead."
else
  echo "Neither codex nor claude is installed; continue directly or ask the user to install one."
fi

Interpret the result:

  • codex missing: use the claude-code skill if claude is installed, otherwise solve with available tools or ask the user to install Codex.
  • codex login status fails: tell the user to run codex login (or configure their API key) and use Claude Code if available.
  • Both CLIs available: keep Codex as the default unless the user specifically asked for Claude Code.

Preflight Checklist

Before delegating:

  1. Identify the project root: git rev-parse --show-toplevel 2>/dev/null || pwd.
  2. Check the current diff with git status --short so user-owned changes are visible.
  3. Convert the user's request into a concise task prompt with success criteria, files or areas to inspect, constraints, and expected verification commands.
  4. Decide sandbox mode: workspace-write for edits, read-only for reviews.
  5. Decide whether the task is small enough to do directly. Use Codex for broad, multi-file, uncertain, or test-heavy coding work.

Read the full file on GitHub · 163 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. 2d ago First seen · 163 lines · 95 tokens per session scan A 395384376c8a

Subscribe to this mod's changes

codex is a skill published in the GitHub repository ldclabs/anda-bot (23 stars, last pushed 24d ago), licensed Apache-2.0. It adds 95 tokens to every session and 1,745 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens