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
npx skills add https://github.com/alirezarezvani/claude-code-skill-factory --skill codex-cli-bridge
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 project
What happens:
Output: Complete AGENTS.md file in project root
User prompt:
Use Codex to analyze this codebase for security vulnerabilities
What 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 patterns
What 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 session
What happens:
executor = CodexExecutor()
result = executor.resume_session()
Executes:
codex 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.py codex --version # Should show v0.48.0 or higher
codex login
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 project
Solution: Install Codex CLI and ensure it's in PATH
which codex # Should return path
codex --version # Should work
Solution: Skill auto-runs /init with notification. If it fails:
# Manually run /init
/init
Solution: Always use codex exec, never plain codex
❌ codex -m gpt-5 "task"
✅ codex exec -m gpt-5 "task"
Solution: Regenerate manually
/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)
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
Coding Agent Session Search - unified CLI/TUI to index and search local coding agent history from Claude Code, Codex, Gemini, Cursor, Aider, ChatGPT, Pi-Agent, Factory, and more. Purpose-built for AI agent consumption with robot mode.
Destructive Command Guard - High-performance Rust hook for Claude Code that blocks dangerous commands before execution. SIMD-accelerated, modular pack system, whitelist-first architecture. Essential safety layer for agent workflows.
Makepad UI development skills for Rust apps: setup, patterns, shaders, packaging, and troubleshooting.
Secure environment variable management ensuring secrets are never exposed in Claude sessions, terminals, logs, or git commits
Prompt for generating an AGENTS.md file for a repository
Take alirezarezvani/codex-cli-bridge from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
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.