codex-cli

Guidance for using Codex CLI, a separate coding agent running on the same computer, to review or carry out work. It explains when a second model is worth the time and cost.

In plain words
What is it for?
Use it to decide when to request an independent code review or hand off a bounded implementation task to Codex CLI, including choices about the model, reasoning effort, and sandbox access.
Why use it?
It helps avoid relying only on the model that wrote the code, especially when the change is complex or important. It also clarifies how to limit runs and handle permissions.

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

Made for: Claude Code, Codex.

Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,639 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.00096 $0.02639
Opus 5 $0.00048 $0.01319
Sonnet 5 $0.00019 $0.00528
Haiku 4.5 $0.00010 $0.00264

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

Security

Grade B, and why

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

Reads agent configuration directoriesmediumAgent snooping

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

in `~/.codex/config.toml`. If the binary is missing, auth has expired, or a
skills/codex-cli/SKILL.md · 195 lines

How it starts

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

Codex CLI

Codex is a second agent on the same machine, with its own model behind it. That is the entire reason to reach for it: a model that did not write the code has no memory of intending it to work. Everything below follows from that one asymmetry — who wrote it, who reads it, and how much thinking each step is worth paying for.

This skill is for the supervising agent, not for Codex. If you are Codex, this does not apply — calling yourself buys nothing but a second opinion from the same mind. Claude Code is the intended caller.

It also assumes the machine is already set up: codex on PATH, the user logged in, and whatever MCP servers and tools they want available configured in ~/.codex/config.toml. If the binary is missing, auth has expired, or a run dies on permissions, report that plainly and stop — quietly falling back to doing it yourself hides the fact that the review the user asked for never happened.

Concrete flags belong to codex --help, which is authoritative and moves faster than this file. What follows is the judgment.

When to reach for it

Every invocation is a second model spending the user's money and your wall-clock time. It earns that when the problem is hard enough that another model changes the outcome — not as a reflex after every edit. Doing the work yourself and checking it with the project's own tests remains the normal path.

  • When the user asks for it. They have already made the call; don't re-litigate it. Match the model and effort to the task and go.
  • After writing something complex or expensive to get wrong. Your own review of your own diff is the weakest review available, because you are checking the code against the intent you already have in your head rather than against what it says. That weakness only matters when the defect would be costly — concurrency, migrations, security-adjacent paths, platform assumptions, anything on a compatibility surface. A routine edit that the suite already covers is not worth a review pass. Counter-example: an agent changed one side of a path comparison to a normalized form and left the other side platform-native; every test it wrote passed, because it wrote them against the same wrong mental model.
  • When a demanding change is bounded well enough to describe in a prompt. A hand-off is worth it when you can state the goal, the files, and the acceptance check in a paragraph. That paragraph is also the honest test of whether you understand the change — if you cannot write it, delegating it just moves the confusion downstream. What "bounded" means is scoped-change, and it binds Codex exactly as it binds you: pass the boundary along in the prompt, because Codex cannot infer where the user drew it.
  • When the work is long, mechanical, and verifiable. Wide renames, repetitive migrations, and mass edits with a green suite proving them buy throughput rather than insight, and they are cheap to check.
  • When you are stuck. After two failed attempts on the same defect, a third attempt from the same context tends to repeat the second. A fresh agent with the symptom and the reproduction, and none of your accumulated theory, is a better use of the next few minutes.

Read the full file on GitHub · 195 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 · 195 lines · 96 tokens per session scan B cc72db26486e

Subscribe to this mod's changes

codex-cli is a skill published in the GitHub repository scarletkc/agents (189 stars, last pushed 5d ago), licensed Apache-2.0. It adds 96 tokens to every session and 2,639 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

map-debug

Structured MAP debugging via task-decomposer, actor, and monitor agents. Use when reproducing a bug, isolating a regression, or diagnosing an error with specialized agents — including failing or flaky tests (pytest AssertionError), crashes and segmentation faults, memory-corruption or memory errors in native/C…

azalio/map-framework · 213 tokens

map-learn

Capture reusable lessons after a completed MAP workflow. Use when a MAP run has finished and you want rules written to .claude/rules/learned/ from a workflow summary or handoff. Do NOT use during active implementation.

azalio/map-framework · 51 tokens

map-task

Execute a single subtask from an existing MAP plan via Actor and Monitor. Use when map-plan has decomposed work and you want fine-grained control over one subtask. Do NOT use without an existing plan; run map-plan first.

azalio/map-framework · 51 tokens

map-explain

Deep walkthrough of code, a diff, or the whole project — problem, entities, flow, load-bearing-line rationale, side effects, assumptions, breakage. Use when learning unfamiliar code or auditing a diff.

azalio/map-framework · 46 tokens

map-auto

Single-entry autonomous autopilot: routes a task through the existing MAP workflows via routetask, then drives the selected chain (map-plan -> map-efficient -> map-check -> map-review, as routed) end-to-end to a committed feature branch in one session, auto-approving routine workflow-control holds and hard-stopping on…

azalio/map-framework · 165 tokens

map-skill-eval

Evaluate a /map- skill's trigger accuracy and cost. Use when asked to measure skill trigger accuracy, run an eval-set, or check token/duration cost via mapify skill-eval. Do NOT use to plan or implement; use map-plan or map-efficient.

azalio/map-framework · 61 tokens