$npx -y skills add Dianel555/DSkills --skill cc-codexDelegates 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:
| 1 | ## Quick Start |
| 2 | |
| 3 | ```bash |
| 4 | python scripts/codex_bridge.py --cd "/path/to/project" --PROMPT "Your task" |
| 5 | ``` |
| 6 | |
| 7 | **Output:** JSON with `success`, `SESSION_ID`, `agent_messages`, `stream_file` (path to the raw JSONL stream persisted line-by-line), optional `stderr`, and optional `error`. |
| 8 | |
| 9 | ## Parameters |
| 10 | |
| 11 | ``` |
| 12 | usage: codex_bridge.py [-h] [--PROMPT PROMPT] [--cd CD] |
| 13 | [--sandbox {read-only,workspace-write,danger-full-access}] |
| 14 | [--SESSION_ID SESSION_ID] [--skip-git-repo-check] |
| 15 | [--return-all-messages] [--image IMAGE] [--model MODEL] |
| 16 | [--yolo] [--profile PROFILE] [--stream-file STREAM_FILE] |
| 17 | [--idle-timeout IDLE_TIMEOUT] [--ignore-user-config] |
| 18 | [--dangerously-bypass-hook-trust] |
| 19 | {mcp,plugin} ... |
| 20 | |
| 21 | Codex Bridge |
| 22 | |
| 23 | options: |
| 24 | --PROMPT PROMPT Instruction for the task to send to codex. |
| 25 | --cd CD Set the workspace root for codex before executing the task. |
| 26 | --sandbox {read-only,workspace-write,danger-full-access} |
| 27 | Sandbox policy for model-generated commands. Defaults to `read-only`. |
| 28 | --SESSION_ID SESSION_ID |
| 29 | Resume the specified session of the codex. |
| 30 | --skip-git-repo-check |
| 31 | Allow codex running outside a Git repository. |
| 32 | --return-all-messages |
| 33 | Return all messages (reasoning, tool calls, etc.). |
| 34 | --image IMAGE Attach image files to the initial prompt. |
| 35 | --model MODEL Model for the session (only when user explicitly requests). |
| 36 | --yolo Bypass approvals/sandboxing (last resort). |
| 37 | --profile PROFILE Load `~/.codex/<name>.config.toml` profile (only when user requests). |
| 38 | --stream-file STREAM_FILE |
| 39 | Persist raw JSONL stream path. |
| 40 | --idle-timeout IDLE_TIMEOUT |
| 41 | Kill codex if no output for N seconds (default 600; 0 disables). |
| 42 | --ignore-user-config Do not load `$CODEX_HOME/config.toml` (auth still uses CODEX_HOME). |
| 43 | --dangerously-bypass-hook-trust |
| 44 | Run Codex hooks without persisted hook trust. DANGEROUS. |
| 45 | |
| 46 | subcommands: |
| 47 | mcp Thin passthrough to `codex mcp` (list/get/add/remove/login/logout). |
| 48 | plugin Thin passthrough to `codex plugin` (add/list/remove/marketplace). |
| 49 | ``` |
| 50 | |
| 51 | ## Multi-turn Sessions |
| 52 | |
| 53 | **Always capture `SESSION_ID`** from the first response for follow-up: |
| 54 | |
| 55 | ```bash |
| 56 | # Initial task |
| 57 | python scripts/codex_bridge.py --cd "/project" --PROMPT "Analyze auth in login.py" |
| 58 | |
| 59 | # Continue with SESSION_ID |
| 60 | python scripts/codex_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Write unit tests for that" |
| 61 | ``` |
| 62 | |
| 63 | ## Config Inheritance |
| 64 | |
| 65 | | Source | Inherited by default? | |
| 66 | |--------|------------------------| |
| 67 | | `~/.codex/config.toml` | Yes (unless `--ignore-user-config`) | |
| 68 | | Profile (`--profile`) | Only when explicitly passed | |
| 69 | | Project `.codex/` (trusted) | Yes, when Codex trusts the project | |
| 70 | | Hooks / MCP / plugins / skills / `AGENTS.md` | Yes, via Codex runtime | |
| 71 | |
| 72 | ## Management Passthrough |
| 73 | |
| 74 | ```bash |
| 75 | python scripts/codex_bridge.py mcp list |
| 76 | python scripts/codex_bridge.py plugin list |
| 77 | ``` |
| 78 | |
| 79 | ## Common Patterns |
| 80 | |
| 81 | **Prototyping (read-only, request diffs):** |
| 82 | ```bash |
| 83 | python scripts/codex_bridge.py --cd "/project" --PROMPT "Generate unified diff to add logging" |
| 84 | ``` |
| 85 | |
| 86 | **Debug with full trace:** |
| 87 | ```bash |
| 88 | python scripts/codex_bridge.py --cd "/project" --PROMPT "Debug this error" --return-all-messages |
| 89 | ``` |
| 90 | |
| 91 | **Headless hooks (vetted automation only):** |
| 92 | ```bash |
| 93 | python scripts/codex_bridge.py --cd "/project" --PROMPT "..." --dangerously-bypass-hook-trust |
| 94 | ``` |