collaborating-with-claude
Enables multi-turn collaboration with Claude Code for review and prototyping.
Install
mkdir -p .claude/skills/collaborating-with-claude && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18662" && unzip -o skill.zip -d .claude/skills/collaborating-with-claude && rm skill.zipInstalls to .claude/skills/collaborating-with-claude
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use the Claude Code CLI to consult Claude and delegate coding tasks for prototyping, debugging, and code review. Supports multi-turn sessions via SESSION_ID. Optimized for low-token, file/line-based handoff.Key capabilities
- →Delegate coding tasks to Claude Code CLI
- →Get a second opinion on design tradeoffs
- →Request a unified diff patch for code changes
- →Support multi-turn sessions via SESSION_ID
- →Review proposed patches for risks
How it works
The skill uses a Python bridge script to interact with the Claude Code CLI, allowing for delegation of coding tasks. It supports multi-turn sessions and focuses on generating unified diff patches.
Inputs & outputs
When to use collaborating-with-claude
- →Getting design feedback
- →Reviewing code changes
- →Multi-turn prototyping
About this skill
Collaborating with Claude Code (Codex)
Use Claude Code CLI as a collaborator while keeping Codex as the primary implementer.
Host note: this skill is written for a Codex host. If you are already running inside Claude Code, do not bridge to Claude Code (that would be circular); use your own capabilities or another collaborator skill.
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
claudedirectly; 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
--cdset to the repo root (it sets theclaudeprocess working directory); use--add-dirwhen 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
--helpfirst if you are unsure of parameters. - Always capture
SESSION_IDand 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_msto 600000 (10 minutes) unless a shorter/longer timeout is explicitly required. - Default model: prefer
sonnetfor routine work; useopusonly for complex tasks or when explicitly requested. - Ensure Claude Code is logged in before running headless commands (run
claudeand/loginonce 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.jsonand.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.
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
# 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-jsonand confirm the JSON containssuccess: trueand aSESSION_ID. - Note:
--output-format textwon’t include a newly generated session id; usestream-json/jsonto capture it. If you resume with--SESSION_IDintextmode, the bridge echoes thatSESSION_IDin 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:
[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)
When not to use it
- →When the task is trivial or one-shot
- →When authoritative facts requiring browsing/citations are needed
- →When pasting sensitive data like secrets or private keys
Limitations
- →Claude is a collaborator; the user owns the final result and must verify changes locally
- →Does not directly edit files; requests Unified Diff Patch ONLY for code changes
- →Requires Claude Code to be logged in for headless commands
How it compares
This skill provides a structured way to collaborate with Claude Code for specific tasks like code review and diff generation, unlike directly interacting with Claude for general queries.
Compared to similar skills
collaborating-with-claude side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| collaborating-with-claude (this skill) | 0 | 16d | Review | Intermediate |
| claude-automation-recommender | 47 | 2mo | Review | Beginner |
| subagent-driven-development | 14 | 7mo | No flags | Advanced |
| coding-agent | 16 | 2mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by appautomaton
View all by appautomaton →You might also like
claude-automation-recommender
anthropics
Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.
subagent-driven-development
davila7
Use when executing implementation plans with independent tasks in the current session
coding-agent
openclaw
Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background process for programmatic control.
requesting-code-review
obra
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
omo
cexll
Use this skill when you see `/omo`. Multi-agent orchestration for "code analysis / bug investigation / fix planning / implementation". Choose the minimal agent set and order based on task type + risk; recipes below show common patterns.
parallel-agents
davila7
Multi-agent orchestration patterns. Use when multiple independent tasks can run with different domain expertise or when comprehensive analysis requires multiple perspectives.