mcpbeat Sign in

Collaborating With Claude Agent Skill

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.

5k tokens
context cost
the whole folder, loaded on every use
4
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
392
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/appautomaton/latex-arxiv-SKILL --skill collaborating-with-claude

The instruction itself

15 sections, as written by the author

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 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.

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-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:

[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)

Other skills for the same job

different authors, same section of the catalogue
Gemini
by softaworks
×2

Use when the user asks to run Gemini CLI for code review, plan review, or big context (>200k) processing. Ideal for comprehensive analysis requiring large context windows. Uses Gemini 3 Pro by default for state-of-the-art reasoning and coding.

5k tokens
Claude Skills
by ComeOnOliver
×2

Claude Skills meta-skill: extract domain material (docs/APIs/code/specs) into a reusable Skill (SKILL.md + references/scripts/assets), and refactor existing Skills for clarity, activation reliability, and quality gates.

13k tokens scripts
Backend Atomic Commit
by ComeOnOliver
×1

> Pedantic backend pre-commit and atomic commit Skill for Django/Optimo-style repos. Enforces local AGENTS.md / CLAUDE.md, pre-commit hooks, .security/* helpers, and Monty’s backend engineering taste – with no AI signatures in commit messages.

14k tokens
Safe Edit
by ComeOnOliver
×1

Automatically backs up files, saves diffs, uses agents/skills, and ensures modular code (<200 lines) before any implementation. Use this skill for ALL code changes to ensure safe, reversible, and clean implementations.

11k tokens
Sharing Skills
by ComeOnOliver
×1

Use when you've developed a broadly useful skill and want to contribute it upstream via pull request - guides process of branching, committing, pushing, and creating PR to contribute skills back to upstream repository

4k tokens
Od Code Migration
by nexu-io

Default reference pipeline for the code-migration taskKind — code-import → design-extract → token-map → rewrite-plan → patch-edit ↔ build-test devloop → diff-review → handoff.

4k tokens
Review Agent Setup
by wshobson

Configure human-in-the-loop gating for AI agent review actions in Claude Code. Use when setting up a project where an agent may post PR reviews, comments, merges, or edit CI configuration, and you want a cryptographically auditable approval trail with Cedar-enforced gates.

1k tokens
Auto Updater
by anthropics
vendor

> Check installed community skills for updates. Shows a diff and requires explicit approval before applying. Use when the user says "check for updates", "update my skills", "anything new for my installed skills", or when invoked from the registry-sync agent.

2k tokens

How to use it

Copy the folder

Take appautomaton/collaborating-with-claude from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.