ワンクリックで
codex-delegation
Intelligent routing between Bravo and Codex — decides when to delegate tasks to Codex vs handle internally
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Intelligent routing between Bravo and Codex — decides when to delegate tasks to Codex vs handle internally
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Higgsfield image prompt director covering Banana Pro, Soul Cinema, and GPT-2. Three asset types in strict order — single-image character outfit on white seamless studio (Banana Pro or Soul Cinema two-step), 6-panel multi-angle character sheet off that base, and scene plates with/without characters. Plus GPT-2 for detail face/chest-up portraits. Reads reference images for hair, makeup, wardrobe, jewelry, identity. Outputs photorealistic prompts with locked hyperreal stack — skin pores, subsurface scattering, strand-by-strand hair, fabric weave, Kodak Vision3 film. Use for any character outfit reference, character sheet, model sheet, ref sheet, multi-angle sheet, scene plate, environment plate, face detail, or photorealistic still — even without saying 'Banana Pro,' 'Nano Banana,' or 'Soul Cinema.'
Universal cinema worldbuilding director for Seedance video prompts. Five cinema modes (Narrative, Studio, Action, Performance, Atmospheric) with locked ARRI + Panavision/Cooke camera specs and diegetic-only audio rules. Reads reference images for wardrobe, hair, makeup, identity, and environment. Outputs production-ready Seedance prompts. Use whenever CC asks for a Seedance video prompt, mentions Seedance, asks for cinematic scene breakdowns, uploads reference images for a scene, describes a scene for video generation, or asks for shot prompts for music videos, action sequences, performance scenes, narrative shorts, fashion films, or atmospheric environment plates — even if 'cinematic' or a mode name isn't said.
Complete automated video production system for CC's content pipeline. Use whenever CC provides raw video footage and says "make this a post", "edit this", or asks for a cinematic output. Replaces a human video editor entirely. Covers hook engineering, pacing, caption styling, color grading, audio mastering, sound design, motion graphics, and multi-platform export.
Read-only social + web listening across public platforms (YouTube, Twitter/X, LinkedIn, Reddit, the open web, GitHub, Exa search) for competitive intelligence, content research, transcript mining, and checking public post results. Wraps Agent Reach via scripts/social_reach_tool.py. Does NOT read Instagram, TikTok, or Facebook.
Build high-converting, education-first advertorial / "infomercial" landing pages for ecommerce products — long-form scrollable HTML that warms cold paid traffic and clicks through to the product page. Covers angle selection, direct-response copy doctrine, AI image generation with a product reference, a premium anti-slop design system, and a portable build/QA convention. Use for advertorials, pre-sell pages, native/listicle ad landers, VSL pages, or any "read-an-article-then-buy" funnel page.
Automated video editing pipeline for CC's personal brand content. Use whenever CC drops raw footage and needs it edited, captioned, graded, and sent for review. The primary tool is video_editor.py which handles the full 8-step pipeline.
| name | codex-delegation |
| description | Intelligent routing between Bravo and Codex — decides when to delegate tasks to Codex vs handle internally |
| tags | ["skill"] |
| triggers | ["delegate to Codex","send this to Codex","get Codex to build","run Codex in background","Codex adversarial review"] |
Purpose: Bravo and Codex are complementary AI engines. This skill determines WHEN and HOW to delegate work to Codex for maximum leverage — two AIs working in parallel, each on their strengths.
CC → Bravo (Claude Opus 4.6) CC → Codex (GPT-5.4)
├── Architecture & planning ├── Backend implementation
├── Frontend & UI ├── Deep debugging
├── Creative & brand voice ├── Adversarial code review
├── Business ops & strategy ├── Parallel task execution
├── Orchestration & memory ├── Root-cause analysis
└── Client communications └── Write-capable rescue tasks
| Task Type | Codex Command | Why Codex |
|---|---|---|
| Pre-ship code review | /codex:review --background | Second pair of AI eyes catches Bravo's blind spots |
| Architecture challenge | /codex:adversarial-review | Questions assumptions Bravo might accept |
| Backend bug with stack trace | /codex:rescue investigate [bug] | Codex excels at systematic root-cause |
| Heavy backend implementation | /codex:rescue --background [task] | Runs parallel while Bravo does other work |
| Test suite debugging | /codex:rescue fix the failing tests | Codex is strong at test diagnosis |
| Task Type | Why Bravo |
|---|---|
| Frontend/UI components | Bravo has better design sense and CC's brand voice |
| Content creation (posts, copy) | Bravo owns CC's authentic voice |
| Business strategy & client comms | Bravo has full business context |
| Memory/state/orchestration | Bravo's infrastructure — Codex has no access |
| Skool/social media automation | Bravo has the MCP and CLI integrations |
| Cross-file sync (brain/, memory/) | Bravo's domain knowledge required |
| Simple fixes (< 3 files) | Delegation overhead > task effort |
| Task Type | Why Ask |
|---|---|
| Full feature implementation | Split work or assign to one AI? |
| Refactoring > 10 files | Coordination risk between two AIs |
| Security-sensitive changes | Need explicit human review |
Bravo: Implements feature in frontend
Codex: /codex:review --background (reviews existing changes)
Result: By the time Bravo ships, Codex review is ready
Bravo: Debugs frontend rendering issue
Codex: /codex:rescue --background investigate the API timeout
Result: Two bugs investigated simultaneously
Bravo: Writes the implementation
Codex: /codex:adversarial-review --background challenge the caching design
Result: Design validated before ship
Bravo: Creates SPARC spec + architecture (Phases 1-3)
Codex: /codex:rescue implement the backend per the spec in .agents/plans/
Bravo: Reviews Codex output, handles frontend + docs
Result: Full-stack feature with parallel execution
When the task routing skill (skills/task-routing/SKILL.md) classifies a task:
| Complexity | Codex Role |
|---|---|
| TRIVIAL | None — Bravo handles inline |
| SIMPLE | None — single agent sufficient |
| MODERATE | Optional: /codex:review after Bravo implements |
| COMPLEX | Recommended: Codex handles backend, Bravo handles frontend/orchestration |
| ARCHITECTURAL | Required: /codex:adversarial-review on the architecture before implementation |
Add to skills/ship/SKILL.md Phase 4 (Code Review):
After Bravo's code review, optionally run:
/codex:adversarial-review --background --base main
This gives a dual-AI review before shipping — Bravo catches implementation issues, Codex challenges design decisions.
Run this in <2s before spawning a codex-agent. If it fails, STOP — upgrade the CLI first or execute inline. Do NOT burn 5 minutes per agent in a retry loop the way the 2026-04-25 Atlas + Maven session did.
codex --version 2>&1 | head -1
# Expected: a version string. If "command not found" → install: npm i -g @openai/codex@latest
# If version reported < the one on https://www.npmjs.com/package/@openai/codex → upgrade.
Symptoms of a stale CLI (all observed 2026-04-25 with @openai/codex@0.118.0):
Recovery: npm i -g @openai/codex@latest && node "$CLAUDE_PLUGIN_ROOT/scripts/codex-companion.mjs" status. If still failing after upgrade, Bravo handles the task inline. Never retry the same prompt 3 times against the same broken CLI — see MISTAKES.md "Codex CLI Stale".
# Standard review (second opinion)
/codex:review --background
# Challenge the design
/codex:adversarial-review --background challenge the auth design
# Delegate a task
/codex:rescue --background investigate why the API returns 500
# Quick fix with specific model
/codex:rescue --model spark fix the TypeScript error in api/route.ts
# Check progress
/codex:status
# Get results
/codex:result
# Cancel
/codex:cancel
Codex runs in the same repo directory but doesn't have Bravo's brain files. When delegating tasks, inject relevant context into the task prompt so Codex makes informed decisions.
When building a Codex task prompt, prepend relevant context:
<context>
Project: [app name from APP_REGISTRY.md]
Stack: [from APP_REGISTRY.md — e.g., "Next.js 14, TypeScript, Supabase, Stripe"]
Key files: [list the 3-5 most relevant files for this task]
Constraints: [any architectural rules — e.g., "uses App Router, RLS enabled, Stripe webhooks verified"]
Related work: [if Bravo already started something, describe what's done]
</context>
<task>
[The actual task description]
</task>
| Task Type | Context to Include |
|---|---|
| Backend bug fix | Error message, stack trace, relevant file paths, DB schema if applicable |
| API implementation | Existing route patterns, auth middleware, Supabase table schema |
| Code review | Branch diff summary, what the feature does, any known risks |
| Test debugging | Test framework (vitest/jest), failing test output, related source files |
| Refactoring | Current architecture, files involved, what "done" looks like |
export CLAUDE_PLUGIN_ROOT="/c/Users/User/.claude/codex-plugin"
node "$CLAUDE_PLUGIN_ROOT/scripts/codex-companion.mjs" task --write \
"Context: Next.js 14 App Router, Supabase with RLS, Stripe webhooks.
The webhook handler at app/api/webhooks/stripe/route.ts is not idempotent —
it processes the same event_id twice when Stripe retries.
Fix: Add event_id deduplication using the payments table.
The Supabase client is initialized in lib/supabase/server.ts.
Constraint: Do not disable RLS. Use the service role key server-side only."
Codex tasks can fail for several reasons. Bravo must handle each gracefully:
| Failure | Signal | Recovery |
|---|---|---|
| Codex CLI not found | setup --json returns codex.available: false | Run npm install -g @openai/codex |
| Auth expired | setup --json returns auth.loggedIn: false | Tell CC to run codex login in terminal |
| Task timeout | No result after 15 minutes | Check /codex:status, cancel if stuck, retry with simpler scope |
| Bad output | Codex returns malformed or empty result | Don't retry blindly — Bravo takes over the task |
| Codex made wrong changes | Review shows incorrect implementation | Bravo reverts and handles the task directly |
| Broker crash | Session runtime errors | Restart session (SessionEnd + SessionStart hooks will clean up) |
--model spark for simpler, --model gpt-5.4-mini for faster)memory/MISTAKES.md with what Codex struggled with.Never retry the same prompt 3 times. Each retry must change something: more context, narrower scope, different model, or Bravo takes over.
Before any Codex delegation, verify readiness:
export CLAUDE_PLUGIN_ROOT="/c/Users/User/.claude/codex-plugin"
node "$CLAUDE_PLUGIN_ROOT/scripts/codex-companion.mjs" setup --json 2>/dev/null | head -1
If ready: false — don't delegate. Handle the task directly and note the issue.
Maven uses Codex for: (1) ad-copy variant generation at scale (50+ headlines/descriptions per campaign for Andromeda diversity), (2) attribution math (LTV/CAC, multi-touch, last-non-direct vs data-driven), (3) A/B test significance calculations, (4) landing-page copy A/B variants, (5) competitive ad-library transcript analysis. Maven NEVER delegates brand voice or strategic positioning to Codex — those stay in Maven. Delegation routes through scripts/codex_delegate.py which wraps the codex-companion.mjs CLI.