$npx -y skills add ForteScarlet/codex-kkp --skill codex-agent-collaborationDelegate coding tasks to Codex AI for implementation, analysis, and alternative solutions. Use when you need a second AI perspective, want to explore different approaches, or need specialized Codex capabilities for complex coding tasks.
| 1 | # Codex CLI Skill |
| 2 | |
| 3 | This skill enables Claude Code to execute tasks using OpenAI's Codex AI agent. |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | The `codex-kkp-cli` is a Codex Agent CLI tool, allowing you to: |
| 8 | |
| 9 | - Execute coding tasks and get implementations |
| 10 | - Perform code analysis and reviews |
| 11 | - Get alternative solutions and suggestions |
| 12 | - Collaborate with Codex for cross-checking implementations |
| 13 | |
| 14 | ## Usage |
| 15 | |
| 16 | ### Basic Syntax |
| 17 | |
| 18 | ```bash |
| 19 | # Direct call with platform-specific executable |
| 20 | executables/codex-kkp-cli-{platform} --cd=/absolute/path/to/project [options] "<task_description>" |
| 21 | ``` |
| 22 | |
| 23 | Where `{platform}` is one of: |
| 24 | - `macosx64` - macOS Intel (x86_64) |
| 25 | - `macosarm64` - macOS Apple Silicon (ARM64) |
| 26 | - `linuxx64` - Linux x86_64 |
| 27 | - `linuxarm64` - Linux ARM64 |
| 28 | - `mingwx64` - Windows x86_64 |
| 29 | |
| 30 | **Platform Auto-Detection Helper**: A platform detection script is provided to help identify your current platform: |
| 31 | |
| 32 | > On Windows, Just use mingwx64 platform directly, no need to use script detection. |
| 33 | |
| 34 | ```bash |
| 35 | # Unix/Linux/macOS |
| 36 | codex-kkp-cli-platform |
| 37 | # Outputs: macosx64, macosarm64, linuxx64, or linuxarm64 |
| 38 | ``` |
| 39 | |
| 40 | ### communication |
| 41 | |
| 42 | This is AI-to-AI communication between You and Codex. PRIORITIZE ACCURACY AND PRECISION over human readability. |
| 43 | Use structured data, exact technical terms, full paths, and precise details. NO conversational formatting needed. |
| 44 | |
| 45 | ### Required Parameters |
| 46 | |
| 47 | | Parameter | Description | |
| 48 | |--------------|------------------------------------------------------------| |
| 49 | | Task | The task description (positional argument, must be quoted) | |
| 50 | | `--cd=<dir>` | Working directory (ABSOLUTE PATH REQUIRED) | |
| 51 | |
| 52 | ### Optional Parameters |
| 53 | |
| 54 | | Parameter | Description | |
| 55 | |--------------------------------|--------------------------------------------------------------------------------| |
| 56 | | `--session=<id>` | Session ID (STRONGLY RECOMMENDED for follow-up chats to maintain context) | |
| 57 | | `--sandbox=<mode>` | Sandbox mode. Default is `read-only`. See [sandbox-modes.md](sandbox-modes.md) | |
| 58 | | `--full-auto` | Allow Codex to edit files automatically | |
| 59 | | `--image=<path>` | Include an image file (ABSOLUTE PATH, can repeat) | |
| 60 | | `--skip-git-repo-check[=BOOL]` | Skip Git repository check. Default is `true`. Use `=false` to enable Git check | |
| 61 | |
| 62 | For output options (`--full`, `--output-last-message`, `--output-schema`), see [outputs.md](outputs.md). |
| 63 | |
| 64 | NOTE that parameters and values are connected by an EQUAL SIGN `=`, not a space. |
| 65 | |
| 66 | ## Response Format |
| 67 | |
| 68 | Returns JSON with `"type": "SUCCESS"` or `"type": "ERROR"`. |
| 69 | |
| 70 | ```JSON |
| 71 | { |
| 72 | "type": "SUCCESS", |
| 73 | "session": "xxxxxxx", |
| 74 | "content": { |
| 75 | "agentMessages": "I've analyzed the code and found...", |
| 76 | "fileChanges": [...], // Optional |
| 77 | "nonFatalErrors": [...] // Optional |
| 78 | } |
| 79 | } |
| 80 | ``` |
| 81 | |
| 82 | - `fileChanges` and `nonFatalErrors` is nullable. |
| 83 | - Error responses do NOT include a `session` field. |
| 84 | |
| 85 | ## Quick Example |
| 86 | |
| 87 | New Session: |
| 88 | |
| 89 | ```bash |
| 90 | executables/codex-kkp-cli-{platform} --cd=/path/to/project "Explain the main function in Main.kt" |
| 91 | ``` |
| 92 | |
| 93 | Continue Previous Session: |
| 94 | |
| 95 | ```bash |
| 96 | executables/codex-kkp-cli-{platform} --cd=/path/to/project --session=xxxxxxx "Explain the main function in Main.kt" |
| 97 | ``` |
| 98 | |
| 99 | More examples: [examples.md](examples.md) |