From claude-impl-tools
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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-impl-tools:multi-ai-runThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Core concept**: Agents are **roles**, models are **executors**.
Core concept: Agents are roles, models are executors.
Automatically routes and executes the AI model best suited for each agent role.
┌─────────────────────────────────────────────────────────────┐
│ Claude (Orchestrator) │
│ ↓ Task analysis + agent role decision │
│ ↓ model_routing lookup │
│ ├── Code writing/review → Codex CLI │
│ ├── Design/UI work → Gemini CLI │
│ └── Planning/orchestration/complex reasoning → Claude │
└─────────────────────────────────────────────────────────────┘
| Model | CLI | Strengths | Recommended Roles |
|---|---|---|---|
| Claude | claude | Complex reasoning, long context, orchestration | orchestrator, architect, pm |
| Codex | codex | Code generation, refactoring, tests | backend, test, api |
| Gemini | gemini | Creativity, design sensibility, multimodal | frontend, designer, ui |
Classify each task before model selection to reduce token costs 40–70%.
| Tier | Characteristics | Model |
|---|---|---|
| FREE | Read-only — search, grep, explore, list. No code changes. | Tools only (no LLM call) |
| CHEAP | Simple edits ≤20 lines, ≤3 files, no logic change (format/lint/rename/comment) | Haiku |
| EXPENSIVE | New logic, debugging, architecture, security, >20 lines or >3 files | Sonnet (Opus for security/arch) |
Keyword signals:
implement, create, refactor, debug, design, integrate, security, auth, paymentformat, lint, rename, add import, add comment, typo fixAuto-Upgrade on Failure:
CHEAP task fails / quality < threshold → retry with Sonnet
Sonnet fails (2nd time) → escalate to Opus
Never downgrade a task mid-execution.
Apply this classification as the first step when routing any task — before looking up role-based model assignments.
routing.config.yamlYou can directly specify which model each CLI uses:
# skills/multi-ai-run/routing.config.yaml (or .claude/routing.config.yaml)
cli_models:
gemini:
command: "gemini"
model: "gemini-3.1-pro-preview" # ← change model here
# model: "gemini-2.0-flash" # for faster responses
# model: "gemini-3-flash-preview" # for lightweight tasks
args: "--output-format text"
codex:
command: "codex exec"
model: "gpt-5.3-codex" # ← change model here
# model: "o3" # for stronger reasoning
# model: "gpt-4.1" # general purpose
claude:
command: "claude"
model: "opus" # ← change model here
# model: "sonnet" # for faster responses
Configuration file precedence:
.claude/routing.config.yaml~/.claude/routing.config.yamlskills/multi-ai-run/routing.config.yaml.claude/model-routing.yaml# .claude/model-routing.yaml
version: 1.0
# Default model (applied to agents without a specific routing entry)
default: claude
# Per-role model overrides
routing:
# Exact role name matching
backend-specialist: codex
frontend-specialist: gemini
test-specialist: codex
api-designer: codex
# Wildcard patterns
design-*: gemini # design-system, design-review, etc.
*-developer: codex # auth-developer, payment-developer, etc.
# Per-domain overrides
domains:
auth: codex # all tasks in the auth domain
ui: gemini # all tasks in the ui domain
# Per-task-type overrides (take priority over role routing)
task_types:
code_generation: codex
code_review: codex
design_implementation: gemini
design_review: gemini
architecture: claude
planning: claude
~/.claude/model-routing.yamlUsed when no project-level configuration exists.
1. Analyze task → determine agent role
2. Look up model-routing.yaml (project > global > default)
3. Matching precedence:
a. task_types (task type)
b. routing (exact role name)
c. routing wildcard
d. domains (domain)
e. default
# Code generation with Codex
codex exec "Implement the auth service based on: $(cat specs/auth-service.md)"
# UI implementation with Gemini
gemini -p "Create React component following design: $(cat design/button.md)"
# Complex orchestration with Claude (handled directly)
# (the orchestrator handles this itself)
1. Collect each CLI output
2. Apply file creation/modification
3. Claude mediates on conflict detection
4. Quality validation (lint, type-check, test)
/multi-ai-run
# → auto-routes based on model-routing.yaml
/multi-ai-run T1.2
# → executes task T1.2 with the appropriate model
/multi-ai-run --model=gemini T1.2
# → forces task T1.2 to run with Gemini
/multi-ai-run --dry-run
# → preview which tasks will run on which models
# Verify required CLI installations
command -v claude # Claude Code (host, required)
command -v codex # OpenAI Codex CLI
command -v gemini # Google Gemini CLI
Codex CLI:
npm install -g @openai/codex
codex auth
Gemini CLI:
npm install -g @anthropic-ai/gemini-cli # or official installation method
gemini auth
For detailed installation instructions, see
references/cli-setup.md
TASKS.md:
- [ ] T1.1: Implement backend API (auth)
- [ ] T1.2: Implement frontend UI (login form)
- [ ] T1.3: Write integration tests
Execution result:
T1.1 → Codex (backend-specialist, auth domain)
T1.2 → Gemini (frontend-specialist)
T1.3 → Codex (test-specialist)
TASKS.md:
- [ ] T2.1: Define design tokens
- [ ] T2.2: Implement button component
- [ ] T2.3: Write Storybook stories
Execution result:
T2.1 → Gemini (design-system)
T2.2 → Gemini (frontend-specialist)
T2.3 → Codex (code_generation)
Use with /orchestrate or /agile auto:
# Existing: Claude only
/orchestrate
# New: model routing enabled
/orchestrate --multi-ai
# Or enable by default via config file
# .claude/model-routing.yaml
enabled: true # auto-applies to all orchestration
| Skill | Relationship |
|---|---|
/multi-ai-review | Uses multiple AIs during the review phase |
/orchestrate | Integrates via --multi-ai flag |
/cost-router | Can be combined with cost-based model selection |
Q: Can models other than Claude modify files inside Claude Code?
A: Codex can read and write directly to the project folder with the --sandbox workspace-write option. For Gemini, Claude receives the CLI output and applies it using the Edit/Write tools.
Q: I want only a specific task to run on a different model.
A: Use --model=gemini T1.2, or add a tag in TASKS.md: - [ ] T1.2: UI implementation [model:gemini]
Q: How does API cost work? A: Each CLI uses its own subscription plan or API credits. This is separate from Claude Code costs.
skills/multi-ai-run/
├── SKILL.md # this file
├── routing.config.yaml # CLI model + routing configuration
└── references/
└── cli-setup.md # CLI installation guide
Last Updated: 2026-03-04 (v1.1.0 - routing.config.yaml added)
npx claudepluginhub insightflo/claude-impl-tools --plugin claude-impl-toolsOrchestrates multi-agent coding tasks via Claude DevFleet: plan projects, dispatch parallel agents in isolated worktrees, monitor progress, and read structured reports.
Orchestrates Claude Code's native agents for parallel multi-domain tasks like comprehensive code analysis, feature reviews, and security audits requiring diverse expertise.
Designs Claude Code agents using patterns like single-purpose specialists, workflow orchestrators, context adapters, and resource processors; guides tool selection, model choice, and extended context integration.