Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
.claude/skills/alirezarezvani-codex-cli-bridge/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 148% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 106% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 109% | 0% |
This skill creates a comprehensive bridge between Claude Code and OpenAI's Codex CLI, enabling seamless interoperability through:
codex exec).claude/skills/, .claude/agents/, documentation/ folderscodex --version)/init if CLAUDE.md missing (with user notification)exec_analysis() - Read-only analysis tasks (gpt-5, read-only sandbox)exec_edit() - Code editing tasks (gpt-5-codex, workspace-write)exec_with_search() - Web search-enabled tasksresume_session() - Continue last Codex sessioncodex exec (never plain codex - critical for Claude Code)codex exec command syntaxjson{ "action": "generate-agents-md", "project_root": "/path/to/project", "options": { "validate_codex": true, "auto_init": true, "include_mcp": true, "skill_detail_level": "relevant" } }
json{ "action": "codex-exec", "task_type": "analysis|edit|search", "prompt": "Your task description", "model": "gpt-5|gpt-5-codex", "sandbox": "read-only|workspace-write|danger-full-access" }
markdown# AGENTS.md ## Project Overview [From CLAUDE.md] ## Available Skills ### Skill Name **Location**: `path/to/skill/` **Using from Codex CLI**: [Most relevant method] ## Workflow Patterns [Slash commands → Codex equivalents] ## MCP Integration [MCP server references] ## Command Reference | Claude Code | Codex CLI | |-------------|-----------| [Mappings]
python{ "status": "success|error", "output": "Command output", "session_id": "uuid", "model_used": "gpt-5|gpt-5-codex", "command": "codex exec ..." }
codex execUser prompt:
Generate AGENTS.md for this projectWhat happens:
Output: Complete AGENTS.md file in project root
User prompt:
Use Codex to analyze this codebase for security vulnerabilitiesWhat happens:
pythonfrom codex_executor import CodexExecutor executor = CodexExecutor() result = executor.exec_analysis( "Analyze this codebase for security vulnerabilities", model="gpt-5" )
Executes:
bashcodex exec -m gpt-5 -s read-only \ -c model_reasoning_effort=high \ "Analyze this codebase for security vulnerabilities"
User prompt:
Use Codex to refactor main.py for better async patternsWhat happens:
pythonexecutor = CodexExecutor() result = executor.exec_edit( "Refactor main.py for better async patterns", model="gpt-5-codex" )
Executes:
bashcodex exec -m gpt-5-codex -s workspace-write \ -c model_reasoning_effort=high \ "Refactor main.py for better async patterns"
User prompt:
Continue the previous Codex sessionWhat happens:
pythonexecutor = CodexExecutor() result = executor.resume_session()
Executes:
bashcodex exec resume --last
codex exec always (never plain codex in Claude Code)gpt-5: General reasoning, architecture, analysisgpt-5-codex: Code editing, specialized coding tasksread-only: Safe analysis (default)workspace-write: File modificationsdanger-full-access: Network access (rarely needed)--search flag)This skill integrates with existing Claude Code commands:
/init: Auto-generates AGENTS.md after CLAUDE.md creation/update-claude: Regenerates AGENTS.md when CLAUDE.md changes/check-docs: Validates AGENTS.md exists and is in sync/sync-agents-md: Manual AGENTS.md regeneration/codex-exec <task>: Wrapper using codex_executor.pybash codex --version # Should show v0.48.0 or higher
bash codex login
Option 1: Copy to project
bashcp -r generated-skills/codex-cli-bridge ~/.claude/skills/
Option 2: Use from this repository
bash# Skill auto-discovered when Claude Code loads this project
Solution: Install Codex CLI and ensure it's in PATH
bashwhich codex # Should return path codex --version # Should work
Solution: Skill auto-runs /init with notification. If it fails:
bash# Manually run /init /init
Solution: Always use codex exec, never plain codex
bash❌ codex -m gpt-5 "task" ✅ codex exec -m gpt-5 "task"
Solution: Regenerate manually
bash/sync-agents-md
openai-codex-cli-instructions.mdclaude-skills-instructions.mdclaude-skills-examples/codex-cli-skill.mdv1.0.0 - Initial release (2025-10-30)
Apache 2.0
Created by: Claude Code Skills Factory Maintained for: Cross-tool team collaboration (Claude Code ↔ Codex CLI) Sync Status: Reference-based bridge (one-way sync: CLAUDE.md → AGENTS.md)
Other measured skills in the registry, with their headline benchmark lift.