Skip to content

Guide · Agent skill

How to use the Codex-First Delegation Routing agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

codex-first is an agent skill, a set of written instructions that a Claude Code session loads and follows. It tells Claude to hand hands-on coding work to Codex, a separate coding agent, while planning and verification stay with Claude. This guide explains what the skill changes, how to install it, how to trigger it, and what you need before running its commands.

Codex-First Delegation Routingsteipete/agent-scripts · MIT

Quick start

  1. 1Confirm Codex is ready. Install the Codex CLI with codex exec support and confirm your account can use gpt-6.1-sol and gpt-6-astra. Decide whether you need a direct API key for the fallback provider.
  2. 2Install the skill folder. Download the ZIP from the directory page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
  3. 3Read SKILL.md and the references. Read the full SKILL.md and the reference files before running anything. Pay attention to the launch flags and the bypass warnings.
  4. 4Launch a worker in its own worktree. Create a Git worktree for the task and launch the Codex worker with the default flags, changing only the directory and order file. Use an override only if you ask for one.
  5. 5Handle failures and verify the output. If a run hits a rate limit or capacity error, resume the same session on the fallback model. After the work lands, check the merged code yourself rather than relying on the worker's report.

What the codex-first skill makes the agent do

The skill's description says it covers Claude Code and OpenClaw agents running on Claude, where hands-on work is delegated to Codex under a model gate. Claude keeps the specification, judgment, and verification. Codex does the implementation in isolated worker directories.

The SKILL.md file is a detailed playbook. It sets exact launch commands and model settings for Codex workers, sets fallback rules when rate limits or capacity errors occur, and covers resuming, stopping, and restarting workers. Security audits are routed to a different model, and code review is preferably run through a Codex-backed reviewer.

  • Keeps planning and verification in Claude
  • Launches Codex workers with fixed model and reasoning settings
  • Falls back to a second model when the first hits rate or capacity limits
  • Routes security audit work to a separate model
  • Prefers a Codex-backed autoreview for code review

How do you install the codex-first skill?

Download the ZIP for codex-first from the directory page and unzip it. Put the resulting codex-first folder in one of two places. For a personal install, use ~/.claude/skills/. For a single project, use the .claude/skills/ folder inside the project.

If you use the Claude apps instead of Claude Code, open Settings, then Capabilities, then Skills, and upload the ZIP there.

  • Personal install: ~/.claude/skills/codex-first/
  • Project install: .claude/skills/codex-first/ inside your project
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP
~/.claude/skills/codex-first/SKILL.md

What do you need before you run it?

Most instructions assume Codex is installed and configured. The skill requires the Codex CLI with codex exec support, and an OpenAI account with a ChatGPT subscription or a direct API key (the API key is used for the fallback provider). The models named in the file, gpt-6.1-sol, gpt-6-astra, and a Daybreak Red model, must be available on your account.

The skill also expects bash and a wrapper script at ~/.codex/skills/agent-scripts/codex-first/scripts/codex-resume. That script is not included in the files provided with this listing, so the restart and recovery commands will not work until you supply it. Workers use Git worktrees for isolated directories.

  • Codex CLI with codex exec support
  • OpenAI ChatGPT subscription or direct API key
  • Access to gpt-6.1-sol, gpt-6-astra, and the Daybreak Red model
  • bash
  • The codex-resume wrapper script (not included)
  • Git worktrees

How do you trigger the skill with a natural request?

Claude decides when to load a skill from its description. The description of this one covers delegating hands-on work to Codex and keeping specification and verification in Claude. Ask for that outcome in plain words. The source does not list fixed trigger phrases, so these are examples of wording that matches the skill's purpose:

Phrasing that matches the skill is more reliable than naming the skill, but you can name it too if your setup supports that.

  • "Hand the implementation of this refactor to Codex and review the result yourself."
  • "Split this change into disjoint tasks and run each one as a Codex worker in its own worktree."
  • "Review this diff with the Codex-backed autoreview."
  • "If Codex hits a rate limit, fall back to the next model and keep the same session."

What does a default Codex worker launch look like?

The skill sets three settings for every worker, fresh or resumed: GPT-6.1 Sol, high reasoning, and the Fast service tier. Resumed runs do not inherit these settings, so the flags must be passed again. Read the full command before you run it. The flags --yolo and --dangerously-bypass-approvals-and-sandbox bypass approvals and sandboxing, which gives workers broad execution rights.

