Orchestrates Claude, Codex, and Gemini in feedback loops for validating mission-critical features, complex architecture, security-sensitive code, and multi-AI reviews. Supports triple-AI or dual modes.
npx claudepluginhub creator-hian/claude-code-plugins --plugin ai-orchestration-pluginThis skill uses the workspace's default tool permissions.
```
Consults Gemini 2.5 Pro, OpenAI Codex, and Claude for second opinions on debugging failures, architectural decisions, security validation, and fresh perspectives.
Guides Development phase of Double Diamond workflow using Codex and Gemini CLIs. Detects dev context/subtypes (frontend-ui, cli-tool, api-service) and enforces execution sequence.
Routes agent roles to optimal AI models: Claude for planning/orchestration, Codex for code writing, Gemini for design/UI. Triggers on /multi-ai-run or model routing requests.
Share bugs, ideas, or general feedback.
Standard: Plan → Validate(AI-1) → Review(AI-2) → Synthesize → Implement → Review → Done
Co-Implement: Plan → Validate → Review → Synthesize → Core(Claude) → Aux(Gemini) → Integrate → Review → Done
| Role | Responsibility |
|---|---|
| Claude | Planning, synthesis, core implementation |
| Codex | Deep validation, security, logic verification, edge cases |
| Gemini | Creative review, alternatives, UX + auxiliary code generation (Co-Impl) |
| CLI | Command |
|---|---|
| Codex | codex exec -m MODEL -c model_reasoning_effort=LEVEL -s read-only "prompt" |
| Gemini | gemini -m MODEL -p "prompt" |
Always use timeout: 600000 for all AI commands.
IMPORTANT: For available models and CLI options, refer to the required skills:
codex-plugin:codex-cli skill for models, reasoning effort levels, and CLI optionsgemini-plugin:gemini-cli skill for models, output formats, and CLI optionsWhen asking user for model selection in Phase 0, present options based on the current skill documentation.
mkdir -p .ai-orchestration
Add .ai-orchestration/ to your project's .gitignore to avoid committing session artifacts.
Ask user via AskUserQuestion with 4-7 questions (4 base + 1 always asked + 2 conditional if Co-Implementation enabled):
Header: "Mode"
| Option | Description |
|---|---|
| Triple-AI (default) | Full coverage: Claude + Codex + Gemini |
| Dual-AI: Codex-Claude | Security/logic focus |
| Dual-AI: Gemini-Claude | UX/creativity focus |
Header: "Roles"
| Option | Description |
|---|---|
| Standard | Claude: implement, Codex: validate, Gemini: review |
| Codex-Heavy | Claude: plan/synthesize, Codex: validate+implement review |
| Gemini-Heavy | Claude: plan/synthesize, Gemini: validate+implement review |
| Custom | User defines each phase assignment |
If Custom selected, ask follow-up:
| Phase | Options |
|---|---|
| Planning | Claude (default) / Codex / Gemini |
| First Validation | Codex / Gemini / Both (parallel) |
| Second Validation | Codex / Gemini / Skip (Dual-AI) |
| Implementation | Claude (default) / Codex-assisted / Gemini-assisted |
| Code Review | Codex / Gemini / Both (parallel) |
Header: "Models"
First, load the required skills to get current model lists:
codex-plugin:codex-cli → get Codex models and reasoning effort levelsgemini-plugin:gemini-cli → get Gemini modelsThen present options:
| Option | Description |
|---|---|
| Ultra Power | Codex: [highest capability model] + xhigh reasoning, Gemini: [highest capability model] |
| High Power | Codex: [highest capability model] + high reasoning, Gemini: [highest capability model] |
| Balanced (default) | Codex: [standard model] + high reasoning, Gemini: [stable pro model] |
| Fast | Codex: [mini model] + medium reasoning, Gemini: [flash model] |
| Custom | User specifies from available models in each skill |
Header: "Focus"
| Option | Description |
|---|---|
| Balanced (default) | Equal weight to all aspects |
| Security | OWASP, auth, encryption, injection |
| Performance | Algorithms, memory, I/O, scaling |
| Architecture | Patterns, coupling, extensibility |
Header: "Co-Impl"
| Option | Description |
|---|---|
| Disabled (default) | Gemini validation-only (standard workflow) |
| Documentation Only | Gemini generates docs, comments, README |
| Boilerplate Only | Gemini generates utilities, configs |
| Full Co-Implementation | Both documentation and boilerplate |
Header: "Gen Scope"
| Category | Options (multiSelect) |
|---|---|
| Documentation | API docs, Inline comments, README sections, JSDoc/TSDoc/XML |
| Boilerplate | Utility functions, Config files, Type interfaces, Test scaffolds |
Header: "Review Mode"
| Option | Description |
|---|---|
| Review-first (default) | Show Gemini output to user before integration |
| Auto-integrate | Automatically integrate if syntax valid |
| Strict Review | Require explicit user approval per file |
Save to .ai-orchestration/config.md:
# AI Orchestration Config
## Mode: [selected mode]
## Roles
- Planning: [AI]
- Validation 1: [AI]
- Validation 2: [AI or Skip]
- Implementation (Core): Claude
- Implementation (Auxiliary): [Disabled | Gemini]
- Code Review: [AI(s)]
## Models
- Codex: [model] (reasoning: [level])
- Gemini: [model]
## Focus: [focus area]
## Co-Implementation
- Enabled: [yes/no]
- Mode: [Disabled | Documentation Only | Boilerplate Only | Full]
- Documentation Scope: [api-docs, inline-comments, readme, jsdoc]
- Boilerplate Scope: [utilities, configs, interfaces, test-scaffolds]
- Review Mode: [review-first | auto-integrate | strict-review]
Executor: Based on config (default: Claude)
Create .ai-orchestration/plan.md with: Objective, Approach, Steps, Risk Assessment, Validation Focus Areas
| Planner | Command |
|---|---|
| Claude (default) | Use native planning |
| Codex | codex exec -m MODEL -c model_reasoning_effort=LEVEL -s read-only "Create plan for: [TASK]..." |
| Gemini | gemini -m MODEL -p "Create plan for: [TASK]..." |
Executor: Based on config Validation 1 setting
Detailed prompts: See prompt-templates.md for Security/Performance/Architecture focused prompts
| Validator | Command | Output File |
|---|---|---|
| Codex | codex exec -m MODEL -c model_reasoning_effort=LEVEL -s read-only "Validate: $(cat plan.md)..." | phase2_codex_validation.md |
| Gemini | gemini -m MODEL -p "Review: $(cat plan.md)..." | phase2_gemini_validation.md |
| Both | Execute in parallel, save both outputs | Both files |
Executor: Based on config Validation 2 setting (Skip if Dual-AI or config says Skip)
Detailed prompts: See prompt-templates.md for Innovation/UX focused prompts
| Scenario | Reviewer | Key Focus | Output File |
|---|---|---|---|
| After Codex | Gemini | Complement (don't repeat): Alternatives, User Impact, Blind Spots | phase3_gemini_review.md |
| After Gemini | Codex | Build on Gemini: Security/Edge Cases analysis | phase3_codex_review.md |
| Both (parallel) | Both | Independent review, cross-reference in Phase 4 | Both files |
Read validation results. Create .ai-orchestration/phase4_synthesis.md:
# Synthesis
## Consensus Points
## Divergence Analysis
## Prioritized Actions (P0/P1/P2)
## Revised Plan
## User Decisions Needed
For synthesis methodology: See synthesis-guide.md
Present to user via AskUserQuestion: Proceed / Address issues / Request more validation
Executor: Claude (always)
Implement core business logic using Edit/Write/Read tools.
Save .ai-orchestration/implementation.md with: Implemented By, Changes Made, Issues Addressed, Testing Notes
| Mode | Executor | Use Case |
|---|---|---|
| Default | Claude | Standard implementation |
| Codex-assisted | Claude + Codex | Complex logic (-s workspace-write) |
If Co-Implementation enabled → Create handoff spec for Phase 5b:
Save .ai-orchestration/phase5b_handoff.md:
# Gemini Co-Implementation Handoff
## Implementation Summary
[Link to implementation.md]
## Files Created/Modified
[List of files]
## Generation Tasks
### Task 1: [Documentation/Boilerplate]
**Type**: [api-docs | inline-comments | readme | utilities | configs | interfaces]
**Target Files**: [list]
**Code Context**:
\`\`\`[language]
[relevant snippets for context]
\`\`\`
**Requirements**:
- [specific requirements]
Executor: Gemini (if Co-Implementation enabled) Skip if: Co-Implementation disabled in config
Detailed prompts: See co-implementation-guide.md for handoff format and prompts
Generate auxiliary code based on handoff specification:
gemini -m MODEL -p "Generate auxiliary code per handoff spec:
$(cat .ai-orchestration/phase5b_handoff.md)
[Use prompt from co-implementation-guide.md based on scope]"
Output Format (FILE: marker system):
FILE: path/to/file.ext
---
[generated content]
---
FILE: next/file.ext
---
[content]
---
Save to .ai-orchestration/phase5b_gemini_output.md
Executor: Claude Skip if: Co-Implementation disabled
Save .ai-orchestration/phase5c_integration.md with: Files Integrated, Review Decisions, Revisions Made
Executor: Based on config Code Review setting
Detailed prompts: See prompt-templates.md
| Reviewer | Verdict Format | Output File |
|---|---|---|
| Codex | PASS/FAIL + Issue Status | phase6a_codex_review.md |
| Gemini | APPROVE/REQUEST CHANGES/REJECT | phase6b_gemini_review.md |
| Both | Execute parallel, combine verdicts | Both files |
Save iterations to .ai-orchestration/iterations.md.
.ai-orchestration/
├── config.md
├── plan.md
├── phase2_*.md
├── phase3_*.md (Triple-AI only)
├── phase4_synthesis.md
├── implementation.md
├── phase5b_handoff.md # Co-Implementation handoff spec
├── phase5b_gemini_output.md # Gemini generated code
├── phase5c_integration.md # Integration log
├── phase6a_codex_review.md
├── phase6b_gemini_review.md
└── iterations.md
| Error | Solution |
|---|---|
stdin is not a terminal | Use codex exec |
| Empty Gemini output | Use -p flag |
| Not in Git repo | Use --skip-git-repo-check for Codex |