collaborating-with-claude
Use when you want Claude Code CLI as a second opinion for coding tasks such as design tradeoffs, debugging, or diff review, while keeping Codex as the primary implementer.
Best use case
collaborating-with-claude is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when you want Claude Code CLI as a second opinion for coding tasks such as design tradeoffs, debugging, or diff review, while keeping Codex as the primary implementer.
Teams using collaborating-with-claude should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/collaborating-with-claude/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How collaborating-with-claude Compares
| Feature / Agent | collaborating-with-claude | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when you want Claude Code CLI as a second opinion for coding tasks such as design tradeoffs, debugging, or diff review, while keeping Codex as the primary implementer.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
SKILL.md Source
# Collaborating with Claude Code (Codex) Use Claude Code CLI as a collaborator while keeping Codex as the primary implementer. This skill provides a lightweight bridge script (`scripts/claude_bridge.py`) that returns structured JSON and supports multi-turn sessions via `SESSION_ID`. ## When to use - You want a second opinion (design tradeoffs, edge cases, missing tests). - You want Claude to propose or review a **unified diff** (Claude does not edit files). - You want multi-turn back-and-forth while you implement locally. ## When not to use - The task is trivial or one-shot (do it directly in Codex). - You need authoritative facts that require browsing/citations (Claude may guess). - You might paste sensitive data (secrets, private keys, prod logs). ## Core rules - Claude is a collaborator; you own the final result and must verify changes locally. - Do not invoke `claude` directly; always use the bridge script (`scripts/claude_bridge.py`) so output/session handling stays consistent. - Prefer file/line references over pasting snippets. Run the bridge with `--cd` set to the repo root (it sets the `claude` process working directory); use `--add-dir` when Claude needs access to additional directories. - For code changes, request **Unified Diff Patch ONLY** and forbid direct file modification. - Always run the bridge script with `--help` first if you are unsure of parameters. - Always capture `SESSION_ID` and reuse it for follow-ups to keep the collaboration conversation-aware. - For automation, prefer `--SESSION_ID` (resume). Session selectors are mutually exclusive: choose one of `--SESSION_ID`, `--continue`, or `--session-id`. - Keep a short **Collaboration State Capsule** updated while this skill is active. - Default timeout: when invoking via the Codex command runner, set `timeout_ms` to **600000 (10 minutes)** unless a shorter/longer timeout is explicitly required. - Default model: prefer `sonnet` for routine work; use `opus` only for complex tasks or when explicitly requested. - Ensure Claude Code is logged in before running headless commands (run `claude` and `/login` once if needed). - Streamed JSON requires `--verbose`; the bridge enables this automatically. ## Model selection Claude Code supports model aliases, so you can use `--model sonnet` / `--model opus` instead of hard-coding versioned model IDs. - If you omit `--model`, Claude Code uses its configured default (typically from `~/.claude/settings.json`, optionally overridden by `.claude/settings.json` and `.claude/settings.local.json`). - If you need strict reproducibility, pass a full model name via `--model <full-name>`. ## Quick start (shell-safe) ⚠️ If your prompt contains Markdown backticks (`` `like/this` ``), do **not** pass it directly via `--PROMPT "..."` (your shell may treat backticks as command substitution). Use a heredoc instead; see `references/shell-quoting.md`. ```bash PROMPT="$(cat <<'EOF' Review src/auth.py around login() and propose fixes. OUTPUT: Unified Diff Patch ONLY. EOF )" python3 .codex/skills/collaborating-with-claude/scripts/claude_bridge.py --cd "." --model sonnet --PROMPT "$PROMPT" --output-format stream-json ``` **Output:** JSON with `success`, `SESSION_ID`, `agent_messages`, and optional `error` / `all_messages`. ## Multi-turn sessions ```bash # Start a session PROMPT="$(cat <<'EOF' Analyze the bug in foo(). Keep it short. EOF )" python3 .codex/skills/collaborating-with-claude/scripts/claude_bridge.py --cd "." --PROMPT "$PROMPT" --output-format stream-json # Continue the same session PROMPT="$(cat <<'EOF' Now propose a minimal fix as Unified Diff Patch ONLY. EOF )" python3 .codex/skills/collaborating-with-claude/scripts/claude_bridge.py --cd "." --SESSION_ID "<SESSION_ID>" --PROMPT "$PROMPT" --output-format stream-json ``` ## Prompting patterns (token efficient) Use `assets/prompt-template.md` as a starter when crafting `--PROMPT`. ### 1) Ask Claude to open files itself Provide: - Entry file(s) and approximate line numbers - Objective and constraints - Output format (diff vs analysis) Avoid: - Pasting large code blocks - Multiple competing objectives in one request ### 2) Enforce safe output for code changes Append this to prompts when requesting code: - `OUTPUT: Unified Diff Patch ONLY. Strictly prohibit any actual modifications.` ### 3) Use Claude for what it’s good at - Alternative solution paths and edge cases - UI/UX and readability feedback - Review of a proposed patch (risk spotting, missing tests) ## Verification - Smoke-test the bridge: `python3 .codex/skills/collaborating-with-claude/scripts/claude_bridge.py --help`. - If you need a session: run one prompt with `--output-format stream-json` and confirm the JSON contains `success: true` and a `SESSION_ID`. - Note: `--output-format text` won’t include a newly generated session id; use `stream-json`/`json` to capture it. If you resume with `--SESSION_ID` in `text` mode, the bridge echoes that `SESSION_ID` in its JSON output. ## Safety & guardrails - Never paste secrets (private keys, API keys, seed phrases) into prompts. - For code changes, request **Unified Diff Patch ONLY** and apply changes yourself. - Treat Claude output as suggestions; verify locally (tests, lint, build) before merging. ## Collaboration State Capsule Keep this short block updated near the end of your reply while collaborating: ```text [Claude Collaboration Capsule] Goal: Claude SESSION_ID: Files/lines handed off: Last ask: Claude summary: Next ask: ``` ## References - `assets/prompt-template.md` (prompt patterns) - `references/shell-quoting.md` (shell quoting/backticks)
Related Skills
collaborating-with-gemini
Use when you want Gemini CLI as a second opinion for coding tasks such as prototyping, debugging, or diff review, while keeping Codex as the primary implementer.
collaborating-with-codex
Use when you explicitly want a second Codex CLI session to prototype, debug, or review code, while your current session remains the primary owner of the final result.
writing-anti-ai
This skill should be used when the user asks to "remove AI writing patterns", "humanize this text", "make this sound more natural", "remove AI-generated traces", "fix robotic writing", or needs to eliminate AI writing patterns from prose. Supports both English and Chinese text. Based on Wikipedia's "Signs of AI writing" guide, detects and fixes inflated symbolism, promotional language, superficial -ing analyses, vague attributions, AI vocabulary, negative parallelisms, and excessive conjunctive phrases.
xhs-note-creator
小红书笔记素材创作技能。当用户需要创建小红书笔记素材时使用这个技能。技能包含:根据用户的需求和提供的资料,撰写小红书笔记内容(标题+正文),生成图片卡片(封面+正文卡片),以及发布小红书笔记。
xhs-longform-private-publisher
This skill should be used when the user wants to publish an existing Markdown article to Xiaohongshu as a private longform post, keep the original wording and structure, insert inline images in order, use one-click layout, and verify the result in note manager.
timestamped-video-summary
Generate a detailed, professional video content summary from timestamped subtitles/transcripts (e.g., lines starting with 00:00 / 1:23:45). Enforce strict per-segment structure (timestamp range + bold segment title + 2-paragraph body: first-person creator summary + expert 【导师评注】 critique with uncertainty handling). Use when the user provides time-coded subtitles and asks for a规范化纪要/内容纪要/逐段总结, and optionally wants a clean PDF export (do NOT include the full raw transcript in the PDF unless explicitly requested).
skills-governance
Use when auditing a large local skill collection, identifying duplicate or imported skills, comparing skill roots, or deciding what to keep, disable, or archive across Codex and adjacent agent skill directories.
skill-governance-loop
Use when the user asks to review a skill, analyze skill quality, update a skill version, or run a repeatable keep/disable/archive decision loop from real failures instead of abstract best practices.
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
session-recovery-codex
Use when recovering a Codex session, especially if the user provides a Codex session id or wants recent Codex sessions listed before resuming work.
research-lead-sidecar
Use when the user wants multi-agent division of labor for research-led work and the lead should stay on the critical path while 1-2 bounded sidecars handle low-coupling tasks. Do not use this for tiny tasks, fully sequential debugging, or overlapping refactors.
question-refiner
Use when a research question is still vague and must be clarified into a structured deep-research brief before actual literature research or execution. Skip this if the user already has a concrete paper draft or a ready-to-run research specification.