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

claude-codex-subagent

AGENTS.md4 starsChanged 7 months agoMITView on GitHub

This repository packages a Claude Code skill that teaches Claude to delegate expensive work to local codex exec. The job of every agent in this repo is to keep that delegation workflow accurate, current, and directly runnable. - skills/codex-subagent/SKILL.md is the source of truth for Claude behavior. - scripts/codex-dispatch.sh is the executable reference implementation. - docs/codex-dispatch-guide.md is the detailed parameter and workflow guide for both Claude and Codex. - docs/prompt-and-agent-patterns.md is the public guide for prompt, agent, skill, command, result-handling,…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

Show its rules and text

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

16 rules. About 1 is common, 4 are distinctive, and 11 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer --sandbox workspace-write for normal local repo work.

    line 22
  2. Very specific:

    Do not introduce new --full-auto examples.

    line 23
  3. Very specific:

    Use --dangerously-bypass-approvals-and-sandbox only for tasks that truly need shell network, cross-workspace access, global installs, or as …

    line 26
  4. Very specific:

    Use helper --search for current public web facts when shell network is not needed.

    line 29
  5. Very specific:

    Use --json, -o/--output-last-message, and --output-schema when the result is consumed by automation.

    line 31
  6. Very specific:

    Keep --skip-git-repo-check in all codex exec examples and wrappers.

    line 33
  7. Very specific:

    Treat resume as a separate parameter surface: --cd, --profile, --add-dir, and non-bypass --sandbox are fresh-session context flags and …

    line 34
  8. Distinctive:

    Keep the project zero-dependency: markdown plus bash only.

    line 42
  9. Very specific:

    If you change Codex flags or sandbox rules, update all of these together: skills/codex-subagent/SKILL.md, scripts/codex-dispatch.sh, …

    line 43
  10. Very specific:

    If you add or change a persona, ensure it has YAML frontmatter, a {{TASK}} placeholder, and an explicit return format.

    line 47
  11. Very specific:

    If you change durable prompt, agent, skill, command, or publication guidance, update docs/prompt-and-agent-patterns.md and keep private …

    line 49
  12. Common:

    Do not add generated artifacts, logs, transcripts, credentials, or real local session data to the repo.

    line 52
  13. Very specific:

    Use UTF-8 and LF line endings.

    line 54
  14. Distinctive:

    Run these before handing off changes:

    line 58
  15. Distinctive:

    When reading Markdown or other UTF-8 text through Windows PowerShell, force UTF-8 output so Chinese examples and box drawing characters do …

    line 73
  16. Distinctive:

    When leaving a substantial change for the next agent, include:

    line 84

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.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
AGENTS.md

claude-codex-subagent Agent Rules

This repository packages a Claude Code skill that teaches Claude to delegate expensive work to local codex exec. The job of every agent in this repo is to keep that delegation workflow accurate, current, and directly runnable.

Repository Role

  • skills/codex-subagent/SKILL.md is the source of truth for Claude behavior.
  • scripts/codex-dispatch.sh is the executable reference implementation.
  • docs/codex-dispatch-guide.md is the detailed parameter and workflow guide for both Claude and Codex.
  • docs/prompt-and-agent-patterns.md is the public guide for prompt, agent, skill, command, result-handling, and publication patterns.
  • personas/*.md are prompt templates. Their frontmatter must stay simple: persona, sandbox, effort, and when-to-use.

Codex CLI Baseline

Target Codex CLI 0.141.0 or newer.

  • Prefer --sandbox workspace-write for normal local repo work.
  • Do not introduce new --full-auto examples. It is a deprecated compatibility alias; scripts may accept full-auto as a user-facing alias only if they emit --sandbox workspace-write.
  • Use --dangerously-bypass-approvals-and-sandbox only for tasks that truly need shell network, cross-workspace access, global installs, or as a documented Windows sandbox fallback.
  • Use helper --search for current public web facts when shell network is not needed; direct codex exec uses --config web_search="live".
  • Use --json, -o/--output-last-message, and --output-schema when the result is consumed by automation.
  • Keep --skip-git-repo-check in all codex exec examples and wrappers.
  • Treat resume as a separate parameter surface: --cd, --profile, --add-dir, and non-bypass --sandbox are fresh-session context flags and should be rejected by the helper on --resume; --model, --config, --json, -o, --output-schema, --ephemeral, and explicit bypass are resume-time controls in Codex CLI 0.141.0.

Editing Rules

  • Keep the project zero-dependency: markdown plus bash only.
  • If you change Codex flags or sandbox rules, update all of these together: skills/codex-subagent/SKILL.md, scripts/codex-dispatch.sh, scripts/doctor.sh, docs/codex-dispatch-guide.md, README.md, INSTALL.md, and examples/sample-dispatches.md.
  • If you add or change a persona, ensure it has YAML frontmatter, a {{TASK}} placeholder, and an explicit return format.
  • If you change durable prompt, agent, skill, command, or publication guidance, update docs/prompt-and-agent-patterns.md and keep private local details out of public examples.
  • Do not add generated artifacts, logs, transcripts, credentials, or real local session data to the repo.
  • Use UTF-8 and LF line endings. .gitattributes enforces LF.

Validation

Run these before handing off changes:

bash scripts/doctor.sh
bash scripts/test-dispatch-wrapper.sh
bash scripts/codex-dispatch.sh --debug 'Return exactly: OK'
bash scripts/codex-dispatch.sh --sandbox workspace-write 'Return exactly: OK'
git diff --check
git status --short

On Windows PowerShell, run these through Git Bash if plain bash is not on PATH. Prefer codex.cmd and claude.cmd over .ps1 shims when execution policy blocks scripts.

When reading Markdown or other UTF-8 text through Windows PowerShell, force UTF-8 output so Chinese examples and box drawing characters do not turn into mojibake:

[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
Get-Content -Raw -Encoding UTF8 README.md

Handoff Standard

When leaving a substantial change for the next agent, include:

  • current branch and dirty state,
  • files changed,
  • exact validation commands and outcomes,
  • any Codex CLI version assumptions,
  • known Windows sandbox caveats,
  • next recommended command.

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.

Reviews can't be read right now.

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.