Use an override only when you ask for one. Ultrafast is available on request and is described in the skill's launch-details reference.

  • Fresh launch: codex exec --yolo with -C pointing at the worktree
  • Resume: codex exec resume with the session id and the same flags again
  • Ultrafast only on request, with a 260k auto-compact token limit
codex exec --yolo -C "$WT" \ -m gpt-6.1-sol -c 'model_reasoning_effort="high"' \ --enable fast_mode -c 'service_tier="fast"' \ -o "$OUT" - < "$ORDER"

What happens when Codex hits a rate limit or capacity error?

When a worker or resume fails with a rate limit, a capacity message, or an overloaded error, the skill resumes the same session on GPT-6 Astra with high reasoning and Fast. It does not wait in a loop first. Sessions created on Sol have been verified to resume on Astra, which keeps the thread.

The skill says to back off only when both Sol and Astra are limited. In that case it alternates between them with growing sleeps. A fresh launch that dies on capacity already has a session id in its stderr, so resume that session rather than relaunching.

  • Match all three error strings: rate limit, at capacity, overloaded
  • Do not hide a failed run behind set -e; capture the exit code and classify it
  • Use codex-resume --stop with the session id to stop a worker safely
codex exec resume "$SID" --dangerously-bypass-approvals-and-sandbox \ -m gpt-6-astra -c 'model_reasoning_effort="high"' \ --enable fast_mode -c 'service_tier="fast"' -o "$OUT" -

What are the safety notes for scripts and network use?

This skill runs scripts and uses the network. Its launch flags grant workers broad execution rights, and the restart script handles process control, so read the commands before running them. The skill's own rules say never to edit a running wrapper script in place. Write a new copy, check it with bash -n, make it executable, then move it into place.

Security audit lanes should run on the Daybreak Red model from the start. If a worker stops with a cybersecurity-risk flag, the skill says to retry the same order on Daybreak Red rather than rephrasing the request. Keep model slugs out of public commits, pull requests, issues, and logs, as the skill instructs.

  • Read every command; launch flags bypass approvals and sandboxing
  • Test wrapper changes with bash -n before replacing a live script
  • Do not kill a wrapper without stopping its Codex children first, or resumes fail with an active writer error
  • Do not use codex-resume to retire a worker; it resumes after stopping

What people use it for

  • Splitting a multi-file refactor into disjoint tasks, each run as a separate Codex worker in its own worktree.
  • Running several parallel Codex workers and recovering them when rate limits hit.
  • Running a Codex-backed autoreview on a pull request before merging.
  • Keeping security audit work on a separate model from routine implementation.

Frequently asked questions

How do I install the codex-first skill?

Download the ZIP from the directory page and unzip it into ~/.claude/skills/ for a personal install, or into .claude/skills/ inside a project. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.

Is codex-first free to use?

The listing states the skill is released under the MIT licence. Using it still requires a Codex CLI setup and an OpenAI account with a ChatGPT subscription or API key, so running it may cost money through those accounts.

What do I need to run codex-first?

You need the Codex CLI with codex exec support, an OpenAI account, access to the named models, bash, Git worktrees, and the codex-resume wrapper script. The wrapper is not included in the files provided, so restart commands will fail until you add it.

Why does my Codex worker fail with a rate limit error?

The skill says the organisation caps gpt-6.1-sol by tokens per minute, so a rate limit or capacity error is expected under heavy parallel use. The fix in the skill is to resume the same session on gpt-6-astra with the same flags, and to back off only when both models are limited.

Is it safe to run the launch commands?

Only after reading them. The flags --yolo and --dangerously-bypass-approvals-and-sandbox bypass approvals and sandboxing, which gives workers broad execution rights. Use isolated worktrees and review the results before merging.

How does codex-first compare with other agent skills?

The source does not compare it with other skills or tools. It is written for one operator's setup, with specific model names and wrapper scripts, so it may not suit someone who does not run Codex alongside Claude Code.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use codex-first if you already run Claude Code with Codex and want a documented routine for delegation, rate-limit fallback, and Codex-backed review. Pick something else if you do not have Codex or OpenAI access, want a general coding skill, or are not willing to read and control the commands that bypass approvals.

Download the skill