codex-agent-collaboration
Scannednpx machina-cli add skill ForteScarlet/codex-kkp/codex-agent-collaboration --openclawCodex CLI Skill
This skill enables Claude Code to execute tasks using OpenAI's Codex AI agent.
Overview
The codex-kkp-cli is a Codex Agent CLI tool, allowing you to:
- Execute coding tasks and get implementations
- Perform code analysis and reviews
- Get alternative solutions and suggestions
- Collaborate with Codex for cross-checking implementations
Usage
Basic Syntax
# Direct call with platform-specific executable
executables/codex-kkp-cli-{platform} --cd=/absolute/path/to/project [options] "<task_description>"
Where {platform} is one of:
macosx64- macOS Intel (x86_64)macosarm64- macOS Apple Silicon (ARM64)linuxx64- Linux x86_64linuxarm64- Linux ARM64mingwx64- Windows x86_64
Platform Auto-Detection Helper: A platform detection script is provided to help identify your current platform:
On Windows, Just use mingwx64 platform directly, no need to use script detection.
# Unix/Linux/macOS
codex-kkp-cli-platform
# Outputs: macosx64, macosarm64, linuxx64, or linuxarm64
communication
This is AI-to-AI communication between You and Codex. PRIORITIZE ACCURACY AND PRECISION over human readability. Use structured data, exact technical terms, full paths, and precise details. NO conversational formatting needed.
Required Parameters
| Parameter | Description |
|---|---|
| Task | The task description (positional argument, must be quoted) |
--cd=<dir> | Working directory (ABSOLUTE PATH REQUIRED) |
Optional Parameters
| Parameter | Description |
|---|---|
--session=<id> | Session ID (STRONGLY RECOMMENDED for follow-up chats to maintain context) |
--sandbox=<mode> | Sandbox mode. Default is read-only. See sandbox-modes.md |
--full-auto | Allow Codex to edit files automatically |
--image=<path> | Include an image file (ABSOLUTE PATH, can repeat) |
--skip-git-repo-check[=BOOL] | Skip Git repository check. Default is true. Use =false to enable Git check |
For output options (--full, --output-last-message, --output-schema), see outputs.md.
NOTE that parameters and values are connected by an EQUAL SIGN =, not a space.
Response Format
Returns JSON with "type": "SUCCESS" or "type": "ERROR".
{
"type": "SUCCESS",
"session": "xxxxxxx",
"content": {
"agentMessages": "I've analyzed the code and found...",
"fileChanges": [...], // Optional
"nonFatalErrors": [...] // Optional
}
}
fileChangesandnonFatalErrorsis nullable.- Error responses do NOT include a
sessionfield.
Quick Example
New Session:
executables/codex-kkp-cli-{platform} --cd=/path/to/project "Explain the main function in Main.kt"
Continue Previous Session:
executables/codex-kkp-cli-{platform} --cd=/path/to/project --session=xxxxxxx "Explain the main function in Main.kt"
More examples: examples.md
Source
git clone https://github.com/ForteScarlet/codex-kkp/blob/main/claude-code-skills-template/codex-agent-collaboration/SKILL.mdView on GitHub Overview
The codex-kkp-cli is a Codex Agent CLI tool that lets Claude Code delegate coding tasks to Codex for implementations, analysis, and alternative solutions. It enables cross-checking and collaboration with Codex to explore multiple approaches and leverage Codex's specialized coding capabilities.
How This Skill Works
You invoke a platform-specific executable (or use the platform auto-detection helper) with a quoted task and an absolute project directory via --cd. Codex processes the task to deliver implementations, code analysis, and alternative solutions, returning a structured JSON payload that can include file changes and non-fatal errors. This AI-to-AI communication prioritizes precision and uses full paths and exact terms.
When to Use It
- You need a second AI perspective to validate or contrast an approach for a complex coding task.
- You want to compare multiple implementation strategies or language options for a feature.
- You require code analysis or a formal review of existing code by Codex.
- You want alternative solutions, optimizations, or refactoring suggestions from Codex.
- You need cross-checking and validation of a Codex-generated implementation within a project directory.
Quick Start
- Step 1: Determine your platform and run codex-kkp-cli-platform to get macosx64, macosarm64, linuxx64, linuxarm64, or mingwx64.
- Step 2: Run executables/codex-kkp-cli-{platform} --cd=/absolute/path/to/project "<task_description>" with your task quoted.
- Step 3: Parse the JSON response, apply fileChanges if provided, and iterate by continuing the session with --session=<id> as needed.
Best Practices
- Describe the task clearly as a quoted string and provide an absolute path with --cd.
- Choose the correct platform-specific executable, or rely on codex-kkp-cli-platform for auto-detection.
- Use --session to maintain context across follow-up chats and --sandbox to control editing capabilities.
- Set --full-auto only when you want Codex to edit files automatically.
- Review the agentMessages and fileChanges in the JSON response and iterate with the same session for refinement.
Example Use Cases
- Explain the main function in Main.kt
- Implement a Python API client for a backend service in /path/to/project
- Review a React component for performance and suggest optimizations
- Provide an alternative algorithm for sorting large datasets in data_processor.py
- Cross-check the current API client implementation against an OpenAPI spec and propose fixes