codex-system

Codex CLI handles planning, design, and complex code implementation. Use for: architecture design, implementation planning, complex algorithms, debugging (root cause analysis), trade-off evaluation, code review. External research is NOT Codex's job — use general-purpose subagent (Opus) instead. Explicit triggers: "plan", "design", "architecture", "think deeper", "analyze", "debug", "complex", "optimize".

141 stars

Best use case

codex-system is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Codex CLI handles planning, design, and complex code implementation. Use for: architecture design, implementation planning, complex algorithms, debugging (root cause analysis), trade-off evaluation, code review. External research is NOT Codex's job — use general-purpose subagent (Opus) instead. Explicit triggers: "plan", "design", "architecture", "think deeper", "analyze", "debug", "complex", "optimize".

Teams using codex-system should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/codex-system/SKILL.md --create-dirs "https://raw.githubusercontent.com/DeL-TaiseiOzaki/claude-code-orchestra/main/.claude/skills/codex-system/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/codex-system/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How codex-system Compares

Feature / Agentcodex-systemStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Codex CLI handles planning, design, and complex code implementation. Use for: architecture design, implementation planning, complex algorithms, debugging (root cause analysis), trade-off evaluation, code review. External research is NOT Codex's job — use general-purpose subagent (Opus) instead. Explicit triggers: "plan", "design", "architecture", "think deeper", "analyze", "debug", "complex", "optimize".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Codex System — Planning, Design & Complex Implementation

**Codex CLI handles planning, design, and complex code implementation.**

> **Detailed rules**: `.claude/rules/codex-delegation.md`

## Two Roles of Codex

### 1. Planning & Design

- Architecture design, module composition
- Implementation plan creation (step breakdown, dependency ordering)
- Trade-off evaluation, technology selection
- Code review (quality and correctness analysis)

### 2. Complex Implementation

- Complex algorithms, optimization
- Debugging with unknown root causes
- Advanced refactoring
- Multi-step implementation tasks

## When to Consult (MUST)

| Situation | Trigger Examples |
|-----------|------------------|
| **Planning** | "Create a plan" "Architecture" |
| **Design decisions** | "How to design?" |
| **Complex implementation** | "How to implement?" "How to build?" |
| **Debugging** | "Why doesn't this work?" "Error" "Debug" |
| **Trade-off analysis** | "Which is better?" "Compare" |
| **Refactoring** | "Refactor" "Simplify" |
| **Code review** | "Review" "Check" |

## When NOT to Consult

- Simple file edits, typo fixes
- Tasks that simply follow explicit user instructions
- git commit, test execution, lint
- **Codebase analysis** → general-purpose subagent (Opus 1M context)
- **External information retrieval** → general-purpose subagent (Opus, WebSearch/WebFetch)
- **Multimodal processing** → Gemini CLI (PDF/video/audio/images)

## How to Consult

### Subagent Pattern (Recommended)

```
Task tool parameters:
- subagent_type: "general-purpose"
- run_in_background: true (optional)
- prompt: |
    Consult Codex about: {topic}

    codex exec --model gpt-5.4 --sandbox read-only --full-auto "
    {question for Codex}
    " 2>/dev/null

    Return CONCISE summary (key recommendation + rationale).
```

### Direct Call (responses up to ~50 lines)

```bash
codex exec --model gpt-5.4 --sandbox read-only --full-auto "Brief question" 2>/dev/null
```

### Having Codex Implement Code

```bash
codex exec --model gpt-5.4 --sandbox workspace-write --full-auto "
Implement: {task description}
Requirements: {requirements}
Files: {file paths}
" 2>/dev/null
```

### Sandbox Modes

| Mode | Use Case |
|------|----------|
| `read-only` | Design, review, debug analysis |
| `workspace-write` | Implementation, fixes, refactoring |

## Task Templates

### Implementation Planning

```bash
codex exec --model gpt-5.4 --sandbox read-only --full-auto "
Create an implementation plan for: {feature}

Context: {relevant architecture/code}

Provide:
1. Step-by-step plan with dependencies
2. Files to create/modify
3. Key design decisions
4. Risks and mitigations
" 2>/dev/null
```

### Design Review

```bash
codex exec --model gpt-5.4 --sandbox read-only --full-auto "
Review this design approach for: {feature}

Context: {relevant code or architecture}

Evaluate:
1. Is this approach sound?
2. Alternative approaches?
3. Potential issues?
4. Recommendations?
" 2>/dev/null
```

### Debug Analysis

```bash
codex exec --model gpt-5.4 --sandbox read-only --full-auto "
Debug this issue:

Error: {error message}
Code: {relevant code}
Context: {what was happening}

Analyze root cause and suggest fixes.
" 2>/dev/null
```

## Language Protocol

1. Ask Codex in **English**
2. Receive response in **English**
3. Execute based on advice
4. Report to user in **the user's language**

## Codex Plugin Commands (codex-plugin-cc)

When the `openai/codex-plugin-cc` plugin is installed, these slash commands are available:

### Code Review

```bash
/codex:review                    # Review current uncommitted changes
/codex:review --base main        # Review branch diff against main
/codex:review --background       # Run review in background
```

### Adversarial Review

```bash
/codex:adversarial-review                           # Challenge design decisions
/codex:adversarial-review --base main               # Branch-level adversarial review
/codex:adversarial-review --background look for race conditions
```

### Task Delegation (Rescue)

```bash
/codex:rescue investigate why the tests started failing
/codex:rescue fix the failing test with the smallest safe patch
/codex:rescue --resume apply the top fix from the last run
/codex:rescue --model gpt-5.4-mini --effort medium investigate flaky test
/codex:rescue --background investigate the regression
```

### Job Management

```bash
/codex:status                    # Check progress of background jobs
/codex:result                    # Show finished job output
/codex:cancel                    # Cancel active background job
```

### Setup

```bash
/codex:setup                     # Check if Codex is installed and authenticated
/codex:setup --enable-review-gate   # Enable auto-review gate (use with caution)
/codex:setup --disable-review-gate  # Disable review gate
```

### When to Use Plugin vs Direct CLI

| Scenario | Use |
|----------|-----|
| Pre-ship code review | `/codex:review` |
| Challenge design | `/codex:adversarial-review` |
| Delegate investigation/fix | `/codex:rescue` |
| Background work + tracking | Plugin `--background` |
| Ad-hoc design question | `codex exec` (direct) |
| Implementation in sandbox | `codex exec --sandbox workspace-write` |
| Subagent delegation | `codex exec` via general-purpose |

## Why Codex?

- **Deep reasoning**: Complex analysis and problem-solving
- **Planning expertise**: Architecture and implementation strategies
- **Code mastery**: Complex algorithms, optimization, debugging
- **Consistency**: Same project context via `context-loader` skill

Related Skills

gemini-system

141
from DeL-TaiseiOzaki/claude-code-orchestra

Gemini CLI specialized for multimodal file processing only. MUST use when PDF, video, audio, or image files need content extraction. Auto-triggers: file extensions .pdf, .mp4, .mov, .mp3, .wav, .m4a. For research/codebase analysis → use general-purpose subagent (Opus) instead. Planning/design → use Codex instead.

context-loader

141
from DeL-TaiseiOzaki/claude-code-orchestra

ALWAYS activate this skill at the start of every task. Load project context from .claude/ directory including coding rules, design decisions, and documentation before executing any task.

update-lib-docs

141
from DeL-TaiseiOzaki/claude-code-orchestra

Update library documentation in .claude/docs/libraries/ with latest information from web search.

update-design

141
from DeL-TaiseiOzaki/claude-code-orchestra

Explicitly update DESIGN.md with decisions from the current conversation. Use when you want to force a design document update.

troubleshoot

141
from DeL-TaiseiOzaki/claude-code-orchestra

Diagnose and plan fixes for errors/bugs with Codex-first multi-agent collaboration (Codex + Opus 4.6 + Agent Teams). Codex CLI is consulted in EVERY phase for deep code reasoning, hypothesis evaluation, and fix validation. Phase 1: Error reproduction & context gathering (Opus subagent 1M context + Codex initial analysis + Claude user interaction). Phase 2: Parallel diagnosis (Agent Teams: Root Cause Analyst [Codex-driven] + Impact Investigator [Opus + Codex risk analysis]). Phase 3: Fix plan synthesis, Codex validation & user approval. Fix implementation is handled separately by /team-implement.

team-review

141
from DeL-TaiseiOzaki/claude-code-orchestra

Parallel code review using Agent Teams. Spawns specialized reviewers (security, quality, test coverage) to review implementation from different perspectives simultaneously. Run after implementation.

team-implement

141
from DeL-TaiseiOzaki/claude-code-orchestra

Parallel implementation using Agent Teams. Spawns teammates per module/layer, each owning separate files to avoid conflicts. Uses shared task list with dependencies for autonomous coordination. Run after /start-feature plan approval.

tdd

141
from DeL-TaiseiOzaki/claude-code-orchestra

Implement features using Test-Driven Development (TDD) with Red-Green-Refactor cycle.

start-feature

141
from DeL-TaiseiOzaki/claude-code-orchestra

Start a new feature with multi-agent collaboration (Opus 4.6 + Agent Teams). Phase 1: Codebase understanding (Opus subagent 1M context + Claude user interaction). Phase 2: Parallel research & design (Agent Teams: Researcher + Architect). Phase 3: Plan synthesis & user approval. Implementation is handled separately by /team-implement.

spike

141
from DeL-TaiseiOzaki/claude-code-orchestra

Time-boxed technical investigation/feasibility study with Codex-first multi-agent collaboration (Codex + Opus 4.6 + Agent Teams). Codex CLI is consulted in EVERY phase for question framing, feasibility analysis, and final evaluation. Phase 1: Frame the investigation question & constraints (Claude user interaction + Codex question decomposition). Phase 2: Parallel investigation (Agent Teams: Researcher [Opus external research] + Feasibility Analyst [Codex deep analysis] + optional prototype). Phase 3: Codex synthesis into go/no-go recommendation & research report. Produces a DECISION DOCUMENT, NOT an implementation plan. Use /add-feature or /start-feature after a GO decision.

simplify

141
from DeL-TaiseiOzaki/claude-code-orchestra

Simplify and refactor code while preserving functionality and library constraints.

research-lib

141
from DeL-TaiseiOzaki/claude-code-orchestra

Research a library and create comprehensive documentation in .claude/docs/libraries/.