codex

codex is a skill for Claude Code, Codex from majiayu000/spellbook. It costs 38 tokens per session (2,001 once invoked), scanned A, original, MIT.

A guide for running the Codex command-line tool, which lets an agent analyze, refactor, or edit code from a terminal.

In plain words
What is it for?
Use it to run Codex tasks in a repository, including code analysis, refactoring, and automated edits.
Why use it?
It helps choose safe command options, verify that Codex is installed, and continue previous sessions correctly.

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

Made for: Claude Code, Codex.

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/skills/majiayu000/spellbook/codex.svg)](https://agentmods.dev/skills/majiayu000/spellbook/codex)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/spellbook/codex"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/codex.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,001 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.00038 $0.02001
Opus 5 $0.00019 $0.01001
Sonnet 5 $0.00008 $0.00400
Haiku 4.5 $0.00004 $0.00200

Measured today against content hash 9ed445e66c0a, 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 today.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/run_with_timeout.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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 · 132 lines

How it starts

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

Codex Skill Guide

Operating Contract

  1. Run codex --version and codex exec --help first. Stop if Codex is unavailable, and only use flags shown by the installed CLI.
  2. If the user did not specify a model or reasoning effort, use the installed default. Do not hardcode a model list; model names and supported reasoning levels change over time.
  3. Select the smallest sandbox needed: --sandbox read-only for inspection and --sandbox workspace-write for requested local edits. Network access, extra writable roots, and broader modes are separate grants.
  4. Assemble the command from supported options such as:
    • -m, --model <MODEL>
    • --config model_reasoning_effort="<LEVEL>"
    • --sandbox <read-only|workspace-write|danger-full-access>
    • -C, --cd <DIR>
    • --add-dir <DIR>
    • --json
    • --ephemeral
    • --skip-git-repo-check
    • --dangerously-bypass-approvals-and-sandbox
  5. Do not use --skip-git-repo-check by default. Use it only when the user explicitly asks to run outside a Git repository or has approved that boundary bypass for this command.
  6. Do not use deprecated compatibility shortcuts such as --full-auto; use the explicit sandbox shown by current help.
  7. Preserve stderr. Keep it out of the parent context by writing it to a bounded artifact and reading only the exit status, short tail, or targeted diagnostics. Never redirect it to /dev/null.
  8. For automation, batch work, cost investigation, or any run that needs measured usage, add --json and save stdout as JSONL. Read the final usage event and report input, cached input, output, and reasoning tokens when present.
  9. Enforce a hard wall-clock timeout with the supervising runtime. Stop on non-zero exit or timeout; do not automatically retry an expensive run.
  10. When continuing a genuinely conversational task, use codex exec resume --last via stdin. Do not resume a session for homogeneous record batches; start a fresh bounded --ephemeral run per tranche so accumulated history is not resent on every model call.

Read the full file on GitHub · 132 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today Changed · +69 lines 9ed445e66c0a
  2. 5d ago First seen · 63 lines · 38 tokens per session scan A d8ec1a538ea3

Subscribe to this mod's changes

codex is a skill published in the GitHub repository majiayu000/spellbook (265 stars, last pushed 4d ago), licensed MIT. It adds 38 tokens to every session and 2,001 once invoked, about $0.0002 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

elixir-idioms

OTP/BEAM patterns and Elixir idioms — GenServer, Supervisor, Task, Registry, pattern matching, with chains, pipes. Use when designing processes or debugging BEAM issues.

oliver-kriska/claude-elixir-phoenix · 44 tokens

tidewave-integration

Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.

oliver-kriska/claude-elixir-phoenix · 38 tokens

security

Enforce Elixir/Phoenix security — auth, OAuth, sessions, CSRF, XSS, SQL injection, input validation, secrets. Use when editing auth files, login flows, RBAC, or API keys.

oliver-kriska/claude-elixir-phoenix · 47 tokens

michel-cli-demo-recorder

Produce proof-of-execution demos of the Packmind CLI (packmind-cli) as terminal-styled images (colors and formatting preserved exactly), for embedding in a GitHub PR. Renders a crisp master SVG and rasterizes it to a PNG — the PNG is what you embed, because GitHub does not render SVG in PR/issue bodies. Use this…

PackmindHub/packmind · 212 tokens

general-video

The fallback workflow for authoring custom HyperFrames video compositions at any length or format — longer or multi-scene pieces, brand / sizzle reels, montages, title cards, static loops, and freeform compositions. Input- and length-agnostic. If a specialized workflow clearly fits the input — a marketed product, a…

Sma1lboy/rove · 114 tokens

session-scan

Compute metrics for Claude Code sessions. Discovers via ccrider, filters trivial, computes friction/opportunity/fingerprint scores. Use for broad session triage.

oliver-kriska/claude-elixir-phoenix · 36 tokens