Claude Skill

cc-codex

Delegates coding tasks to Codex CLI for prototyping, debugging, and code review. Use when: (1) Backend/logic implementation, (2) Algorithm design and optimization, (3) Bug analysis and debugging, (4) API/database code generation, (5) Code quality review and refactoring. Triggers:

LLM Mart · 0 points · 2 views 0 listing impressions 0 install-command copies
Download Dianel555-DSkills-skills_cc-codex-d2fda23.zip · 16 KB

Install

skills CLI npx skills add https://github.com/Dianel555/DSkills/tree/main/skills/cc-codex
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dianel555-dskills@llmmart
Git git clone https://github.com/Dianel555/DSkills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole dianel555/dskills collection as a plugin from our marketplace. Git is the plain clone.

README

cc-codex

A Claude Code Agent Skill that bridges Claude with OpenAI Codex CLI for multi-model collaboration on coding tasks.

Overview

This Skill enables Claude to delegate coding tasks to Codex CLI, combining the strengths of multiple AI models. Codex handles algorithm implementation, debugging, and code analysis while Claude orchestrates the workflow and refines the output.

Codex config (~/.codex/config.toml), hooks, MCP servers, plugins, skills, and AGENTS.md are loaded by the Codex process itself. This bridge does not sync Claude Code MCP/hooks/plugins into Codex — the two runtimes stay separate.

Features

  • Multi-turn sessions: Maintain conversation context across multiple interactions via SESSION_ID
  • Sandboxed execution: Three security levels (read-only, workspace-write, danger-full-access)
  • JSON output: Structured responses for easy parsing and integration
  • Image support: Attach images to prompts for visual context
  • Cross-platform: Windows path escaping handled automatically
  • Config isolation: Optional --ignore-user-config
  • Hook trust bypass: Optional --dangerously-bypass-hook-trust for vetted automation
  • Management passthrough: mcp / plugin subcommands forward to codex mcp|plugin

Installation

  1. Ensure Codex CLI is installed and available in your PATH
  2. Copy this Skill to your Claude Code skills directory:
    • User-level: ~/.claude/skills/cc-codex/
    • Project-level: .claude/skills/cc-codex/

Or install via the DSkills marketplace entry cc-codex.

Usage

Basic

python scripts/codex_bridge.py --cd "/path/to/project" --PROMPT "Analyze the authentication flow"

Multi-turn Session

# Start a session
python scripts/codex_bridge.py --cd "/project" --PROMPT "Review login.py for security issues"
# Response includes SESSION_ID

# Continue the session
python scripts/codex_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Suggest fixes for the issues found"

Manage Codex MCP / plugins

python scripts/codex_bridge.py mcp list
python scripts/codex_bridge.py plugin list
python scripts/codex_bridge.py plugin marketplace list

Parameters

Parameter Required Description
--PROMPT Yes* Task instruction (*not required for mcp/plugin subcommands)
--cd Yes* Workspace root directory
--sandbox No Security level: read-only (default), workspace-write, danger-full-access
--SESSION_ID No Resume a previous session
--return-all-messages No Include full reasoning trace in output
--image No Attach image files (comma-separated or repeated)
--model No Specify model (use only when explicitly requested)
--profile No Codex profile name (use only when explicitly requested)
--yolo No Bypass all approvals (use with caution)
--ignore-user-config No Skip loading $CODEX_HOME/config.toml
--dangerously-bypass-hook-trust No Run hooks without persisted trust (dangerous)

Output Format

{
  "success": true,
  "SESSION_ID": "uuid",
  "agent_messages": "Codex response text",
  "stream_file": "/tmp/codex_stream_....jsonl",
  "all_messages": []
}

Passthrough (mcp / plugin) output:

{
  "success": true,
  "output": "...",
  "error": "",
  "returncode": 0
}

License

MIT License. See LICENSE for details.

Skill manifest

Quick Start

python scripts/codex_bridge.py --cd "/path/to/project" --PROMPT "Your task"

Output: JSON with success, SESSION_ID, agent_messages, stream_file (path to the raw JSONL stream persisted line-by-line), optional stderr (codex diagnostics; lines repeated verbatim except for their timestamp are collapsed to one line with an [xN] count), and optional error.

Headless exec runs with approvals disabled by Codex itself; bridge --yolo maps to Codex's --dangerously-bypass-approvals-and-sandbox. Stdin is detached, so an approval prompt could never be answered. On Windows the PROMPT is delivered via stdin (- positional) to bypass cmd.exe quoting/length limits.

