talk-to-codex
Have a conversation with Codex about code — ask questions or instruct it to write code, looping until consensus.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Have a conversation with Codex about code — ask questions or instruct it to write code, looping until consensus.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | talk-to-codex |
| description | Have a conversation with Codex about code — ask questions or instruct it to write code, looping until consensus. |
| user-invocable | true |
| category | workflow |
Start a multi-turn conversation with OpenAI Codex. Claude drives the conversation autonomously, going back and forth until consensus is reached, then summarizes the outcome.
Two modes:
Invoked as /talk-to-codex [mode] <prompt>.
Arguments from the user are passed after the skill name. Parse ARGUMENTS to extract:
[mode] — optional, either ask or code. If omitted, infer from intent:
<prompt> — the question or instructions for CodexIf no prompt is provided, ask the user what they want to discuss.
Determine which codebase Codex should have access to:
/ref skill's projects.json registry at
~/.claude/skills/ref/projects.json to resolve the path. Match using the same strategy
as the ref skill (exact, substring, semantic).The resolved path is passed as the cwd parameter to Codex.
This entire conversation MUST run in a subagent to avoid polluting the main context window.
Launch an Agent with subagent_type: "general-purpose" and pass it the full instructions below.
Call mcp__codex__codex with:
prompt: The user's question, enriched with any relevant context Claude has gatheredcwd: The resolved codebase pathsandbox: "read-only"Save the threadId from the response — it's needed for follow-up messages.
Read Codex's response. Consider:
If the answer is complete and Claude agrees, skip to step 4.
Call mcp__codex__codex-reply with:
threadId: The thread ID from step 1prompt: Claude's follow-up question, counterpoint, or request for clarificationRepeat steps 2-3 until one of these conditions is met:
Produce a structured summary:
## Codex Conversation: <topic>
### Question
<original question>
### Consensus
<the agreed-upon answer or conclusion>
### Key Points
- <important point 1>
- <important point 2>
- ...
### Disagreements (if any)
- <area where Claude and Codex diverged, and how it was resolved>
### Rounds
<number of back-and-forth exchanges>
Call mcp__codex__codex with:
prompt: Clear instructions for what Codex should implement. Include any spec, plan, or
design context that Claude has from the current conversation. Be specific about files,
functions, expected behavior, and constraints.cwd: The resolved codebase pathsandbox: "workspace-write"Save the threadId from the response — it's needed for follow-up messages.
After Codex completes its work, review what it did:
If the changes look good and match the spec, skip to step 4.
Call mcp__codex__codex-reply with:
threadId: The thread ID from step 1prompt: Specific feedback on what needs to change. Be precise — reference files, line
numbers, and expected behavior. One focused correction per message is better than a list
of ten things.After Codex responds, go back to step 2.
Repeat until:
Produce a structured summary:
## Codex Conversation: <topic>
### Task
<original instructions>
### Changes Made
- <file>: <what changed>
- <file>: <what changed>
- ...
### Review Status
<satisfied / concerns remaining>
### Key Decisions
- <decision 1>
- <decision 2>
- ...
### Rounds
<number of review cycles>
Generate a self-contained, navigable explainer bundle for a feature of the current codebase — a sidebar of sub-concepts, detail pages, and linked animated diagrams grounded in the real code
Analyze a codebase and interactively generate an OKF (.knowledge/) bundle — asks clarifying questions, discovers packages and decisions, then writes a complete navigable knowledge catalog.
Analyzes code for unnecessary complexity, unjustified abstractions, and structural cleanup opportunities using first-principles engineering methodology
Finds bugs in existing code — nil dereferences, race conditions, resource leaks, logic errors, error handling gaps. Creates cleanup tasks for each finding.
Verifies that SPECS.md, NOTES.md, TESTS.md, BENCHMARKS.md, and documentation cross-reference cleanly against each other and against the actual code
Self-directed analyst that claims analysis tasks from a shared task list and writes findings (read-only)