{"id":"db9e8db4-c6fe-4e09-a108-86f14a37acba","shortId":"44bRT9","kind":"skill","title":"collaborating-with-codex","tagline":"Delegate tasks to Codex CLI for prototyping, debugging, code review, and implementation. Supports multi-turn sessions via SESSION_ID.","description":"# Collaborating with Codex\n\nUse Codex CLI as a collaborator while your primary agent remains the implementer.\n\nThe bridge script (`scripts/codex_bridge.py`) wraps `codex exec` (headless mode), returns structured JSON, and manages session continuity via `SESSION_ID`.\n\n## Safety\n\nCodex runs in a sandbox by default. The bridge defaults to `read-only`:\n\n- `--sandbox read-only` — **(default)** no file writes, no destructive commands. Recommended for review/consultation.\n- `--sandbox workspace-write` — can write files in the workspace only.\n- `--sandbox danger-full-access` — unrestricted. Use only in externally sandboxed environments.\n- `--full-auto` — convenience alias for sandboxed auto-execution (`workspace-write` + auto-approve).\n\nDo not use `--full-auto` or `danger-full-access` unless you understand the implications.\n\n## When to use\n- Algorithm implementation, bug analysis, or code generation.\n- Code review or adversarial review.\n- Second opinion on architecture, edge cases, or test gaps.\n- Research or diagnosis with tool use.\n\n## When not to use\n- Trivial tasks your primary agent can handle directly.\n- Anything involving secrets, private keys, or prod data.\n\n## Quick start\n\n⚠️ Backticks in prompts trigger shell command substitution — use a heredoc. See `references/shell-quoting.md`.\n\n```bash\nPROMPT=\"$(cat <<'EOF'\nReview src/auth.py around login() and propose fixes.\nOUTPUT: Unified Diff Patch ONLY.\nEOF\n)\"\npython3 skills/collaborating-with-codex/scripts/codex_bridge.py \\\n  --cd \".\" --PROMPT \"$PROMPT\"\n```\n\n**Returns:** `{ \"success\": true, \"SESSION_ID\": \"...\", \"agent_messages\": \"...\" }`\n\n## Multi-turn sessions\n\nCapture `SESSION_ID` from the first call and pass it back:\n\n```bash\n# Turn 1\npython3 skills/collaborating-with-codex/scripts/codex_bridge.py \\\n  --cd \".\" --PROMPT \"Analyze the bug in foo().\"\n\n# Turn 2 — resume by ID\npython3 skills/collaborating-with-codex/scripts/codex_bridge.py \\\n  --cd \".\" --SESSION_ID \"<id>\" --PROMPT \"Propose a fix.\"\n\n# Or resume the most recent session\npython3 skills/collaborating-with-codex/scripts/codex_bridge.py \\\n  --cd \".\" --last --PROMPT \"What about edge cases?\"\n```\n\n## Bridge flags\n\n| Flag | Purpose | Default |\n|---|---|---|\n| `--PROMPT` | Prompt text (required) | — |\n| `--cd` | Workspace root (required) | — |\n| `--SESSION_ID` | Resume a previous session by thread ID | new session |\n| `--last` | Resume the most recent session | off |\n| `--model` | Override Codex model | CLI default |\n| `--sandbox` | `read-only` · `workspace-write` · `danger-full-access` | `read-only` |\n| `--full-auto` | Sandboxed auto-execution | off |\n| `--image` | Attach image files (repeatable) | none |\n| `--add-dir` | Additional writable directories (repeatable) | none |\n| `--skip-git-repo-check` | Allow running outside a Git repo | off |\n| `--ephemeral` | Don't persist session to disk | off |\n| `--return-all-messages` | Include all JSONL events in output | off |\n\nDefault timeout: set `timeout_ms` to **600000** (10 min) when invoking via an external command runner.\n\n## Prompting patterns\n\nUse `assets/prompt-template.md` for quick plain-text starters. For complex tasks, use composable XML prompt blocks — see `references/prompt-blocks.md`.\n\nKey principles:\n\n- **Point, don't paste** — give file paths and line numbers, not code blocks.\n- **One objective per prompt** — multiple competing goals produce noisy output.\n- **State what done looks like** — Codex works best with explicit acceptance criteria.\n- **Use prompt blocks** — wrap objectives in `<task>`, add `<verification_loop>` for correctness, `<grounding_rules>` for reviews.\n- **Enforce output format** — append `OUTPUT: Unified Diff Patch ONLY.` for code changes when using `read-only` sandbox.\n\n## Verification\n\n- Smoke test: `python3 skills/collaborating-with-codex/scripts/codex_bridge.py --help`\n- Session test: run one prompt, confirm JSON contains `success: true` and a `SESSION_ID`.\n\n## Collaboration State Capsule\n\nKeep this block updated while collaborating:\n\n```\n[Codex Capsule] Goal: | SID: | Sandbox: | Files: | Last: | Next:\n```\n\n## References\n- [Prompt template](assets/prompt-template.md) — quick plain-text starters\n- [Prompt blocks](references/prompt-blocks.md) — composable XML blocks for structured prompts\n- [Prompt recipes](references/prompt-recipes.md) — end-to-end templates (diagnosis, fix, review, research)\n- [Prompt anti-patterns](references/prompt-antipatterns.md) — common mistakes to avoid\n- [Shell quoting](references/shell-quoting.md) — heredoc quoting for backticks","tags":["collaborating","with","codex","agent","designer","appautomaton","agent-skills","agentic-workflows","ai-agents","ai-coding-assistant","claude-code","claude-skills"],"capabilities":["skill","source-appautomaton","skill-collaborating-with-codex","topic-agent-skills","topic-agentic-workflows","topic-ai-agents","topic-ai-coding-assistant","topic-claude-code","topic-claude-skills","topic-codex","topic-gemini-cli","topic-mcp"],"categories":["agent-designer"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/appautomaton/agent-designer/collaborating-with-codex","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add appautomaton/agent-designer","source_repo":"https://github.com/appautomaton/agent-designer","install_from":"skills.sh"}},"qualityScore":"0.506","qualityRationale":"deterministic score 0.51 from registry signals: · indexed on github topic:agent-skills · 113 github stars · SKILL.md body (4,515 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:56:19.321Z","embedding":null,"createdAt":"2026-05-06T00:55:54.561Z","updatedAt":"2026-05-18T18:56:19.321Z","lastSeenAt":"2026-05-18T18:56:19.321Z","tsv":"'1':254 '10':404 '2':265 '600000':403 'accept':468 'access':104,138,340 'add':359,476 'add-dir':358 'addit':361 'adversari':157 'agent':37,182,235 'algorithm':147 'alia':116 'allow':371 'analysi':150 'analyz':259 'anti':568 'anti-pattern':567 'anyth':186 'append':484 'approv':127 'architectur':162 'around':214 'assets/prompt-template.md':416,539 'attach':353 'auto':114,120,126,133,346,349 'auto-approv':125 'auto-execut':119,348 'avoid':574 'back':251 'backtick':196,581 'bash':208,252 'best':465 'block':430,447,472,524,546,550 'bridg':42,69,293 'bug':149,261 'call':247 'capsul':521,529 'captur':241 'case':164,292 'cat':210 'cd':227,257,271,286,302 'chang':492 'check':370 'cli':9,30,328 'code':13,152,154,446,491 'codex':4,8,27,29,46,61,326,463,528 'collabor':2,25,33,519,527 'collaborating-with-codex':1 'command':85,201,411 'common':571 'compet':453 'complex':424 'compos':427,548 'confirm':510 'contain':512 'continu':56 'conveni':115 'correct':478 'criteria':469 'danger':102,136,338 'danger-full-access':101,135,337 'data':193 'debug':12 'default':67,70,79,297,329,397 'deleg':5 'destruct':84 'diagnosi':170,562 'diff':221,487 'dir':360 'direct':185 'directori':363 'disk':384 'done':460 'edg':163,291 'end':558,560 'end-to-end':557 'enforc':481 'environ':111 'eof':211,224 'ephemer':378 'event':393 'exec':47 'execut':121,350 'explicit':467 'extern':109,410 'file':81,95,355,440,533 'first':246 'fix':218,277,563 'flag':294,295 'foo':263 'format':483 'full':103,113,132,137,339,345 'full-auto':112,131,344 'gap':167 'generat':153 'git':368,375 'give':439 'goal':454,530 'handl':184 'headless':48 'help':504 'heredoc':205,578 'id':24,59,234,243,268,273,307,314,518 'imag':352,354 'implement':16,40,148 'implic':143 'includ':390 'invok':407 'involv':187 'json':52,511 'jsonl':392 'keep':522 'key':190,433 'last':287,317,534 'like':462 'line':443 'login':215 'look':461 'manag':54 'messag':236,389 'min':405 'mistak':572 'mode':49 'model':324,327 'ms':401 'multi':19,238 'multi-turn':18,237 'multipl':452 'new':315 'next':535 'noisi':456 'none':357,365 'number':444 'object':449,474 'one':448,508 'opinion':160 'output':219,395,457,482,485 'outsid':373 'overrid':325 'pass':249 'past':438 'patch':222,488 'path':441 'pattern':414,569 'per':450 'persist':381 'plain':420,542 'plain-text':419,541 'point':435 'previous':310 'primari':36,181 'principl':434 'privat':189 'prod':192 'produc':455 'prompt':198,209,228,229,258,274,288,298,299,413,429,451,471,509,537,545,553,554,566 'propos':217,275 'prototyp':11 'purpos':296 'python3':225,255,269,284,502 'quick':194,418,540 'quot':576,579 'read':73,77,332,342,496 'read-on':72,76,331,341,495 'recent':282,321 'recip':555 'recommend':86 'refer':536 'references/prompt-antipatterns.md':570 'references/prompt-blocks.md':432,547 'references/prompt-recipes.md':556 'references/shell-quoting.md':207,577 'remain':38 'repeat':356,364 'repo':369,376 'requir':301,305 'research':168,565 'resum':266,279,308,318 'return':50,230,387 'return-all-messag':386 'review':14,155,158,212,480,564 'review/consultation':88 'root':304 'run':62,372,507 'runner':412 'safeti':60 'sandbox':65,75,89,100,110,118,330,347,498,532 'script':43 'scripts/codex_bridge.py':44 'second':159 'secret':188 'see':206,431 'session':21,23,55,58,233,240,242,272,283,306,311,316,322,382,505,517 'set':399 'shell':200,575 'sid':531 'skill' 'skill-collaborating-with-codex' 'skills/collaborating-with-codex/scripts/codex_bridge.py':226,256,270,285,503 'skip':367 'skip-git-repo-check':366 'smoke':500 'source-appautomaton' 'src/auth.py':213 'start':195 'starter':422,544 'state':458,520 'structur':51,552 'substitut':202 'success':231,513 'support':17 'task':6,179,425 'templat':538,561 'test':166,501,506 'text':300,421,543 'thread':313 'timeout':398,400 'tool':172 'topic-agent-skills' 'topic-agentic-workflows' 'topic-ai-agents' 'topic-ai-coding-assistant' 'topic-claude-code' 'topic-claude-skills' 'topic-codex' 'topic-gemini-cli' 'topic-mcp' 'trigger':199 'trivial':178 'true':232,514 'turn':20,239,253,264 'understand':141 'unifi':220,486 'unless':139 'unrestrict':105 'updat':525 'use':28,106,130,146,173,177,203,415,426,470,494 'verif':499 'via':22,57,408 'work':464 'workspac':91,98,123,303,335 'workspace-writ':90,122,334 'wrap':45,473 'writabl':362 'write':82,92,94,124,336 'xml':428,549","prices":[{"id":"c4a7ed4e-c746-4889-8630-6f8c2500b4d0","listingId":"db9e8db4-c6fe-4e09-a108-86f14a37acba","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"appautomaton","category":"agent-designer","install_from":"skills.sh"},"createdAt":"2026-05-06T00:55:54.561Z"}],"sources":[{"listingId":"db9e8db4-c6fe-4e09-a108-86f14a37acba","source":"github","sourceId":"appautomaton/agent-designer/collaborating-with-codex","sourceUrl":"https://github.com/appautomaton/agent-designer/tree/main/skills/collaborating-with-codex","isPrimary":false,"firstSeenAt":"2026-05-06T00:55:54.561Z","lastSeenAt":"2026-05-18T18:56:19.321Z"}],"details":{"listingId":"db9e8db4-c6fe-4e09-a108-86f14a37acba","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"appautomaton","slug":"collaborating-with-codex","github":{"repo":"appautomaton/agent-designer","stars":113,"topics":["agent-skills","agentic-workflows","ai-agents","ai-coding-assistant","claude-code","claude-skills","codex","gemini-cli","mcp"],"license":null,"html_url":"https://github.com/appautomaton/agent-designer","pushed_at":"2026-04-06T19:03:10Z","description":"Portable SKILLs workspace for Claude Code, Codex, and Gemini — issue-driven workflows and cross-agent collaboration via bridge scripts with session continuity.","skill_md_sha":"0b414d1025f8d99014ffbb1cce8124d4f931db5a","skill_md_path":"skills/collaborating-with-codex/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/appautomaton/agent-designer/tree/main/skills/collaborating-with-codex"},"layout":"multi","source":"github","category":"agent-designer","frontmatter":{"name":"collaborating-with-codex","description":"Delegate tasks to Codex CLI for prototyping, debugging, code review, and implementation. Supports multi-turn sessions via SESSION_ID."},"skills_sh_url":"https://skills.sh/appautomaton/agent-designer/collaborating-with-codex"},"updatedAt":"2026-05-18T18:56:19.321Z"}}