Parameters

usage: codex_bridge.py [-h] [--PROMPT PROMPT] [--cd CD]
                       [--sandbox {read-only,workspace-write,danger-full-access}]
                       [--SESSION_ID SESSION_ID] [--skip-git-repo-check]
                       [--return-all-messages] [--image IMAGE] [--model MODEL]
                       [--yolo] [--profile PROFILE] [--stream-file STREAM_FILE]
                       [--idle-timeout IDLE_TIMEOUT] [--ignore-user-config]
                       [--dangerously-bypass-hook-trust]
                       {mcp,plugin} ...

Codex Bridge

options:
  --PROMPT PROMPT       Instruction for the task to send to codex.
  --cd CD               Set the workspace root for codex before executing the task.
  --sandbox {read-only,workspace-write,danger-full-access}
                        Sandbox policy for model-generated commands. Defaults to `read-only`.
  --SESSION_ID SESSION_ID
                        Resume the specified session of the codex.
  --skip-git-repo-check
                        Allow codex running outside a Git repository.
  --return-all-messages
                        Return all messages (reasoning, tool calls, etc.).
  --image IMAGE         Attach image files to the initial prompt.
  --model MODEL         Model for the session (only when user explicitly requests).
  --yolo                Bypass approvals/sandboxing (last resort).
  --profile PROFILE     Load `~/.codex/<name>.config.toml` profile (only when user requests).
  --stream-file STREAM_FILE
                        Persist raw JSONL stream path.
  --idle-timeout IDLE_TIMEOUT
                        Kill codex if no output for N seconds (default 600; 0 disables).
  --ignore-user-config  Do not load `$CODEX_HOME/config.toml` (auth still uses CODEX_HOME).
  --dangerously-bypass-hook-trust
                        Run Codex hooks without persisted hook trust. DANGEROUS.

subcommands:
  mcp                   Thin passthrough to `codex mcp` (list/get/add/remove/login/logout).
  plugin                Thin passthrough to `codex plugin` (add/list/remove/marketplace).

Multi-turn Sessions

Always capture SESSION_ID from the first response for follow-up:

# Initial task
python scripts/codex_bridge.py --cd "/project" --PROMPT "Analyze auth in login.py"

# Continue with SESSION_ID
python scripts/codex_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Write unit tests for that"

Config Inheritance

Source Inherited by default?
~/.codex/config.toml Yes (unless --ignore-user-config)
Profile (--profile) Only when explicitly passed
Project .codex/ (trusted) Yes, when Codex trusts the project
Hooks / MCP / plugins / skills / AGENTS.md Yes, via Codex runtime

Management Passthrough

python scripts/codex_bridge.py mcp list
python scripts/codex_bridge.py plugin list

Common Patterns

Prototyping (read-only, request diffs):

python scripts/codex_bridge.py --cd "/project" --PROMPT "Generate unified diff to add logging"

Verification (codex must run tests/builds — read-only blocks them):

python scripts/codex_bridge.py --cd "/project" --sandbox workspace-write --PROMPT "Run pytest, fix the failure, output a unified diff patch"

Keep requesting patch text; audit afterwards with git status && git diff.

Debug with full trace:

python scripts/codex_bridge.py --cd "/project" --PROMPT "Debug this error" --return-all-messages

Headless hooks (vetted automation only):

