codex-first

codex-first is a skill for Claude Code, Codex from steipete/agent-scripts. It costs 47 tokens per session (4,998 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,574 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 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,998 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.00047 $0.04998
Opus 5.5 $0.00019 $0.01999
Sonnet 5.5 $0.00009 $0.01000
Haiku 4.5 $0.00005 $0.00500

Measured 6d ago against content hash 3e71bf69508a, 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 6d ago.

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.

(the `-c` above, or the same key in `~/.codex/config.toml`), and the turn runs at Standard.
skills/codex-first/SKILL.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 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.2 Sol, high reasoning, on the direct-API provider (Peter, 2026-11-23), with the Fast tier flags (service_tier="fast", sent as API priority; Peter, 2026-10-30). Pass all of them unless the user requests an override.

# fresh
codex exec --yolo -C "$WT" \
  -m gpt-6.2-sol -c 'model_provider="openai_api_direct"' -c 'model_reasoning_effort="high"' \
  --enable fast_mode -c 'service_tier="fast"' \
  -o "$OUT" - < "$ORDER"
# resume: pass the same flags again; resume inherits none of them, not even the provider
codex exec resume "$SID" --dangerously-bypass-approvals-and-sandbox \
  -m gpt-6.2-sol -c 'model_provider="openai_api_direct"' -c 'model_reasoning_effort="high"' \
  --enable fast_mode -c 'service_tier="fast"' -o "$OUT" -
  • 6.2 Sol needs the API here: with codex-cli 0.164.0 the ChatGPT-account route returns 400 model_not_found (not supported when using Codex with a ChatGPT account). codex exec resume uses the provider in force at resume time, not the session's recorded one (codex-cli 0.164.0, 2026-11-23): a resume without the provider flag lands on the saved route and fails the same way.
  • codex-cli 0.164.0 advertises no tier for 6.2: it warns service tier ... is not advertised and omits it, so 6.2 runs at the standard tier. codex-cli 0.171.0 (Peter's Mac since 2026-11-23) accepts fast for 6.2 without that warning. Keep the Fast flags. Older CLIs also warn that 6.2 uses fallback model metadata; that is expected.
  • Route fallback: 6.2 or the direct provider unusable (that 400 on the API route, an access error, provider auth command … exited, 401/Missing bearer) → run the order on GPT-6.1 Sol, high, Fast over the saved route (drop the provider flag) and say so in the report. Never repair credentials ad hoc. scripts/codex-resume does this switch automatically.
  • Old Codex CLIs silently omit tiers they do not know (codex-cli 0.147 on Team warned not advertised and sent no tier); keep the CLI current. Verified on Team with 0.166.0, 2026-10-30.
  • Ultrafast only on request, and only on 6.1 Sol (not advertised for 6.2): use -m gpt-6.1-sol on a route whose catalog lists the tier (launch details), swap in -c 'service_tier="ultrafast"', and add -c 'model_auto_compact_token_limit=260000'. It is served up to ~282k prompt tokens, flaky at 288–294k, and silently fast at ≥300k (measured 2026-10-13); the 260k cap keeps it there. Rollouts record only the requested tier; prove the served tier with a direct probe (response.service_tier). Details: launch details.
  • Context: workers get the base 500k window. Only when the order needs a whole-repo context, launch with -p sol61-1m (or -p astra-1m) instead of the -m/model_provider flags: CLI overrides beat the profile, and those profiles pin 6.1 Sol/Astra on the direct provider because the 1M catalogue has no genuine 6.2 entry yet. See $codex-huge-context.
  • Copy all model/provider/reasoning/tier flags into wrappers; override only on user request. Verify launch arguments (fast default; requested ultrafast is valid on 6.1 Sol).

Read the full file on GitHub · 272 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. 6d ago Changed · +37 lines 3e71bf69508a
  2. 1mo ago Changed · +2 lines · +6 tokens per session 4df1978d7d0f
  3. 1mo ago Changed · +7 lines 1d6f61ac9a96
  4. 1mo ago Changed · +2 lines 1377d5f65917
  5. 1mo ago Changed · +18 lines scan A → B 6f49c07bcbb8
  6. 1mo ago Changed · +6 lines f70618a3185d
  7. 1mo ago Changed · +28 lines 0eb71ac39edc
  8. 1mo ago Changed · -205 lines · -31 tokens per session scan C → A 665fff673355
  9. 1mo ago Changed · +5 lines · +7 tokens per session fa2127260ba1
  10. 1mo ago First seen · 372 lines · 65 tokens per session scan C 211e293fdafe

Subscribe to this mod's changes

codex-first is a skill published in the GitHub repository steipete/agent-scripts (7,574 stars, last pushed 2d ago), licensed MIT. It adds 47 tokens to every session and 4,998 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

codex-first compared with skills from other repositories

codex-first next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-firststeipete/agent-scriptsSkill7.6k2d agoMITB47Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill330k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill14ktodayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code