← ClaudeAtlas

codex-subagentlisted

Delegate expensive work to the local Codex CLI (`codex exec`) as a worker subagent to save Claude's token budget. Use this skill whenever a task involves web search / online lookup, reading or scanning large files, bulk code analysis, writing long files, running tests or scripts, or any chore that would otherwise burn a lot of Claude context. Claude stays the orchestrator — planning, deciding, verifying — while Codex does the heavy I/O-bound or context-heavy work. Trigger on phrases like "用 codex", "丟給 codex", "讓 codex 查", "codex 搜一下", "codex 分析", "dispatch to codex", "delegate to codex", whenever the user hints they want to conserve Claude's tokens or offload work, or whenever Claude is stuck and wants a second pass with a fresh context.
dwgx/claude-codex-subagent · ★ 2 · AI & Automation · score 78
Install: claude install-skill dwgx/claude-codex-subagent
# Codex as Worker Subagent Claude is the **orchestrator**. Codex is a **worker subagent** with its own fresh context window, its own network access, and its own sandboxed shell. You hand Codex a well-scoped task and take back a short answer. Codex's thinking, tool calls, and file reads happen **in Codex's context, not yours** — that is where the token savings come from. ## Thin-forwarder contract Treat each Codex call like a function call: - You write the prompt (the "arguments") - Codex runs its own full agent loop inside its own context - You take Codex's stdout as the **authoritative return value** - No Claude-side freelancing — don't "edit" what Codex said in your head and then act on a phantom version. If Codex's answer is wrong or under- specified, **resume the session** with a follow-up or dispatch a fresh call with a better prompt. Do not pretend you know what it meant. ## When to delegate Delegate when any of these apply: - **Network needed.** Web search, fetching docs, scraping an API, checking a package version, `gh api`, `npm view`, `pip install`. You (Claude) pay steep token cost for WebFetch/WebSearch; Codex's network calls happen in its own context. - **Large reads.** Scanning a repo, digesting a long file/log, cross- referencing many sources. - **Long output that just needs a conclusion.** E.g. "find all TODOs and tell me which are stale" — Codex emits the list internally and returns only the verdict. - **Writing long files.** Codex wr