SuperAPI AI Directory

codex-review

General & other

View repository

Updated 10-15 17:33

About this skill

Codex Review Integration Skill

A skill that uses OpenAI Codex CLI to provide a second opinion during Claude Code code reviews.

Do NOT Load For (misfire prevention)

The following keywords are handled by /work --codex :

Trigger word Correct skill Reason
"Have Codex implement it" /work --codex Implementation ≠ Review
"Codex Worker" /work --codex Worker = implementer role
"Have Codex create it" /work --codex Creation = Implementation
"Request implementation" /work --codex Implementation purpose

🎯 Use Cases

Setup

  • Initial setup: Check Codex CLI installation and codex exec operation check
  • Authentication settings: OAuth / API key authentication for Codex

Review

  • Second opinion: Add Codex's perspective to Claude's review results
  • Code quality check: Leverage the strengths of multiple AI models
  • Design review: Multifaceted verification of architecture and implementation patterns

Feature Details

Feature Details
CLI setup See references/codex-mcp-setup.md
Review integration See references/codex-review-integration.md
4-parallel review See references/codex-parallel-review.md
Mode switching See references/codex-mode.md

Execution Steps

  1. Classify the user's request
  2. Read the appropriate reference file from the 'Feature Details' above
  3. Perform configuration or review according to its contents

⚠️ Mandatory rules for parallel review

Codex mode (review.mode: codex) when executing a review:

  1. Determine which experts to invoke(not all, only the necessary ones):
    • In settings, enabled: false → exclude
    • CLI/backend → exclude Accessibility, SEO
    • Documentation-only changes → prioritize Quality, Architect, Plan Reviewer, Scope Analyst (Security, Performance can be excluded)
  2. Load the references/experts/*.md from prompts of valid experts individually
  3. Run only valid experts in parallel as Bash background processes
  4. Never combine multiple perspectives into a single invocation
✅ 正しい(並列 CLI 実行):
   # macOS: brew install coreutils
   TIMEOUT=$(command -v timeout || command -v gtimeout || echo "")
   $TIMEOUT 120 codex exec "$(cat /tmp/expert-security-prompt.md)" > /tmp/expert-security.txt 2>/dev/null &
   $TIMEOUT 120 codex exec "$(cat /tmp/expert-perf-prompt.md)" > /tmp/expert-perf.txt 2>/dev/null &
   $TIMEOUT 120 codex exec "$(cat /tmp/expert-quality-prompt.md)" > /tmp/expert-quality.txt 2>/dev/null &
   $TIMEOUT 120 codex exec "$(cat /tmp/expert-a11y-prompt.md)" > /tmp/expert-a11y.txt 2>/dev/null &
   wait

❌ 間違い:
   codex exec "セキュリティとパフォーマンスと品質をレビューして"

Details: references/codex-parallel-review.md


📋 How to run Codex CLI

If Codex CLI is installed, invoke it as follows:

Method Command
Single review $TIMEOUT 120 codex exec "$(cat prompt.md)" 2>/dev/null
Parallel review Run each expert & in parallel with wait and wait with

🔧 Quick start

Prerequisites

  1. Codex CLI is installed

    which codex  # パスが表示されること
    
  2. Timeout command(for macOS)

    brew install coreutils  # gtimeout を提供
    
  3. Logged in to Codex

    codex login status  # 認証済みであること
    

Operation check

# Codex CLI の応答テスト
codex exec "echo hello"

🔄 Review workflow

Solo mode

/harness-review 実行
    │
    ├── Claude レビュー(従来通り)
    │
    └── Codex CLI 呼び出し(有効時)
            │
            └── 結果統合

2-Agent mode

PM(Cursor / Codex)
    │
    └── タスク依頼
            │
            ├── Claude Code 実装
            │
            └── /harness-review
                    │
                    ├── Claude レビュー
                    └── Codex セカンドオピニオン

⚙️ Settings

.claude-code-harness.config.yaml Configure Codex integration with:

review:
  codex:
    enabled: true           # Codex セカンドオピニオン有効化
    auto: false             # true: 自動実行 / false: 毎回確認
    prompt: "Review the code and output issues and improvement suggestions"
Configuration item Default Description
enabled false Enable/disable Codex integration
auto false Automatic review execution
prompt (above) Review prompt to Codex
execution_mode exec Execution mode (exec: CLI direct, recommended)

Note: All Codex calls use exec (CLI). Parallel experts run in parallel as Bash background processes (& + wait)


💡 Usage examples

Example 1: Setup

ユーザー: 「Codex でもレビューできるようにして」

Claude Code:
→ codex-mcp-setup.md を読み込み
→ Codex インストール確認
→ `codex exec` 動作確認
→ 設定ファイル更新

Example 2: During review

ユーザー: 「セカンドオピニオンもらって」

Claude Code:
→ codex.enabled = true を確認
→ CLI 経由で Codex にレビュー依頼
→ 結果を統合して表示

⚠️ Notes

Performance

  • Codex CLI calls may take from a few seconds to a few tens of seconds
  • Chunk splitting is recommended for large files

Cost

  • Using the Codex API requires OpenAI credits
  • Estimating costs according to review frequency is recommended

Troubleshooting

Problem: Codex CLI does not respond Solution:

  1. which codex Check installation with
  2. codex login status Check authentication with
  3. $TIMEOUT 10 codex exec "echo test" timeout test with

Problem: Review results are not returned Solution:

  1. Check the network connection
  2. Check the API credit balance
  3. Extend the timeout value and retry

📚 References