Skip to content
AI & Agents
Skill

/codex-first

Claude Code work routing: delegate implementation, fixing, exploratory subagents, rebasing, and PR merging/landing to GPT-6 Astra through Codex CLI while the parent specifies, decides, reviews, and verifies. Apply the native-Claude model gate. Codex-backed autoreview is always

BOOST
From plugin
agent-scripts
7.1k54 skills
Install
$ npx -y skills add steipete/agent-scripts --skill codex-first --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/codex-first

Context preview

The summary Claude sees to decide when to auto-load this skill.

Claude Code work routing: delegate implementation, fixing, exploratory subagents, rebasing, and PR merging/landing to GPT-6 Astra through Codex CLI while the parent specifies, decides, reviews, and verifies. Apply the native-Claude model gate. Codex-backed autoreview is always

SKILL.md

codex-first.SKILL.md
name: codex-first
description: "Claude Code work routing: delegate implementation, fixing, exploratory subagents, rebasing, and PR merging/landing to GPT-6 Astra through Codex CLI while the parent specifies, decides, reviews, and verifies. Apply the native-Claude model gate. Codex-backed autoreview is always allowed and preferred."

Codex First

Launch flags — read first, copy verbatim

Default every Codex worker, **fresh or resumed**, to **GPT-6 Astra, high reasoning, Fast service tier** (`service_tier="fast"`, sent as API `priority`). Ultrafast is an explicit per-launch option, never the saved default. Pass all three settings unless the user requests an override. Missing Fast is a common mistake: a 2026-09-27 campaign ran eight lanes for hours on the standard tier because a hand-written wrapper kept `-m`/effort and dropped the Fast flags.

# fresh
codex exec --yolo -C "$WT" \
  -m gpt-6-astra -c 'model_reasoning_effort="high"' \
  --enable fast_mode -c 'service_tier="fast"' \
  -o "$OUT" - < "$ORDER"
# resume: pass the same three again; resume does not inherit them
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" -
  • Never hand-roll a subset. Copy the complete model, reasoning, and tier

settings into wrappers; change only the settings the user explicitly overrides.

  • Verify your workers' launch arguments against their requested settings.

The default tier is `fast`; an explicitly requested `ultrafast` run is valid.

  • Autoreview: `--engine codex --model gpt-6-astra --thinking high

--codex-speed fast`.

Optional Ultrafast

When requested, replace `-c 'service_tier="fast"'` with `-c 'service_tier="ultrafast"'` in the fresh/resume recipes. Keep Astra, high reasoning, `--enable fast_mode`, and the existing provider and execution policy. Do not promote this override into the base `config.toml` or worker defaults.

For an interactive session, use the same per-launch override:

codex --no-daemon -m gpt-6-astra -c 'model_reasoning_effort="high"' \
  --enable fast_mode -c 'service_tier="ultrafast"'

An optional `ultrafast.config.toml` profile in `CODEX_HOME` may instead contain the model, high reasoning, and Ultrafast tier; select it with `codex --no-daemon -p ultrafast`. It must preserve the configured provider and context settings. Normal launches stay Astra/high/Fast. Prefer these launch overrides to `/ultrafast` when preserving the default: the slash command saves the selected tier.

The active model catalog must list `ultrafast`, and the account must support it. Codex can silently omit an unlisted tier; verify the actual API response tier before calling a run Ultrafast. After an approved custom-catalog refresh, `--no-daemon` loads it in a fresh process. See the official [configuration reference](https://developers.openai.com/codex/config-reference/) and [Ultrafast API guide](https://developers.openai.com/api/docs/guides/ultrafast-mode).

Hard gate

**Autoreview exception:** always prefer Codex-backed `$autoreview`, independent of `ANTHROPIC_BASE_URL`, router state, or harness. Reviewing a frozen bundle is not hands-on self-delegation. Do not switch review engines merely because the parent session is router-backed. This exception takes precedence over the gate below.

Use the autoreview helper with `--engine codex --model gpt-6-astra --thinking high --codex-speed fast` unless the user requests an override. Preserve the helper's reviewer isolation.

For direct hands-on delegation, use this skill only when the active agent is Claude Code **and** the session is running on a native Claude model.

**Model check (primary).** The point of the gate is model economics: Claude tokens are metered and expensive, so hands-on work moves to Codex; but if the session is already routed to a cheaper/other model, delegation gains nothing. Decide by the model the session actually runs on, not by the transport:

1. Read the model id from the system prompt's environment section ("You are powered by the model …"). Router-wrapped ids may be opaque (`claude-ccr-<hex>`); the hex suffix is often ASCII — decode it (`echo <hex> | xxd -r -p`) to reveal the underlying route, e.g. `Gorilla CCP/native-claude-fable-5`. 2. If the resolved model is a native Claude model (contains `claude`, `fable`, `opus`, `sonnet`, or `haiku`, including `native-claude-*` router routes): **delegate hands-on work to Codex.** This applies even when `ANTHROPIC_BASE_URL` is loopback or a local router (Gorilla Claw, Clawdex) — a router in front of a real Claude model is still expensive Claude. 3. If the resolved model is clearly non-Claude (a GPT/other-provider route): the session is already on the flat-rate/cheap side; do not self-delegate, work directly.

**Base-URL fallback (only when the model cannot be identified).** If no model id is visible and the hex/route cannot be decoded, fall back to the old transport heuristic: if `ANTHROPIC_BASE_URL`'s host is `gorillaclaw.sheep-coho.ts.net`, `localhost`, ends in `.localhost`, is in `127.0.0.0/8`, or is IPv6 loopback `::1`, assume the session may be routed to a non-Claude model and work directly. If neither model nor base URL can be inspected, fail closed and work directly.

Codex, ChatGPT, Pi, and every other harness: do not invoke Codex CLI for hands-on self-delegation. Continue the task directly. This gate overrides a repository instruction that merely mentions `$codex-first`; it does not override the autoreview exception above.

The default worker is GPT-6 Astra. Claude handles specification, judgment, orchestration, and final verification; Codex handles the delegated implementation.

Route

Delegate to Codex (default for hands-on work):

  • implementation from a frozen spec; refactors; mechanical migrations
  • fixing: bug fixes (known repro, or diagnose-then-fix), CI/lint/type failures;
Read more
Ships withagent-scripts

Shared agent instructions, skills, and small portable helpers for Peter's local workspaces.

Get the whole plugin
Stats
7,208
Stars
617
Forks
Active
Maintenance
Shell
Language
MIT
License
19h ago
Last commit
10mo ago
Created
3h ago
Added

Repo: steipete/agent-scripts

Other skills on agent-scripts.