agentleFS
dwgxdwgx/claude-codex-subagent/CLAUDE.md

claude-codex-subagent

CLAUDE.md4 starsChanged 7 months agoMITView on GitHub

Default answer language for this maintainer is Chinese unless the user asks for English. Keep responses direct and evidence-backed. This repo teaches Claude Code to use local Codex as a worker subagent. Claude keeps orchestration, judgment, and user conversation state. Codex handles context-heavy or tool-heavy work: current web facts, large reads, bulk repo analysis, long file writes, audits, test runs, and fresh-context debugging. For Codex CLI 0.141.0+: Use stdin for generated or multiline prompts. Do not teach new examples with…

The file

We split this CLAUDE.md into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default answer language for this maintainer is Chinese unless the user asks for English.

    line 3
  2. Very specific:

    Use stdin for generated or multiline prompts.

    line 21
  3. Distinctive:

    Every dispatch prompt should include:

    line 39
  4. Distinctive:

    Prefer short final returns.

    line 48
  5. Very specific:

    When using a persona through scripts/codex-dispatch.sh, pass only the task specific scope as the argument.

    line 59
  6. Distinctive:

    Read in this order before changing behavior:

    line 64
  7. Distinctive:

    Use the dispatch guide for exact Codex CLI parameters.

    line 75
  8. Distinctive:

    Before finishing, run the validation commands in AGENTS.md.

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Claude Maintainer Guide

Default answer language for this maintainer is Chinese unless the user asks for English. Keep responses direct and evidence-backed.

What This Repo Teaches

This repo teaches Claude Code to use local Codex as a worker subagent. Claude keeps orchestration, judgment, and user conversation state. Codex handles context-heavy or tool-heavy work: current web facts, large reads, bulk repo analysis, long file writes, audits, test runs, and fresh-context debugging.

Dispatch Defaults

For Codex CLI 0.141.0+:

codex exec --skip-git-repo-check --sandbox workspace-write -C <repo> -

Use stdin for generated or multiline prompts. Do not teach new examples with --full-auto; it is deprecated. If a persona still says sandbox: full-auto, the wrapper treats it as a legacy alias for --sandbox workspace-write.

Escalate deliberately:

  • --sandbox workspace-write: normal local repo reads, edits, tests, lint, build.
  • --search: helper-script shorthand for current public web facts. Direct codex exec uses --config web_search="live"; top-level interactive codex supports --search.
  • --dangerously-bypass-approvals-and-sandbox: shell network, cross-workspace access, global installs, or Windows sandbox ACL fallback after reporting the exact error.
  • --ephemeral: throwaway checks that should not persist a session.
  • --json, -o, --output-schema: automation and machine-readable outputs.

How To Prompt Codex

Every dispatch prompt should include:

  • goal and done condition,
  • scope and working directory,
  • what not to touch,
  • exact return format,
  • verification expectations,
  • whether file edits are allowed.

Prefer short final returns. The point of this skill is to avoid reinflating the main Claude context with Codex's full internal work.

Use Personas

  • reviewer: severity-ranked code review.
  • debugger: fresh root-cause analysis.
  • auditor: security audit.
  • researcher: current web/docs research.
  • refactorer: cleanup/dead-code/stale TODO survey.

When using a persona through scripts/codex-dispatch.sh, pass only the task specific scope as the argument; the persona supplies the contract.

Maintenance Workflow

Read in this order before changing behavior:

  1. AGENTS.md
  2. skills/codex-subagent/SKILL.md
  3. docs/codex-dispatch-guide.md
  4. docs/prompt-and-agent-patterns.md
  5. scripts/codex-dispatch.sh
  6. scripts/doctor.sh
  7. personas/README.md
  8. README.md and INSTALL.md

Use the dispatch guide for exact Codex CLI parameters. Use the prompt and agent patterns guide for public-facing prompt contracts, persona design, skill design, command design, result handling, and release-safe redaction rules.

Before finishing, run the validation commands in AGENTS.md. If a real Codex dispatch fails because of Windows sandbox ACL setup, report that as a local Codex sandbox limitation and validate the non-destructive path with bypass only when the task permits it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.