codex-collab
Skill2 starsChanged 5 months agoMITView on GitHub
Start Claude ⇄ Codex two-agent collaboration mode — set up a shared handoff journal (collab_log/) in any project, run start/finish rituals, and divide work via the Codex MCP. Use when the user says "start codex collab", "collaborate with codex", "start collaboration mode", "set up a collab log", "write the collaboration log", asks for a Codex second opinion / review, or the Chinese equivalents (啟動 codex 協作 / 跟 codex 合作 / 寫協作日誌).
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- kohoj/skillstheir own version, first seen Apr 6, 2026
- Kevin7Qi/codex-collabtheir own version, first seen Feb 28, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Kevin7Qi/codex-collab★ 98same name
- kohoj/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 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.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Only when the project root has no collab_log/ yet:
- Very specific: line 30
Create collab_log/INDEX.md: copy templates/INDEX.template.md and replace {{PROJECT_NAME}} with the project name.
- Very specific: line 31
Create today's day file collab_log/YYYY-MM-DD.md from templates/DAY.template.md.
- Distinctive: line 32
Add today's row to the index table in INDEX.md (summary "collaboration mode started", summary column ⏳).
- Distinctive: line 36
Write the first entry in today's file (did: set up the collaboration mechanism).
- Very specific: line 40
Read collab_log/INDEX.md (rules + the "🔴 In progress" block + recent summaries).
- Distinctive: line 42
Read today's day file; create it from the template if it doesn't exist.
- Distinctive: line 58
If the project uses git, commit the log change together with the work.
- Very specific: line 64
Use mcp__codex__codex for a new task, mcp__codex__codex-reply for follow-ups (keeps its conversation context).
- Very specific: line 68
Who writes the entry: when Codex is called by you via MCP, you (Claude) write its entry on its behalf, author field Codex (via MCP).
- Very specific: line 82
Diagnosing a stuck Codex: read ~/.codex/sessions/<yyyy>/<mm>/<dd>/rollout-*.jsonl — ending at role=user / turn_aborted means stuck.
- Distinctive: line 87
Never skip the start ritual ("read the log") or the finish ritual ("write the entry + overwrite In progress") — this is the only shared …
- Distinctive: line 91
When both agents touched the same thing, the entry must spell out who changed which part, to avoid overwriting each other.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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.
Files
Codex Collab — Claude ⇄ Codex collaboration mode
Two AI agents co-maintain one project: Claude (Anthropic, Claude Code) and Codex (OpenAI, Codex CLI). They do not share memory; their only sync channel is the project-root collab_log/ folder — a daily handoff journal, one file per day.
Default division of labor
- Claude (lead): planning, implementation, running the server, screenshot verification, writing the log.
- Codex (second opinion): code review, alternative approaches, bug hunting, copy/layout review, independent verification / sign-off.
- The split is adjustable per project, but "whoever touched what gets written to the log" is non-negotiable.
Step 0 — Check the Codex MCP
Confirm the mcp__codex__codex / mcp__codex__codex-reply tools exist (load their schema via ToolSearch if needed). If missing, ask the user to run once (user scope, applies to all projects):
claude mcp add --scope user codex -- codex mcp-serverCodex signs in with a ChatGPT account (no API key, no extra cost — works on the free tier too, just with a rolling-window rate limit).
Step 1 — Bootstrap (first time collaboration starts in a project)
Only when the project root has no collab_log/ yet:
- Create
collab_log/INDEX.md: copy templates/INDEX.template.md and replace{{PROJECT_NAME}}with the project name. - Create today's day file
collab_log/YYYY-MM-DD.mdfrom templates/DAY.template.md. - Add today's row to the index table in INDEX.md (summary "collaboration mode started", summary column ⏳).
- Route both agents to the journal (use the ready-made snippets, don't improvise — keeps both sides consistent):
- Paste the contents of templates/CLAUDE-snippet.md at the top of the project
CLAUDE.md(create it if missing). - Paste the contents of templates/AGENTS-snippet.md at the top of the project
AGENTS.md(Codex's default read point; create it if missing).
- Paste the contents of templates/CLAUDE-snippet.md at the top of the project
- Write the first entry in today's file (did: set up the collaboration mechanism).
Step 2 — Start ritual (every session, before touching code)
- Read
collab_log/INDEX.md(rules + the "🔴 In progress" block + recent summaries). Reading that block tells you the current state — no need to scan entries to reconstruct it. - Reconcile the block with reality: check each "In progress" claim against
git status --shortand recentgit log; if a claim no longer holds (e.g. it says "X is uncommitted" but the tree is clean), fix the block right now. This is part of the start ritual, not optional cleanup — a stale block sends the next agent down a false trail. - Read today's day file; create it from the template if it doesn't exist.
- Backfill yesterday's summary: use
Grep pattern="⏳" path=collab_log/INDEX.mdto locate the day whose summary column is still ⏳ (don't Read the whole file and scan by hand), read all its entries, write 3–6 lines in its## Daily summary, and update that row in INDEX.md to ✅.
Step 3 — Finish ritual (after completing a unit of work)
- Prepend an entry to the top of the
# Entriessection in today's file (newest first):
## [YYYY-MM-DD HH:MM TZ] <Claude | Codex | Codex (via MCP)> — <one-line title>
- did: <what you did / decided, including key trade-offs>
- verify: <how you verified (build/test/screenshot), or "not verified">
- files: <paths touched, or "review only — no edits">
- handoff: <what the other agent should know / verify / pick up>- Overwrite the "🔴 In progress" block in INDEX: drop finished threads, add new ones. History goes in the day file; current state goes in this block. The ritual is incomplete until this block is updated — an entry without the block update is the most common way the two agents desync.
- If the project uses git, commit the log change together with the work; an uncommitted log is invisible to anyone pulling the repo elsewhere.
Rules: never delete history, never edit someone else's old entry.
Step 4 — How to put Codex to work
- Use
mcp__codex__codexfor a new task,mcp__codex__codex-replyfor follow-ups (keeps its conversation context). - Feed distilled context; don't make it read the whole log. MCP calls are stateless, and Codex's ChatGPT account has a rolling-window rate limit — re-reading the entire
collab_log/each time is slow and burns quota. Inline the one or two relevant entries + the "In progress" block in the prompt; only tell it to readAGENTS.mdandcollab_log/when it genuinely needs the full picture. - The prompt must include: the project absolute path (cwd), the concrete task, and acceptance criteria.
- For review / second opinion, make it actually diverge: do not give Codex your reasoning or preferred answer first; ask it to assess independently and explicitly list risks and "what it would do differently", then you reconcile. Stating your conclusion first biases it toward agreement and wastes the second opinion.
- Who writes the entry: when Codex is called by you via MCP, you (Claude) write its entry on its behalf, author field
Codex (via MCP); only when Codex works standalone in its own CLI does it write its own. This avoids missing or duplicated entries. - Typical delegations: review the diff you just wrote, propose an alternative to the same problem, review English copy, independently reproduce a bug.
- Codex's reply is only visible to you — relay the conclusion to the user, and write important conclusions into the log.
Step 4.5 — Codex's sandbox limits: network / package installs (read before delegating)
The biggest trap in "Claude as brain, Codex as hands": Codex's sandbox has no network access.
- The MCP default
sandbox=workspace-writeblocks outbound network. Reading files and editing existing code work fine, but any step that needs the network fails — most commonly installing a new package (ENOTFOUND registry.npmjs.org), also fetching remote resources or calling external APIs. - Worse: under the default
approval-policy=on-failure, Codex cannot escalate its own permissions to retry (it gets "cannot ask for escalated permissions if the approval policy is OnFailure"). So it spins between "can't install, can't escalate" until the user aborts manually. It looks like Codex "refusing" or "hanging", but it's an environment deadlock — not rate limiting, not the model giving up. - Division rule: Claude (the brain) handles anything that needs the network first, then hands the pure code changes to Codex (the hands). Pick one:
- Claude installs first (recommended): before delegating a task that needs a new dependency, run
npm install <pkg>locally (Claude has no network restriction). With deps in place, Codex can finish the code changes + type-check in its offline sandbox. - Grant Codex network: delegate with
sandbox=danger-full-access+approval-policy=neverso it can reach the registry itself. ⚠️ Full access = no guardrails; only for trusted local projects.
- Claude installs first (recommended): before delegating a task that needs a new dependency, run
- Ask one question before delegating: does this task install packages / fetch remote resources / call APIs? If yes, handle that first — don't let Codex hit the wall.
- Diagnosing a stuck Codex: read
~/.codex/sessions/<yyyy>/<mm>/<dd>/rollout-*.jsonl— ending atrole=user/turn_abortedmeans stuck; for long-running goals checkthread_goalsin~/.codex/goals_1.sqlite.
Red lines
- Before delegating a task that installs packages / needs the network, either install as Claude first or use
danger-full-access— don't drop network steps into the default sandbox, or Codex spins until aborted (see Step 4.5). - Never skip the start ritual ("read the log") or the finish ritual ("write the entry + overwrite In progress") — this is the only shared memory between the two agents.
- The "In progress" block holds open threads only — never workspace state that git already records (uncommitted files, WIP diffs). Such claims go stale the moment anyone commits; git is the authority. On a mismatch: trust git, fix the block (see the start ritual).
- INDEX.md holds only rules, the "In progress" block, and one-line index entries; all detail goes in day files; keep any single file from bloating.
- When a handoff is marked "needs verification", the receiving agent must actually run it (build / test / reproduce) and record the result in a new entry's
verify— don't tick it off on the other's word that "it's fixed". Independent verification is where two agents beat one. - When both agents touched the same thing, the entry must spell out who changed which part, to avoid overwriting each other.
Maintaining this skill
Source of truth is the codex-collab GitHub repo (EN at the root, zh-Hant under i18n/). To change the skill: edit the repo first (both languages together), then copy the zh-Hant SKILL.md + templates/ into ~/.claude/skills/codex-collab/. Never patch the installed copy alone — an installed-only edit (the sandbox-deadlock section, 2026-06-28) once drifted from the repo unnoticed for ten days.
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
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.

