Multi-Tier Models Skill
Cost-optimized hierarchical model usage: Fable 5 advises, Opus 4.8 orchestrates, Haiku/Gemini execute specialized tasks.
When to Use
Invoke this skill when:
- The user wants to "use multiple models", "hierarchical agents", "optimize model costs"
- Complex tasks that benefit from strategic planning + efficient execution
- Budget-conscious workflows requiring Fable 5's capabilities without excessive cost
Pattern Overview
Fable 5 (Strategic Advisor)
↓ provides high-level strategy
Opus 4.8 (Orchestrator/Planner)
↓ creates detailed execution plan
Workers (parallel execution):
├─ Haiku 4.5 → text/code tasks
├─ Gemini 3.5 Flash → multimodal analysis
├─ Gemini Omni Flash Preview → video generation/editing
└─ Gemini 3.1 Flash Image → image generation/editing
Implementation
Step 1: Fable 5 Strategy (if needed)
Use Fable 5 for:
- Ambiguous/open-ended problems requiring reasoning
- Strategic decisions, trade-offs, architectural choices
- Novel problem decomposition
Skip if: Task is well-defined and doesn't need strategic insight.
Step 2: Opus 4.8 Planning
Always use Opus 4.8 to:
- Break work into discrete, parallelizable steps
- Create detailed execution plan with context for each step
- Determine dependencies and ordering
Step 3: Worker Execution
Spawn specialized workers based on task type:
Haiku 4.5 for:
- Text analysis, summarization, extraction
- Code generation, review, refactoring
- General-purpose concrete tasks
Gemini 3.5 Flash for:
- Multimodal analysis (images + text)
- Document understanding with visuals
- Cross-modal reasoning
Gemini Omni Flash Preview for:
- Video generation from text
- Video editing and transformation
- Video analysis and summarization
Gemini 3.1 Flash Image for:
- Image generation from text
- Image editing and manipulation
- Visual content creation
All workers execute in parallel where possible.
Step 4: Synthesis
Use Opus 4.8 (or current model) to:
- Collect worker results
- Synthesize final output
- Handle any conflicts/inconsistencies
Usage Example
User: "Research competitive landscape for our new product"
1. [Optional] Fable 5 strategy:
- What dimensions matter? (pricing, features, market position, etc.)
- How to structure the research?
2. Opus 4.8 plan:
- Step 1: Research competitor A's pricing
- Step 2: Research competitor B's features
- Step 3: Analyze market positioning
- Step 4: Summarize customer reviews
(Each step includes context, search queries, output format)
3. Haiku workers (parallel):
- 4 agents, each handling one step
4. Synthesis:
- Combine into competitive analysis report
Cost Optimization Tips
Model Selection
- Use Fable 5 sparingly: Only for strategy, not execution
- Choose the right worker: Gemini Flash for multimodal/video/image, Haiku for text/code
- Leverage global endpoints: Gemini models use optimized global infrastructure
Context Optimization (Critical!)
- Compact contexts: Extract minimal context in planning; workers get only what they need
- Structured outputs: Use JSON schemas to enforce compact, structured results
- Avoid duplication: Use reference IDs instead of embedding large content
- Summarize between stages: Compress intermediate results in multi-stage pipelines
- Enable prompt caching: Reuse expensive context across calls (Claude models)
Execution Efficiency
- Batch worker execution: Spawn all workers in parallel, not sequentially
- Reuse plans: For similar tasks, skip Fable 5, reuse Opus plans
See references/context-optimization.md for detailed strategies (60-80% token savings)
Model Selection Guide
| Model |
Use For |
Cost |
Typical Token Usage |
| Claude Models |
|
|
|
| Fable 5 |
Strategy, complex reasoning |
Highest |
1-2K tokens |
| Opus 4.8 |
Planning, orchestration, synthesis |
Medium |
2-5K tokens |
| Haiku 4.5 |
Text/code execution tasks |
Low |
500-2K tokens each |
| Gemini Models (Global Endpoints) |
|
|
|
| Gemini 3.5 Flash |
Multimodal analysis, doc+image |
Very Low |
1-3K tokens |
| Gemini Omni Flash Preview |
Video generation/editing |
Very Low |
Varies by video |
| Gemini 3.1 Flash Image |
Image generation/editing |
Very Low |
Varies by image |
Cost optimization: Use Gemini Flash models for multimodal/video/image tasks - optimized for speed and cost on global infrastructure.
Implementation
When this skill is invoked:
Assess if Fable 5 needed:
- Is the problem ambiguous or novel?
- Are there strategic trade-offs to consider?
- Would reasoning significantly improve the approach?
Use Agent tool to spawn Fable 5 (if needed):
Agent({
description: "Strategic guidance for X",
model: "fable",
prompt: "Provide strategic framework for: [task]. Focus on: approach, key dimensions, potential pitfalls."
})
Create detailed plan with Opus 4.8 (with context extraction):
Agent({
description: "Create execution plan for X",
model: "opus",
prompt: `Based on strategy: [fable_output], create detailed step-by-step plan.
For each step:
- Task description (what to do)
- Minimal context (ONLY what this step needs - max 200 words)
- Expected output format (structured schema)
Extract essentials; avoid duplicating full context to each step.`
})
Spawn specialized workers in parallel:
// In single message, spawn all workers (choose model by task type)
Agent({ model: "haiku", prompt: "Text analysis step: [details]" })
Agent({ model: "gemini-3.5-flash", prompt: "Multimodal step (doc+images): [details]" })
Agent({ model: "gemini-3.1-flash-image", prompt: "Generate image: [details]" })
Agent({ model: "haiku", prompt: "Code generation step: [details]" })
Worker selection:
haiku: Text, code, general tasks
gemini-3.5-flash: Multimodal (images + text)
gemini-omni-flash-preview: Video generation/editing
gemini-3.1-flash-image: Image generation/editing
Synthesize results:
- Collect all worker outputs
- Combine, resolve conflicts
- Present final result to user
Workflow Script Alternative
For complex multi-step workflows, consider using the Workflow tool instead of Agent:
export const meta = {
name: 'multi-tier-research',
description: 'Research using Fable 5 strategy, Opus planning, Haiku execution',
phases: [
{title: 'Strategy', model: 'fable'},
{title: 'Planning', model: 'opus'},
{title: 'Execute', model: 'haiku'},
{title: 'Synthesize'}
]
}
phase('Strategy')
const strategy = await agent('Provide strategic framework for: ' + args.task, {
model: 'fable',
schema: STRATEGY_SCHEMA
})
phase('Planning')
const plan = await agent('Create execution plan based on: ' + JSON.stringify(strategy), {
model: 'opus',
schema: PLAN_SCHEMA
})
phase('Execute')
const results = await parallel(plan.steps.map(step => () =>
agent(step.prompt, {model: 'haiku', schema: step.outputSchema})
))
phase('Synthesize')
return synthesize(results, strategy)
Reference Files
references/complete-example.md - START HERE - Full optimized example (83% cost savings)
references/quick-reference.md - Cheat sheet and decision flow
references/context-optimization.md - Context compaction strategies (60-80% token savings)
references/gemini-workers.md - Gemini integration patterns
references/workflow-example.md - Workflow script patterns
references/agent-pattern.md - Agent tool usage patterns
Notes
- This pattern mirrors the "plan big, execute small" from Claude Cookbooks
- Context optimization is critical: Can save 60-80% tokens through compaction
- Works best for research, analysis, multi-step generation, multimodal tasks
- Not suitable for: single-step tasks, interactive workflows, iterative refinement
- Monitor costs: Check token usage to ensure savings vs. single-model approach
- Gemini models use global endpoints for optimal performance worldwide
1---2name: multi-tier-models3description: Multi-Tier Models Skill4---5# Multi-Tier Models Skill67**Cost-optimized hierarchical model usage: Fable 5 advises, Opus 4.8 orchestrates, Haiku/Gemini execute specialized tasks.**89## When to Use1011Invoke this skill when:12- The user wants to "use multiple models", "hierarchical agents", "optimize model costs"13- Complex tasks that benefit from strategic planning + efficient execution14- Budget-conscious workflows requiring Fable 5's capabilities without excessive cost1516## Pattern Overview1718```19Fable 5 (Strategic Advisor)20 ↓ provides high-level strategy21Opus 4.8 (Orchestrator/Planner)22 ↓ creates detailed execution plan23Workers (parallel execution):24 ├─ Haiku 4.5 → text/code tasks25 ├─ Gemini 3.5 Flash → multimodal analysis26 ├─ Gemini Omni Flash Preview → video generation/editing27 └─ Gemini 3.1 Flash Image → image generation/editing28```2930## Implementation3132### Step 1: Fable 5 Strategy (if needed)33Use Fable 5 for:34- Ambiguous/open-ended problems requiring reasoning35- Strategic decisions, trade-offs, architectural choices36- Novel problem decomposition3738Skip if: Task is well-defined and doesn't need strategic insight.3940### Step 2: Opus 4.8 Planning41Always use Opus 4.8 to:42- Break work into discrete, parallelizable steps43- Create detailed execution plan with context for each step44- Determine dependencies and ordering4546### Step 3: Worker Execution47Spawn specialized workers based on task type:4849**Haiku 4.5** for:50- Text analysis, summarization, extraction51- Code generation, review, refactoring52- General-purpose concrete tasks5354**Gemini 3.5 Flash** for:55- Multimodal analysis (images + text)56- Document understanding with visuals57- Cross-modal reasoning5859**Gemini Omni Flash Preview** for:60- Video generation from text61- Video editing and transformation62- Video analysis and summarization6364**Gemini 3.1 Flash Image** for:65- Image generation from text66- Image editing and manipulation67- Visual content creation6869All workers execute in parallel where possible.7071### Step 4: Synthesis72Use Opus 4.8 (or current model) to:73- Collect worker results74- Synthesize final output75- Handle any conflicts/inconsistencies7677## Usage Example7879```80User: "Research competitive landscape for our new product"81821. [Optional] Fable 5 strategy:83 - What dimensions matter? (pricing, features, market position, etc.)84 - How to structure the research?85 862. Opus 4.8 plan:87 - Step 1: Research competitor A's pricing88 - Step 2: Research competitor B's features89 - Step 3: Analyze market positioning90 - Step 4: Summarize customer reviews91 (Each step includes context, search queries, output format)92933. Haiku workers (parallel):94 - 4 agents, each handling one step95 964. Synthesis:97 - Combine into competitive analysis report98```99100## Cost Optimization Tips101102### Model Selection103- **Use Fable 5 sparingly**: Only for strategy, not execution104- **Choose the right worker**: Gemini Flash for multimodal/video/image, Haiku for text/code105- **Leverage global endpoints**: Gemini models use optimized global infrastructure106107### Context Optimization (Critical!)108- **Compact contexts**: Extract minimal context in planning; workers get only what they need109- **Structured outputs**: Use JSON schemas to enforce compact, structured results110- **Avoid duplication**: Use reference IDs instead of embedding large content111- **Summarize between stages**: Compress intermediate results in multi-stage pipelines112- **Enable prompt caching**: Reuse expensive context across calls (Claude models)113114### Execution Efficiency115- **Batch worker execution**: Spawn all workers in parallel, not sequentially116- **Reuse plans**: For similar tasks, skip Fable 5, reuse Opus plans117118**See `references/context-optimization.md` for detailed strategies (60-80% token savings)**119120## Model Selection Guide121122| Model | Use For | Cost | Typical Token Usage |123|-------|---------|------|---------------------|124| **Claude Models** | | | |125| Fable 5 | Strategy, complex reasoning | Highest | 1-2K tokens |126| Opus 4.8 | Planning, orchestration, synthesis | Medium | 2-5K tokens |127| Haiku 4.5 | Text/code execution tasks | Low | 500-2K tokens each |128| **Gemini Models (Global Endpoints)** | | | |129| Gemini 3.5 Flash | Multimodal analysis, doc+image | Very Low | 1-3K tokens |130| Gemini Omni Flash Preview | Video generation/editing | Very Low | Varies by video |131| Gemini 3.1 Flash Image | Image generation/editing | Very Low | Varies by image |132133**Cost optimization**: Use Gemini Flash models for multimodal/video/image tasks - optimized for speed and cost on global infrastructure.134135## Implementation136137When this skill is invoked:1381391. **Assess if Fable 5 needed**:140 - Is the problem ambiguous or novel?141 - Are there strategic trade-offs to consider?142 - Would reasoning significantly improve the approach?1431442. **Use Agent tool to spawn Fable 5** (if needed):145 ```146 Agent({147 description: "Strategic guidance for X",148 model: "fable",149 prompt: "Provide strategic framework for: [task]. Focus on: approach, key dimensions, potential pitfalls."150 })151 ```1521533. **Create detailed plan with Opus 4.8** (with context extraction):154 ```155 Agent({156 description: "Create execution plan for X",157 model: "opus",158 prompt: `Based on strategy: [fable_output], create detailed step-by-step plan.159 160 For each step:161 - Task description (what to do)162 - Minimal context (ONLY what this step needs - max 200 words)163 - Expected output format (structured schema)164 165 Extract essentials; avoid duplicating full context to each step.`166 })167 ```1681694. **Spawn specialized workers in parallel**:170 ```171 // In single message, spawn all workers (choose model by task type)172 Agent({ model: "haiku", prompt: "Text analysis step: [details]" })173 Agent({ model: "gemini-3.5-flash", prompt: "Multimodal step (doc+images): [details]" })174 Agent({ model: "gemini-3.1-flash-image", prompt: "Generate image: [details]" })175 Agent({ model: "haiku", prompt: "Code generation step: [details]" })176 ```177 178 **Worker selection**:179 - `haiku`: Text, code, general tasks180 - `gemini-3.5-flash`: Multimodal (images + text)181 - `gemini-omni-flash-preview`: Video generation/editing182 - `gemini-3.1-flash-image`: Image generation/editing1831845. **Synthesize results**:185 - Collect all worker outputs186 - Combine, resolve conflicts187 - Present final result to user188189## Workflow Script Alternative190191For complex multi-step workflows, consider using the Workflow tool instead of Agent:192193```javascript194export const meta = {195 name: 'multi-tier-research',196 description: 'Research using Fable 5 strategy, Opus planning, Haiku execution',197 phases: [198 {title: 'Strategy', model: 'fable'},199 {title: 'Planning', model: 'opus'},200 {title: 'Execute', model: 'haiku'},201 {title: 'Synthesize'}202 ]203}204205phase('Strategy')206const strategy = await agent('Provide strategic framework for: ' + args.task, {207 model: 'fable',208 schema: STRATEGY_SCHEMA209})210211phase('Planning')212const plan = await agent('Create execution plan based on: ' + JSON.stringify(strategy), {213 model: 'opus',214 schema: PLAN_SCHEMA215})216217phase('Execute')218const results = await parallel(plan.steps.map(step => () =>219 agent(step.prompt, {model: 'haiku', schema: step.outputSchema})220))221222phase('Synthesize')223return synthesize(results, strategy)224```225226## Reference Files227228- **`references/complete-example.md`** - **START HERE** - Full optimized example (83% cost savings)229- **`references/quick-reference.md`** - Cheat sheet and decision flow230- **`references/context-optimization.md`** - Context compaction strategies (60-80% token savings)231- **`references/gemini-workers.md`** - Gemini integration patterns232- **`references/workflow-example.md`** - Workflow script patterns233- **`references/agent-pattern.md`** - Agent tool usage patterns234235## Notes236237- This pattern mirrors the "plan big, execute small" from Claude Cookbooks238- **Context optimization is critical**: Can save 60-80% tokens through compaction239- Works best for research, analysis, multi-step generation, multimodal tasks240- Not suitable for: single-step tasks, interactive workflows, iterative refinement241- Monitor costs: Check token usage to ensure savings vs. single-model approach242- Gemini models use global endpoints for optimal performance worldwide