Collaborate with Claude Code for code review, debugging, and solution comparison. Operations teams use this to integrate Claude Code's capabilities into their workflows via a JSON bridge script. Connects to Codex CLI for structured JSON results.
git clone https://github.com/ZhenHuangLab/collaborating-with-claude-code.gitThe collaborating-with-claude-code skill integrates Claude Code CLI into Codex workflows through a JSON bridge script that handles code review, debugging, and solution comparison tasks. It sends work to Claude Code (default model: claude-opus-4-6) and returns structured JSON results compatible with multi-model agent systems. The skill uses progressive disclosure context engineering so Codex learns the script interface efficiently within one or two tool calls, without repeatedly searching documentation. It also handles compatibility with Anthropic-compatible proxy APIs that enforce strict message structure validation when extended thinking is enabled, by breaking long agentic loops into shorter ones. Operations teams and developers use this skill to automate code analysis tasks while maintaining clean JSON output suitable for downstream processing.
[{"step":"Install the JSON bridge script from the Claude Code repository (./bridge/claude_code_json_bridge.py) and ensure Codex CLI is installed (pip install codex-cli).","tip":"Verify the bridge script has execute permissions and the Codex CLI is authenticated with your Claude Code API key."},{"step":"Prepare your project by creating a task-specific prompt file (e.g., review_prompt.txt) with your requirements, then run: `codex --bridge ./bridge/claude_code_json_bridge.py --prompt review_prompt.txt --project-path /path/to/your/codebase`","tip":"For large codebases, limit the scope by specifying a subdirectory in the project path to reduce processing time."},{"step":"Review the JSON output and integrate the suggested fixes into your development workflow. Use the performance metrics to prioritize changes.","tip":"Compare the 'alternatives' section against your current architecture constraints before implementing changes."},{"step":"For iterative improvements, modify the prompt to focus on specific issues and rerun the analysis after implementing fixes.","tip":"Use the 'severity' field in findings to prioritize high-impact issues first. Track progress by comparing performance metrics between runs."},{"step":"Document the changes in your team's code review system (e.g., GitHub PRs, GitLab MRs) with references to the Claude Code analysis.","tip":"Include the JSON output as an attachment or comment in the review system to provide context for reviewers."}]
Code review and security audit of authentication flows
Debugging production issues with structured analysis output
Comparing multiple solution proposals for a single problem
Automated code quality checks in CI/CD pipelines
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/ZhenHuangLab/collaborating-with-claude-codeCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use Claude Code to [TASK] for the following codebase: [PROJECT_PATH]. Provide a structured JSON response with: 1) Key findings, 2) Suggested fixes with line numbers, 3) Performance impact analysis, 4) Alternative solutions comparison. Format as: { 'findings': [], 'fixes': [], 'performance': { 'current': [], 'optimized': [] }, 'alternatives': [] }```json
{
"findings": [
{
"severity": "high",
"issue": "Memory leak in data processing pipeline detected in utils/data_loader.py (lines 45-52)",
"evidence": "Heap usage increases by 15% per 1000 records processed",
"impact": "Causes application crashes after ~50k records"
},
{
"severity": "medium",
"issue": "Race condition in user session management (auth/middleware.py:112)",
"evidence": "Intermittent failed logins under high concurrency",
"impact": "1-2% login failures during peak hours"
}
],
"fixes": [
{
"file": "utils/data_loader.py",
"line": 47,
"fix": "Replace list.append() with generator expression to reduce memory footprint",
"code": "# Before: data = []\n# for record in records:\n# data.append(process(record))\n# After: data = (process(record) for record in records)"
},
{
"file": "auth/middleware.py",
"line": 112,
"fix": "Add thread-safe session locking using threading.Lock()",
"code": "session_lock = threading.Lock()\nwith session_lock:\n validate_session(user_token)"
}
],
"performance": {
"current": {
"memory_usage": "~800MB for 50k records",
"processing_time": "12.5s per batch",
"throughput": "4,000 records/hour"
},
"optimized": {
"memory_usage": "~450MB for 50k records (-44%)",
"processing_time": "7.2s per batch (-42%)",
"throughput": "7,200 records/hour (+80%)"
}
},
"alternatives": [
{
"solution": "Use multiprocessing.Pool for CPU-bound tasks",
"pros": ["Better CPU utilization", "No GIL contention"],
"cons": ["Higher memory usage", "Complex error handling"],
"when_to_use": "For pure computation tasks with large datasets"
},
{
"solution": "Implement asyncio for I/O-bound operations",
"pros": ["Non-blocking operations", "Lower memory footprint"],
"cons": ["Requires async/await syntax", "Debugging complexity"],
"when_to_use": "For network-bound applications with many connections"
}
]
}
```AI assistant built for thoughtful, nuanced conversation
IronCalc is a spreadsheet engine and ecosystem
ITIL-aligned IT service management platform
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan