# Codex CLI Bridge

Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md...

- Repository: https://github.com/alirezarezvani/claude-code-skill-factory (897 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2025-11-12
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add alirezarezvani/claude-code-skill-factory --skill codex-cli-bridge -g -a claude-code -y`
Codex: `npx skills add alirezarezvani/claude-code-skill-factory --skill codex-cli-bridge -g -a codex -y`
Cursor: `npx skills add alirezarezvani/claude-code-skill-factory --skill codex-cli-bridge -g -a cursor -y`
Gemini CLI: `npx skills add alirezarezvani/claude-code-skill-factory --skill codex-cli-bridge -g -a gemini-cli -y`

## Description

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Codex CLI Bridge Skill

## Purpose

This skill creates a comprehensive bridge between **Claude Code** and **OpenAI's Codex CLI**, enabling seamless interoperability through:

1. **Documentation Translation**: Converts CLAUDE.md → AGENTS.md (reference-based, no file duplication)
2. **Execution Helpers**: Python wrappers for Codex CLI commands (always uses `codex exec`)
3. **Skill Documentation**: Makes Claude Skills accessible to Codex CLI users

## Key Capabilities

### 1. CLAUDE.md → AGENTS.md Generation
- Parses CLAUDE.md and project structure
- Scans `.claude/skills/`, `.claude/agents/`, `documentation/` folders
- Generates comprehensive AGENTS.md with file path references
- **Reference-based**: No file duplication, only links to existing files
- Documents Skills with most relevant usage method (bash scripts vs prompt references)

### 2. Safety Mechanism
- **Auto-checks Codex CLI installation** (`codex --version`)
- **Auto-runs `/init`** if CLAUDE.md missing (with user notification)
- Validates authentication and environment
- User-friendly error messages

### 3. Codex CLI Execution Helpers
- `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 tasks
- `resume_session()` - Continue last Codex session
- **Always uses `codex exec`** (never plain `codex` - critical for Claude Code)

### 4. Skill Documentation for Codex CLI
- **Prompt-only skills**: Show how to reference in Codex prompts
- **Functional skills**: Show how to execute Python scripts directly
- **Complex skills**: Show both methods
- Includes proper `codex exec` command syntax
- Model selection guidance (gpt-5 vs gpt-5-codex)

## Input Requirements

The rest: https://github.com/alirezarezvani/claude-code-skill-factory/blob/HEAD/generated-skills/codex-cli-bridge/SKILL.md
