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
64
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillEvaluation — 95%
↑ 1.61xAgent success when using this skill
Validation for skill structure
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 syntax{
"action": "generate-agents-md",
"project_root": "/path/to/project",
"options": {
"validate_codex": true,
"auto_init": true,
"include_mcp": true,
"skill_detail_level": "relevant"
}
}{
"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"
}# 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]{
"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:
from codex_executor import CodexExecutor
executor = CodexExecutor()
result = executor.exec_analysis(
"Analyze this codebase for security vulnerabilities",
model="gpt-5"
)Executes:
codex 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:
executor = CodexExecutor()
result = executor.exec_edit(
"Refactor main.py for better async patterns",
model="gpt-5-codex"
)Executes:
codex 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:
executor = CodexExecutor()
result = executor.resume_session()Executes:
codex exec resume --lastcodex 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.pyCodex CLI installed:
codex --version # Should show v0.48.0 or higherCodex authenticated:
codex loginClaude Code v1.0+
Option 1: Copy to project
cp -r generated-skills/codex-cli-bridge ~/.claude/skills/Option 2: Use from this repository
# Skill auto-discovered when Claude Code loads this projectSolution: Install Codex CLI and ensure it's in PATH
which codex # Should return path
codex --version # Should workSolution: Skill auto-runs /init with notification. If it fails:
# Manually run /init
/initSolution: Always use codex exec, never plain codex
❌ codex -m gpt-5 "task"
✅ codex exec -m gpt-5 "task"Solution: Regenerate manually
/sync-agents-mdopenai-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)
758705b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.