codex-first

codex-first is a skill for Claude Code, Codex from steipete/agent-scripts. It costs 41 tokens per session (3,819 once invoked), scanned B, original, MIT.

A routing policy for Claude Code that sends implementation, repair, exploration, rebasing, and pull-request work to the Codex command-line tool when its model rules allow it.

In plain words
What is it for?
It helps decide where coding and exploratory tasks should run, including when to use Codex-backed automatic review.
Why use it?
It separates planning and review from hands-on coding according to the active model and token-cost rules.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

Good fit It helps decide where coding and exploratory tasks should run, including when to use Codex-backed automatic review.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/steipete/agent-scripts/codex-first
About the project

Agent Scripts is a repository of shared instructions, reusable skills, helper scripts, and local safeguards for coding-agent workflows across multiple workspaces. It is for maintaining common agent behavior and portable development utilities between repositories.

steipete/agent-scripts · 7,371 stars · on GitHub · steipete.me

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 steipete/agent-scripts --skill codex-first
Clone the repo
git clone --depth 1 https://github.com/steipete/agent-scripts

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-first

README.md
[![agentmods](https://agentmods.dev/badge/skills/steipete/agent-scripts/codex-first/github.svg)](https://agentmods.dev/skills/steipete/agent-scripts/codex-first)
Your own site
<a href="https://agentmods.dev/skills/steipete/agent-scripts/codex-first"><img src="https://agentmods.dev/badge/skills/steipete/agent-scripts/codex-first/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-first

Your own site · 80×15
<a href="https://agentmods.dev/skills/steipete/agent-scripts/codex-first"><img src="https://agentmods.dev/badge/skills/steipete/agent-scripts/codex-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,819 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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: 2 findings, 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 Supply Chain · line 127
    Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
    Fix: Avoid downloading and executing remote scripts. Use trusted packages from PyPI/npm. If remote fetch is required, verify checksums and use HTTPS.
  • medium Rogue Agent · line 77
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00041 $0.03819
Opus 5.5 $0.00016 $0.01528
Sonnet 5.5 $0.00008 $0.00764
Haiku 4.5 $0.00004 $0.00382

Measured today against content hash 6f49c07bcbb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

codex-first 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 today.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/codex-resume.test.sh), 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.

Reads agent configuration directoriesmediumAgent snooping

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

auth command in `~/.codex/config.toml`).
skills/codex-first/SKILL.md · 224 lines

How it starts

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

Codex First

Launch flags — read first, copy verbatim

Default every Codex worker, fresh or resumed, to GPT-6.1 Sol, high reasoning, Ultrafast service tier (service_tier="ultrafast"). Pass all three settings unless the user requests an override.

# fresh
codex exec --yolo -C "$WT" \
  -m gpt-6.1-sol -c 'model_reasoning_effort="high"' \
  --enable fast_mode -c 'service_tier="ultrafast"' \
  -c 'model_auto_compact_token_limit=260000' \
  -o "$OUT" - < "$ORDER"
# resume: pass the same flags again; resume does not inherit them
codex exec resume "$SID" --dangerously-bypass-approvals-and-sandbox \
  -m gpt-6.1-sol -c 'model_reasoning_effort="high"' \
  --enable fast_mode -c 'service_tier="ultrafast"' \
  -c 'model_auto_compact_token_limit=260000' -o "$OUT" -
  • Ultrafast has a context ceiling (measured 2026-10-13, direct Responses probes, gpt-6.1-sol + gpt-6-astra): served ultrafast up to ~282k prompt tokens, flaky at 288–294k, fast at ≥300k — silently, HTTP 200. Config default compacts at 400k, so long workers drift to Fast; the 260k compact cap keeps them Ultrafast. Rollouts record only the requested tier; prove the served tier with a direct probe (response.service_tier).
  • Context: workers get the base 500k window. Add -p sol61-1m (or -p astra-1m) only when the order needs a whole-repo context; see $codex-huge-context. Those profiles forfeit Ultrafast above ~280k.
  • Copy all model/reasoning/tier flags into wrappers; override only on user request. Verify launch arguments (ultrafast default; requested fast is valid).
  • For requested Fast reviews, use --codex-speed fast.

Cyber-classifier refusal → Daybreak Red (Peter, 2026-10-15)

Worker stops with This content was flagged for possible cybersecurity risk → relaunch or resume the same order on Daybreak Red (Peter: "use daybreak red if you hit a blocker with regular models"). Don't rephrase to dodge the classifier or hop between regular models.

  • Direct API only: the ChatGPT-account route returns 400 not supported when using Codex with a ChatGPT account. Add -c 'model_provider="openai_api_direct"' (API key via the provider's auth command in ~/.codex/config.toml).
  • Slug: the model_catalog_json entry whose display_name is Daybreak Red. Keep it out of public artifacts (commits, PRs, issues, logs) per public model naming.
  • No Ultrafast: drop --enable fast_mode / service_tier; keep model_reasoning_effort="high".
  • Verified 2026-10-15 with a one-line codex exec probe on the direct provider.

Read the full file on GitHub · 224 lines

Files

What ships with it

6 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 · +18 lines scan A → B 6f49c07bcbb8
  2. yesterday Changed · +6 lines f70618a3185d
  3. 2d ago Changed · +28 lines 0eb71ac39edc
  4. 3d ago Changed · -205 lines · -31 tokens per session scan C → A 665fff673355
  5. 5d ago Changed · +5 lines · +7 tokens per session fa2127260ba1
  6. 11d ago Changed 211e293fdafe
  7. 13d ago Changed · +29 lines 96165d39b2aa
  8. 18d ago Changed · +27 lines 5cd9c04b2801
  9. 27d ago Changed · +2 lines 94a5863f4154
  10. 1mo ago First seen · 314 lines · 65 tokens per session scan C b27a80556593

Subscribe to this mod's changes

codex-first is a skill published in the GitHub repository steipete/agent-scripts (7,371 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 3,819 once invoked, about $0.0002 per session on Opus 5.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

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

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

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 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

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens