A bidirectional skill that enables AI-to-AI code comparison and review between Claude Code and OpenAI's Codex.
✅ Bidirectional - Claude can call Codex, or Codex can call Claude ✅ CLI-based - No API keys or pip dependencies required ✅ Automatic truncation - Handles large contexts gracefully ✅ CLI validation - Checks for tool availability before calling ✅ Configurable timeout - Customize response times ✅ Enhanced error handling - Clear, actionable error messages
-
Copy the skill directory to
~/.claude/skills/:cp -r codex-compare ~/.claude/skills/ -
Ensure both CLIs are installed:
- Codex CLI -
codexcommand - Claude Code -
claudecommand
- Codex CLI -
-
Restart Claude Code to load the skill
When using Claude Code, simply ask:
- "Compare this with Codex"
- "Ask Codex to review this code"
- "What would Codex do differently?"
- "Get Codex's opinion on this"
Claude will automatically:
- Gather the context (task, code, files)
- Call Codex CLI
- Present a formatted side-by-side comparison
codex-compare/
├── SKILL.md # Main skill documentation
├── scripts/
│ ├── call_codex.py # Call Codex from Claude
│ └── call_claude.py # Call Claude from Codex
└── references/
└── prompting-guide.md # Best practices for AI prompting
# Claude's approach
def validate_password(password):
# Simple, readable implementation
...
# Codex's feedback
# - Suggests configurability
# - Recommends input validation
# - Proposes using string.punctuation- Claude: Prioritizes clarity and simplicity
- Codex: Emphasizes configurability and robustness
- Both: Correct implementations with different trade-offs
Input JSON format:
{
"task_description": "Create a function to...",
"claude_solution": "def my_function()...",
"file_context": "Optional file context",
"additional_context": "Optional constraints",
"timeout": 60
}Automatic truncation limits:
- Task description: 2000 chars
- Code solution: 5000 chars
- File context: 1000 chars
- Additional context: 2000 chars
- Claude Code CLI installed
- Codex CLI installed
- Python 3.7+ (standard library only)
- No pip dependencies needed!
- CLI Detection - Validates that both CLIs are available
- Context Gathering - Collects task, code, and relevant context
- Truncation - Automatically truncates large inputs to prevent overflow
- CLI Execution - Calls the target AI via subprocess
- Error Handling - Captures failures with actionable messages
- Formatted Output - Presents comparison in readable markdown
Created using the skill-creator workflow with iterative improvements based on Codex's own review of the implementation.
- ✅ Simple, clean architecture
- ✅ Works as demonstrated
- ✅ Practical improvements implemented
- ✅ Avoided over-engineering
MIT
Issues and pull requests welcome! This skill was collaboratively developed by Claude and refined based on Codex's feedback.
Built with: Claude Code Skill Framework Reviewed by: Codex (meta!)