codex

A skill for running the Codex command-line tool directly in a user's code checkout. It is the direct, unverified route for code analysis, refactoring, or automated editing.

In plain words
What is it for?
Use it to analyze code, refactor files, or make automated edits through the Codex CLI.
Why use it?
It gives an agent a straightforward way to ask Codex to work on the current checkout when an isolated and independently verified workflow is not required.

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

Made for: Claude Code, Codex.

Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,922 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.00031 $0.01922
Opus 5 $0.00015 $0.00961
Sonnet 5 $0.00006 $0.00384
Haiku 4.5 $0.00003 $0.00192

Measured 2d ago against content hash 2ab232eadf16, 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 · 102 lines

How it starts

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

Codex Skill Guide

Always present this skill as /claude-architect:codex. Never show a shorter command.

Trust boundary

/claude-architect:codex is the direct, unverified lane: it runs codex exec against the user's checkout without an isolated worktree, frozen Candidate Artifact, or independent verification. Use it for direct CLI assistance when those controls are not required. Use /claude-architect:delegate for the verified lane when changes need isolation, a frozen Candidate Artifact, independent verification, and controlled integration.

Only /claude-architect:delegate produces a frozen, independently verified Candidate Artifact and drives review, decision, and guarded integration. This direct skill must never call itself verified or invoke those lifecycle tools.

Running a Task

  1. For a new session (resumes inherit the prior model/effort — see step 5), ask the user (via AskUserQuestion) which model AND which reasoning effort to use, in a single prompt with two questions. When the user expresses no preference, default to gpt-5.6-sol at high.
    • Model — default gpt-5.6-sol:
      • GPT-5.6: gpt-5.6-sol (frontier / most capable — default), gpt-5.6-terra (balanced, everyday), gpt-5.6-luna (fast & affordable)
      • Legacy (kept for compatibility): gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex-spark, gpt-5.3-codex
    • Reasoning effort — default high: low, medium, high, xhigh, max, ultra.
      • max/ultra require a GPT-5.6 model; ultra is only on sol/terra (luna caps at max); legacy models cap at xhigh.
      • ultra = maximum reasoning with automatic task delegation (slowest and most expensive — reserve for the hardest jobs).
      • If the chosen effort exceeds the chosen model's maximum, fall back to that model's highest supported effort and tell the user.
  2. Select the sandbox mode required for the task; default to --sandbox read-only unless edits or network access are necessary.
  3. Assemble the command with the appropriate options:
    • -m, --model <MODEL>
    • --config model_reasoning_effort="<low|medium|high|xhigh|max|ultra>" (max/ultra only on GPT-5.6 models; ultra only on sol/terra — see step 1)
    • --sandbox <read-only|workspace-write|danger-full-access>
    • -C, --cd <DIR>
    • --skip-git-repo-check
    • "your prompt here" (as final positional argument)
  4. Always use --skip-git-repo-check.
  5. When continuing a previous session, prefer the positional form codex exec --skip-git-repo-check resume --last "prompt". Resumed sessions inherit the prior model, reasoning effort, and sandbox. Do not add configuration flags unless the user explicitly requests an override; any such flags belong between exec and resume.
  6. IMPORTANT (stderr): Never discard stderr. codex exec sends progress, warnings, and diagnostics to stderr and its final agent message to stdout. Capture both streams separately, preserve a nonzero exit as failure, and summarize progress only after retaining actionable diagnostics.
  7. IMPORTANT (stdin): Prefer a positional prompt for new and resumed sessions. In a harness that may leave stdin open, close it explicitly without redirecting stderr:
    • POSIX: append </dev/null, for example codex exec --skip-git-repo-check --sandbox read-only "prompt" </dev/null.
    • PowerShell: prefix the native command with $null |, for example $null | codex exec --skip-git-repo-check --sandbox read-only "prompt".
    • cmd.exe: append <NUL, for example codex exec --skip-git-repo-check --sandbox read-only "prompt" <NUL.
    • Process APIs: spawn with stdio: ["ignore", "pipe", "pipe"] so stdin is closed while stdout and stderr remain distinct.
  8. Run the command, capture stdout and stderr separately, and summarize the outcome for the user.
  9. After Codex completes, inform the user: "You can resume this Codex session at any time by saying 'codex resume' or asking me to continue with additional analysis or changes."

Read the full file on GitHub · 102 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 · 102 lines · 31 tokens per session scan A 2ab232eadf16

Subscribe to this mod's changes

codex is a skill published in the GitHub repository PyModel/claude-architect (19 stars, last pushed 4d ago), licensed MIT. It adds 31 tokens to every session and 1,922 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.