Skip to main content
ClaudeWave
Slash Command3.6k repo starsupdated yesterday

multi

The multi command forces parallel execution of tasks across multiple external AI providers, including Codex and Gemini, rather than using Claude alone. Use this when making high-stakes decisions or validating critical work that requires cross-checking different model perspectives, understanding that each query incurs external API costs of approximately $0.02 to $0.08.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/nyldn/claude-octopus/HEAD/.claude/commands/multi.md -o ~/.claude/commands/multi.md
Then start a new Claude Code session; the slash command loads automatically.

multi.md

# Multi - Multi-Provider Override

**Forces multi-provider execution for any task using all available AI providers.**

## 🤖 INSTRUCTIONS FOR CLAUDE

### EXECUTION MECHANISM — NON-NEGOTIABLE

**You MUST dispatch work to external providers (Codex, Gemini, etc.) for this command. You are PROHIBITED from:**
- ❌ Executing the entire task using only Claude-native tools
- ❌ Using a single Agent subagent instead of multi-provider dispatch
- ❌ Skipping provider dispatch because "I can handle this alone"

**Multi-LLM orchestration is the purpose of this command.** Single-model execution defeats its purpose.

When the user invokes this command (e.g., `/octo:multi <task>`):

### Step 1: Cost Awareness & Intent Confirmation

**CRITICAL: Before forcing multi-provider execution, use AskUserQuestion to confirm intent and cost awareness:**

```javascript
AskUserQuestion({
  questions: [
    {
      question: "Why do you need multiple AI perspectives?",
      header: "Intent",
      multiSelect: false,
      options: [
        {label: "High-stakes decision", description: "Critical choice requiring comprehensive analysis"},
        {label: "Quality validation", description: "Cross-check important work for accuracy"},
        {label: "Learning different approaches", description: "See how different models think"},
        {label: "Comparing perspectives", description: "Want to see model-specific insights"},
        {label: "Just exploring", description: "Curious about multi-AI capabilities"}
      ]
    },
    {
      question: "Are you aware this uses external API credits?",
      header: "Cost",
      multiSelect: false,
      options: [
        {label: "Yes, proceed (~$0.02-0.08/query)", description: "I understand this costs money via Codex + Gemini APIs"},
        {label: "Tell me more about costs", description: "Explain what I'll be charged"},
        {label: "Use free providers only", description: "Skip Codex/Gemini, use Claude only"}
      ]
    }
  ]
})
```

**WAIT for the user's answers before proceeding.**

**After receiving answers:**

- **If user selected "Tell me more about costs"**: Explain the cost breakdown, then ask question 2 again
- **If user selected "Use free providers only"**: Explain that multi requires external providers, suggest using Claude directly instead
- **If user selected "Yes, proceed"**: Continue with multi-provider execution
- **Store intent** in context for provider selection (high-stakes → use all 3, exploring → maybe skip one if unavailable)

### Step 2: Check Provider Availability & Execute

Check which AI providers are available:

```javascript
const codexAvailable = await checkCommandAvailable('codex');
const geminiAvailable = await checkCommandAvailable('gemini');

if (!codexAvailable && !geminiAvailable) {
  console.log("⚠️ No external providers available. Multi-provider mode requires Codex and/or Gemini.");
  console.log("Run `/octo:setup` to configure external providers, or use Claude directly.");
  return;
}

// Proceed with available providers
```

Execute the task with all available providers, incorporating user intent from Step 1.

### Step 3: Adversarial Synthesis (MANDATORY — do NOT skip)

**After collecting responses from all providers, you MUST synthesize — not concatenate.**

The whole point of multi-provider execution is diversity of opinion. Presenting provider responses back-to-back without synthesis defeats this purpose. You MUST produce a structured synthesis with these sections:

1. **Consensus** — Where providers agree. State the shared conclusion and note how many providers converged on it.
2. **Divergence** — Where providers disagree. Quote each provider's position verbatim so the user sees the actual disagreement, not a smoothed-over summary.
3. **Resolution** — Your confidence-weighted recommendation resolving the conflicts. State your confidence level (high/medium/low) and WHY you side with one position over another. If you cannot resolve, say so — an honest "this depends on your context" is better than a false consensus.
4. **Minority Opinions** — Dissenting views that may be valuable even if outnumbered. A single provider flagging a security risk or edge case that others missed is often the most valuable insight.

**Present this synthesis in the chat using this format:**

```markdown
## Multi-Provider Synthesis

### Consensus
[Where all providers agree]

### Divergence
- 🔴 **Codex**: "[direct quote or close paraphrase]"
- 🟡 **Gemini**: "[direct quote or close paraphrase]"
- 🔵 **Claude**: "[direct quote or close paraphrase]"

### Resolution
[Your recommendation with confidence level and reasoning]

### Minority Opinions
[Dissenting views worth preserving — or "None: all providers converged"]
```

**Skip this step with `--fast` or when user explicitly requests speed over thoroughness.** In fast mode, present raw provider responses without synthesis.

---

## Quick Usage

Just use natural language:
```
"Run this with all providers: What is Redis?"
"I want all three AI models to look at this architecture"
"Get multiple perspectives on whether to use TypeScript"
"Force multi-provider analysis of this design decision"
```

Or use explicit commands:
```
/octo:multi "Explain how OAuth works"
/octo:multi "Review this simple function"
/octo:multi "What is JWT?"
```

## How It Works

This command activates the multi-provider skill in **forced mode**, which:
- Executes multi-provider analysis even for simple tasks
- Uses Codex CLI + Gemini CLI + Claude simultaneously
- Provides multiple perspectives when you need comprehensive analysis
- Bypasses automatic routing that might use only Claude

## What This Does

Normal Claude Octopus workflows automatically decide when to use multiple providers:
- "octo research OAuth" → automatically triggers multi-provider (probe workflow)
- "What is OAuth?" → uses Claude only (simple question)

**The multi command forces multi-provider mode even for simple tasks:**
- `/octo:multi "What is OAuth?"` → forces Codex +