Delegate coding tasks to OpenAI's Codex CLI with configurable execution modes including YOLO mode for fully autonomous operation. This plugin bridges Claude Code's analytical capabilities with Codex's autonomous code execution.
# Add the marketplace
/plugin marketplace add veithly/codex-skill
# Install the plugin
/plugin install rick@codex-skillBefore using the plugin, ensure you have:
-
OpenAI Codex CLI installed:
npm install -g @openai/codex
-
OpenAI API Key configured:
# Linux/macOS export OPENAI_API_KEY="your-api-key" # Windows PowerShell $env:OPENAI_API_KEY = "your-api-key"
- Multiple Execution Modes: YOLO (full autonomy), Auto (balanced), Safe (conservative)
- Non-Interactive Execution: Uses
codex execfor automation-friendly operation - Git Integration: Automatic change tracking and rollback support
- Cross-Platform: Works on Windows, macOS, and Linux
- Claude Integration: Seamless workflow with other Claude Code skills
# Default auto mode - balanced safety and automation
/codex Fix the null pointer exception in src/api/handlers.ts
# YOLO mode - full autonomy (use in hardened environments only!)
/codex --mode=yolo Implement user authentication with JWT
# Safe mode - requires more oversight
/codex --mode=safe Refactor the database connection module
# With custom timeout
/codex --timeout=600 Implement complex multi-file feature/codex <task_description> [options]
| Option | Description | Default |
|---|---|---|
--mode=<mode> |
Execution mode: yolo, auto, safe |
auto |
--timeout=<seconds> |
Maximum execution time | 1800 |
--add-dir=<path> |
Additional directory for Codex to access | - |
| Aspect | Details |
|---|---|
| Risk Level | HIGH |
| Approvals | None |
| Sandbox | Disabled |
| Best For | CI/CD pipelines, Docker containers, VMs |
| Aspect | Details |
|---|---|
| Risk Level | MEDIUM |
| Approvals | On-request |
| Sandbox | Workspace write |
| Best For | Development, refactoring, feature implementation |
| Aspect | Details |
|---|---|
| Risk Level | LOW |
| Approvals | Default policy |
| Sandbox | Workspace write |
| Best For | Production code, learning, sensitive operations |
Windows (PowerShell):
git clone https://github.com/veithly/codex-skill.git
cd codex-skill
.\scripts\install\install.ps1Linux/macOS (Bash):
git clone https://github.com/veithly/codex-skill.git
cd codex-skill
chmod +x ./scripts/install/install.sh
./scripts/install/install.shnpm install -g @anthropic-skills/codex# Clone repository
git clone https://github.com/veithly/codex-skill.git
cd codex-skill
# Create directories
mkdir -p ~/.claude/skills/codex
mkdir -p ~/.claude/agents
mkdir -p ~/.claude/scripts
# Copy files
cp skills/codex/SKILL.md ~/.claude/skills/codex/
cp skills/codex/reference.md ~/.claude/skills/codex/
cp agents/codex.md ~/.claude/agents/# Use Claude to analyze
/debug Investigate why user authentication fails
# Use Codex to fix
/codex --mode=safe Fix the race condition in auth token refresh# Use Claude to plan
/code Plan the new payment processing module
# Use Codex to implement
/codex Implement the payment module following the plan above# Use Codex for rapid implementation
/codex Implement user registration with email verification
# Use Claude for review
/review Check the registration code for security vulnerabilitiesCreate ~/.codex/config.toml:
model = "gpt-5.2-codex"
sandbox = "workspace-write"
reasoning_effort = "high"
instructions = """
Follow project coding standards.
Write tests for new functionality.
"""Create codex.toml in your project root:
model = "gpt-5.2-codex"
sandbox = "workspace-write"
additional_dirs = ["../shared-libs"]
instructions = """
This is a TypeScript project.
Use functional components with React hooks.
"""The skill uses codex exec for non-interactive execution. If running manually, use:
codex exec --full-auto "your task"npm install -g @openai/codexexport OPENAI_API_KEY="your-api-key"- YOLO mode bypasses ALL safety measures - use only in isolated environments
- API keys should never be committed to version control
- Always review AI-generated code before committing
- Use Git for rollback capability
codex-skill/
├── .claude-plugin/
│ ├── marketplace.json # Marketplace definition
│ └── plugin.json # Plugin manifest
├── skills/
│ └── codex/
│ ├── SKILL.md # Main skill definition
│ └── reference.md # CLI quick reference
├── agents/
│ └── codex.md # Sub-agent definition
├── scripts/
│ ├── install/ # One-click installers
│ ├── codex-runner.* # Helper wrappers
│ └── codex-yolo.* # Quick YOLO launchers
├── examples/ # Configuration examples
├── README.md # This file
├── REQUIREMENTS.md # Detailed requirements
├── CHANGELOG.md # Version history
└── LICENSE # MIT License
| Component | Requirement |
|---|---|
| Claude Code | Latest version |
| Node.js | v18.0.0 or higher |
| OpenAI Codex CLI | v0.65.0 or higher |
| Git | v2.0+ (recommended) |
See REQUIREMENTS.md for detailed requirements.
Contributions are welcome! See CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details.