/claude-impl-tools:multi-ai-runfrom claude-impl-tools
Routes agent roles to optimal AI models (Claude/Gemini/Codex) and executes them. Includes cost-tier routing to reduce token costs.
Ships in claude-impl-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub insightflo/claude-impl-tools --plugin claude-impl-tools28 skills in this plugin
/agileAgile Sprint Master for regular user check-ins and sprint management. Use this for /agile, /sprint, starting a sprint, checkpoint requests, or any time you are running structured iterative development. Triggers on "start sprint", "checkpoint", "sprint status", "run task", or whenever you need to manage layered build progress across Skeleton → Muscles → Skin./architectureQuery and visualize the full project architecture. Use this during project onboarding, before code reviews, before adding new domains, or whenever you need to understand the tech stack. Responds to questions like "show me the overall structure", "list all APIs", "what's the tech stack", or "explain the domain structure". Triggers on /architecture./