codex-first

Delegates scoped implementation and bug-fix tasks to Codex CLI while Claude retains review.

4|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/sukbearai/king-ai --skill codex-first-sukbearai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codex-first
Source: https://github.com/sukbearai/king-ai/tree/main/packages/skills/skills/codex-first
Command: npx skills add https://github.com/sukbearai/king-ai --skill codex-first-sukbearai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Claude Code sessions spend significant context and tokens on hands-on implementation, bulk code exploration, and mechanical fixes. This Skill routes that hands-on work to Codex CLI so Claude focuses on specification, design, review, and verification. ## Core Features & Use Cases - Task Routing Gate: Applies only in Claude Code sessions and explicitly refuses to self-delegate from Codex or other harnesses. - Scoped Delegation: Sends implementation from frozen specs, bug fixes with known repros, test writing, CI fixes, and bulk codebase exploration to codex exec with prompts written via temp files. - Resume-Based Iteration: Supports follow-up fixes through codex exec resume --last to preserve context cheaply across rounds. - Claude-Side Verification: Requires reading the full diff, running focused tests, and taking over after two failed delegation rounds. - Use Case: You have a frozen spec for a refactor across a repo. Claude writes the work-order prompt, Codex executes it with --yolo, and Claude reviews the resulting diff like a contributor PR before shipping. ## Quick Start Ask Claude to use the codex-first workflow to delegate a scoped implementation task to Codex CLI and then review the resulting diff.

Frequently Asked Questions about codex-first

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delegate coding tasks from Claude Code to Codex CLI?▼

Write the goal, repo paths, constraints, and expected proof into a temp file, then run codex exec with --yolo, -C pointing at the repo, and -o for the output file. Claude reads the output file and reviews the resulting git diff.

What tasks should be delegated to Codex versus kept in Claude?▼

Delegate implementation from frozen specs, bug fixes with known repros, test writing, CI fixes, and bulk exploration. Keep design, architecture, naming, tiny edits under 20 lines, destructive operations, and all review work in Claude.

Can I use codex-first inside a Codex session?▼

No. The skill's session gate explicitly stops it from running in Codex or any non-Claude-Code harness, and it never invokes codex exec from a Codex session to prevent recursive self-delegation.

How do I send follow-up fixes to a Codex delegation run?▼

Use codex exec resume --last from inside the repo directory with --dangerously-bypass-approvals-and-sandbox and a new prompt file. Resume keeps prior context and is cheaper than starting a fresh run.

What should I do when Codex delegation fails repeatedly?▼

Verify each round by reading the full diff and running focused tests yourself. After two failed resume rounds, stop delegating and implement the change directly in Claude.