python scripts/codex_bridge.py --cd "/project" --PROMPT "..." --dangerously-bypass-hook-trust
Files (dskills)
  • scripts
    • codex_bridge.py 22.2 KB
      Loading…
  • tests
    • test_codex_bridge.py 21.4 KB
      Loading…
  • README.md 3.5 KB
    # cc-codex
    
    A Claude Code **Agent Skill** that bridges Claude with OpenAI Codex CLI for multi-model collaboration on coding tasks.
    
    ## Overview
    
    This Skill enables Claude to delegate coding tasks to Codex CLI, combining the strengths of multiple AI models. Codex handles algorithm implementation, debugging, and code analysis while Claude orchestrates the workflow and refines the output.
    
    Codex config (`~/.codex/config.toml`), hooks, MCP servers, plugins, skills, and `AGENTS.md` are loaded by the **Codex process itself**. This bridge does not sync Claude Code MCP/hooks/plugins into Codex — the two runtimes stay separate.
    
    ## Features
    
    - **Multi-turn sessions**: Maintain conversation context across multiple interactions via `SESSION_ID`
    - **Sandboxed execution**: Three security levels (`read-only`, `workspace-write`, `danger-full-access`)
    - **JSON output**: Structured responses for easy parsing and integration
    - **Image support**: Attach images to prompts for visual context
    - **Cross-platform**: Windows path escaping handled automatically
    - **Config isolation**: Optional `--ignore-user-config`
    - **Hook trust bypass**: Optional `--dangerously-bypass-hook-trust` for vetted automation
    - **Management passthrough**: `mcp` / `plugin` subcommands forward to `codex mcp|plugin`
    
    ## Installation
    
    1. Ensure [Codex CLI](https://github.com/openai/codex) is installed and available in your PATH
    2. Copy this Skill to your Claude Code skills directory:
       - User-level: `~/.claude/skills/cc-codex/`
       - Project-level: `.claude/skills/cc-codex/`
    
    Or install via the DSkills marketplace entry `cc-codex`.
    
    ## Usage
    
    ### Basic
    
    ```bash
    python scripts/codex_bridge.py --cd "/path/to/project" --PROMPT "Analyze the authentication flow"
    ```
    
    ### Multi-turn Session
    
    ```bash
    # Start a session
    python scripts/codex_bridge.py --cd "/project" --PROMPT "Review login.py for security issues"
    # Response includes SESSION_ID
    
    # Continue the session
    python scripts/codex_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Suggest fixes for the issues found"
    ```
    
    ### Manage Codex MCP / plugins
    
    ```bash
    python scripts/codex_bridge.py mcp list
    python scripts/codex_bridge.py plugin list
    python scripts/codex_bridge.py plugin marketplace list
    ```
    
    ### Parameters
    
    | Parameter | Required | Description |
    |-----------|----------|-------------|
    | `--PROMPT` | Yes* | Task instruction (*not required for `mcp`/`plugin` subcommands) |
    | `--cd` | Yes* | Workspace root directory |
    | `--sandbox` | No | Security level: `read-only` (default), `workspace-write`, `danger-full-access` |
    | `--SESSION_ID` | No | Resume a previous session |
    | `--return-all-messages` | No | Include full reasoning trace in output |
    | `--image` | No | Attach image files (comma-separated or repeated) |
    | `--model` | No | Specify model (use only when explicitly requested) |
    | `--profile` | No | Codex profile name (use only when explicitly requested) |
    | `--yolo` | No | Bypass all approvals (use with caution) |
    | `--ignore-user-config` | No | Skip loading `$CODEX_HOME/config.toml` |
    | `--dangerously-bypass-hook-trust` | No | Run hooks without persisted trust (dangerous) |
    
    ### Output Format
    
    ```json
    {
      "success": true,
      "SESSION_ID": "uuid",
      "agent_messages": "Codex response text",
      "stream_file": "/tmp/codex_stream_....jsonl",
      "all_messages": []
    }
    ```
    
    Passthrough (`mcp` / `plugin`) output:
    
    ```json
    {
      "success": true,
      "output": "...",
      "error": "",
      "returncode": 0
    }
    ```
    
    ## License
    
    MIT License. See [LICENSE](LICENSE) for details.
    
  • ruff.toml 656 B
    Loading…
  • SKILL.md 5 KB
    ---
    name: cc-codex
    description: |
      Delegates coding tasks to Codex CLI for prototyping, debugging, and code review. Use when: (1) Backend/logic implementation, (2) Algorithm design and optimization, (3) Bug analysis and debugging, (4) API/database code generation, (5) Code quality review and refactoring. Triggers: "implement algorithm", "debug", "analyze code", "backend task", "API implementation", "optimize performance", "refactor", "generate prototype", "code review". IMPORTANT: Default sandbox="read-only" (analysis/review/patch generation); use sandbox="workspace-write" only when codex must run tests/builds to verify. Always request unified diff patches only. Supports multi-turn sessions via SESSION_ID.
    ---
    
    ## Quick Start
    
    ```bash
    python scripts/codex_bridge.py --cd "/path/to/project" --PROMPT "Your task"
    ```
    
    **Output:** JSON with `success`, `SESSION_ID`, `agent_messages`, `stream_file` (path to the raw JSONL stream persisted line-by-line), optional `stderr` (codex diagnostics; lines repeated verbatim except for their timestamp are collapsed to one line with an `[xN]` count), and optional `error`.
    
    Headless `exec` runs with approvals disabled by Codex itself; bridge `--yolo` maps to Codex's `--dangerously-bypass-approvals-and-sandbox`. Stdin is detached, so an approval prompt could never be answered. On Windows the PROMPT is delivered via stdin (`-` positional) to bypass cmd.exe quoting/length limits.
    
    ## Parameters
    
    ```
    usage: codex_bridge.py [-h] [--PROMPT PROMPT] [--cd CD]
                           [--sandbox {read-only,workspace-write,danger-full-access}]
                           [--SESSION_ID SESSION_ID] [--skip-git-repo-check]
                           [--return-all-messages] [--image IMAGE] [--model MODEL]
                           [--yolo] [--profile PROFILE] [--stream-file STREAM_FILE]
                           [--idle-timeout IDLE_TIMEOUT] [--ignore-user-config]
                           [--dangerously-bypass-hook-trust]
                           {mcp,plugin} ...
    
    Codex Bridge
    
    options:
      --PROMPT PROMPT       Instruction for the task to send to codex.
      --cd CD               Set the workspace root for codex before executing the task.
      --sandbox {read-only,workspace-write,danger-full-access}
                            Sandbox policy for model-generated commands. Defaults to `read-only`.
      --SESSION_ID SESSION_ID
                            Resume the specified session of the codex.
      --skip-git-repo-check
                            Allow codex running outside a Git repository.
      --return-all-messages
                            Return all messages (reasoning, tool calls, etc.).
      --image IMAGE         Attach image files to the initial prompt.
      --model MODEL         Model for the session (only when user explicitly requests).
      --yolo                Bypass approvals/sandboxing (last resort).
      --profile PROFILE     Load `~/.codex/<name>.config.toml` profile (only when user requests).
      --stream-file STREAM_FILE
                            Persist raw JSONL stream path.
      --idle-timeout IDLE_TIMEOUT
                            Kill codex if no output for N seconds (default 600; 0 disables).
      --ignore-user-config  Do not load `$CODEX_HOME/config.toml` (auth still uses CODEX_HOME).
      --dangerously-bypass-hook-trust
                            Run Codex hooks without persisted hook trust. DANGEROUS.
    
    subcommands:
      mcp                   Thin passthrough to `codex mcp` (list/get/add/remove/login/logout).
      plugin                Thin passthrough to `codex plugin` (add/list/remove/marketplace).
    ```
    
    ## Multi-turn Sessions
    
    **Always capture `SESSION_ID`** from the first response for follow-up:
    
    ```bash
    # Initial task
    python scripts/codex_bridge.py --cd "/project" --PROMPT "Analyze auth in login.py"
    
    # Continue with SESSION_ID
    python scripts/codex_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Write unit tests for that"
    ```
    
    ## Config Inheritance 
    
    | Source | Inherited by default? |
    |--------|------------------------|
    | `~/.codex/config.toml` | Yes (unless `--ignore-user-config`) |
    | Profile (`--profile`) | Only when explicitly passed |
    | Project `.codex/` (trusted) | Yes, when Codex trusts the project |
    | Hooks / MCP / plugins / skills / `AGENTS.md` | Yes, via Codex runtime |
    
    ## Management Passthrough
    
    ```bash
    python scripts/codex_bridge.py mcp list
    python scripts/codex_bridge.py plugin list
    ```
    
    ## Common Patterns
    
    **Prototyping (read-only, request diffs):**
    ```bash
    python scripts/codex_bridge.py --cd "/project" --PROMPT "Generate unified diff to add logging"
    ```
    
    **Verification (codex must run tests/builds — read-only blocks them):**
    ```bash
    python scripts/codex_bridge.py --cd "/project" --sandbox workspace-write --PROMPT "Run pytest, fix the failure, output a unified diff patch"
    ```
    Keep requesting patch text; audit afterwards with `git status && git diff`.
    
    **Debug with full trace:**
    ```bash
    python scripts/codex_bridge.py --cd "/project" --PROMPT "Debug this error" --return-all-messages
    ```
    
    **Headless hooks (vetted automation only):**
    ```bash
    python scripts/codex_bridge.py --cd "/project" --PROMPT "..." --dangerously-bypass-hook-trust
    ```
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.