codex

codex is a skill for Claude Code, Codex from majiayu000/spellbook. It costs 38 tokens per session (2,018 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

Written for no agent in particular: nothing here depends on one. Also seen: names the AskUserQuestion tool; mentions Claude Code; runs codex exec.

Good fit Use it to run Codex tasks in a repository, including code analysis, refactoring, and automated edits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/spellbook/codex
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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/spellbook/codex"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/codex.svg" alt="Reviewed on agentmods" width="80" 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,018 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Excessive Agency · line 56
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
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.1 $0.00038 $0.02018
Opus 5.5 $0.00015 $0.00807
Sonnet 5.5 $0.00008 $0.00404
Haiku 4.5 $0.00004 $0.00202

Measured 12d ago against content hash 1175535f7b1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 12d ago.

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

How it starts

The opening of the file, as written. The whole thing — 134 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 · 134 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. 12d ago Changed · +2 lines 1175535f7b1f
  2. 1mo ago Changed · +69 lines 9ed445e66c0a
  3. 1mo 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 (288 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 2,018 once invoked, about $0.0002 per session on Opus 5.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