スキル一覧に戻る
zhsks311

orchestrate

by zhsks311

0🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: orchestrate description: Multi-Model Orchestration - Guide for orchestrating multi-model agents version: 2.0.0 author: CC Orchestrator tags: [orchestration, multi-model, parallel, workflow]

Multi-Model Orchestration Guide

Follow this guide to orchestrate multi-model agents effectively.


Phase 0: Intent Gate (BLOCKING)

Step 0: Request Classification

User request received
    ↓
[Classify request type]
├─ Trivial        → Use tools directly (no agent needed)
├─ Explicit       → Execute as instructed
├─ Exploratory    → Run scout/index in parallel
├─ Open-ended     → Go to Phase 1 (codebase evaluation needed)
├─ Research       → Run index first
├─ Design/Review  → Consult arch
└─ Ambiguous      → Ask only 1 clarifying question

Step 1: Ambiguity Check

├─ Single interpretation      → Proceed
├─ Multiple + similar effort  → Make reasonable assumption, proceed
├─ 2x+ effort difference      → Must ask
└─ Missing key information    → Must ask

Step 2: Verification Checklist

  • Checked implicit assumptions?
  • Is the search scope clear?
  • Selected the appropriate agent?

Phase 1: Codebase Evaluation (Open-ended tasks only)

State Classification Matrix

StateSignalAction
DisciplinedConsistent patterns, config existsStrictly follow existing style
TransitionMixed patternsAsk "Which pattern to follow?"
LegacyInconsistent"Suggest: Apply [X]?"
GreenfieldNew projectApply modern best practices

Phase 2: Execution

2A: Exploration & Research

Tool Selection Priority:

ResourceCostWhen to Use
Grep, Glob, ReadFREEClear scope, simple search
scout agentFREECodebase exploration (Haiku, ~75% cheaper vs. Sonnet)
index agentFREEExternal docs, API research (WebSearch)
canvasMODERATEUI/UX, styling (Gemini 3)
quillMODERATETechnical documentation (Gemini 3)
lensMODERATEImage/PDF analysis (Gemini 3)
archEXPENSIVEArchitecture, code review (GPT-5.2)

Agent Routing Rules (CRITICAL):

┌─────────────────────────────────────────────────────────────┐
│ CLAUDE CODE NATIVE AGENTS (.claude/agents/) - FREE          │
│                                                             │
│   scout  → Codebase exploration (Haiku model)            │
│              "Use scout agent to find X in codebase"     │
│                                                             │
│   index → External research (WebSearch + WebFetch)     │
│              "Use index agent to find best practices"  │
│                                                             │
│ MCP AGENTS (background_task) - PAID                         │
│                                                             │
│   arch   → background_task(agent="arch")   // OpenAI GPT-5.2│
│   canvas → background_task(agent="canvas") // Google Gemini │
│   quill  → background_task(agent="quill")  // Google Gemini │
│   lens   → background_task(agent="lens")   // Google Gemini │
└─────────────────────────────────────────────────────────────┘

Parallel Execution Pattern:

# Correct: Mixed parallel execution (Native + MCP)
"Use scout agent to find auth patterns"              // FREE (Haiku)
background_task(agent="arch", prompt="Review security") // PAID (GPT-5.2)
// Both run in parallel - continue immediately

# Wrong: Using MCP for Anthropic models (wasteful)
background_task(agent="scout", ...)  // DON'T - use scout agent
background_task(agent="index", ...)  // DON'T - use index agent

Exploration Stop Conditions:

  • Sufficient context acquired
  • Same information appearing repeatedly
  • No new info after 2 explorations
  • Direct answer found

2B: Implementation

Todo Creation Rules:

  • 2+ step task → Must create
  • Ambiguous scope → Must create (clarifies thinking)
  • User requests multiple items → Must create

Workflow:

  1. Create immediately (no announcement)
  2. Mark current task in_progress
  3. Mark completed immediately upon completion
  4. No batching (one at a time)

2C: Failure Recovery

On 3 consecutive failures:

  1. Stop all edits
  2. Restore to last known good state (git checkout, etc.)
  3. Document what was attempted
  4. Consult arch
  5. Explain situation to user

Phase 3: Completion Verification

Checklist:

  • All todos completed
  • No type errors (npx tsc --noEmit)
  • Build passes (if exists)
  • User request fully satisfied

Cleanup:

background_cancel(all=true)  // Cancel all background tasks

Agent Selection Guide

Agent Role Table

Claude Code Native Agents (.claude/agents/) - FREE:

AgentModelPurposeTriggers
scoutHaikuCodebase exploration, file/function search"where is", "find", "how does X work"
indexSonnetExternal docs, APIs, best practiceslibrary names, "how to", tutorials

MCP Agents (background_task) - PAID:

AgentModelPurposeCostTriggers
archGPT-5.2Architecture, strategy, code reviewHighDesign decisions, complex problems
canvasGemini 3UI/UX, styling, componentsMediumVisual changes, CSS, animations
quillGemini 3Technical docs, README, API docsMediumDocumentation requests
lensGemini 3Image, PDF, screenshot analysisMediumVisual asset analysis

Delegation Table

DomainDelegate ToTrigger Keywords
Codebase explorationscout (native)find, where, search, structure
External Researchindex (native)library names, API, "how to", best practices
Frontend UI/UXcanvas (MCP)style, color, animation, layout, responsive
Architecturearch (MCP)design, structure, pattern selection, tradeoffs
Code Reviewarch (MCP)review, inspect, improvements
Documentationquill (MCP)README, docs, guide, API docs
Image/PDFlens (MCP)screenshot, image, PDF, diagram

Frontend Delegation Gate (BLOCKING)

Must delegate when visual keywords detected:

style, className, tailwind, color, background, border,
shadow, margin, padding, width, height, flex, grid,
animation, transition, hover, responsive, CSS
Change TypeExamplesAction
Visual/UIColors, spacing, animationsMust delegate
Pure LogicAPI calls, state managementHandle directly
MixedBoth visual + logicSeparate and handle

Delegation Prompt Structure

Required 7 Sections:

## TASK
[Atomic goal - single action only]

## EXPECTED
[Specific deliverable + success criteria]

## REQUIRED_TOOLS
[Tool whitelist to use]

## MUST_DO
[Explicit requirements]

## MUST_NOT_DO
[Forbidden actions - prevent rogue behavior]

## CONTEXT
[File paths, existing patterns, constraints]

## SUCCESS_CRITERIA
[Completion verification criteria]

Execution Patterns

Pattern A: Exploration + Implementation

1. "Use scout agent to find similar patterns"  // FREE (Haiku)
2. Start basic implementation simultaneously
3. Enhance implementation with exploration results

Pattern B: Research + Implementation

1. "Use index agent to find best practices"  // FREE (Sonnet)
2. Start basic implementation simultaneously
3. Apply researched patterns

Pattern C: Design Review

1. Write draft
2. background_task(arch, "Review architecture...") // GPT-5.2
3. Incorporate feedback

Pattern D: Multi-perspective Collection

1. "Use scout agent to analyze codebase"               // FREE - Parallel
2. background_task(arch, "Architecture perspective...")   // GPT-5.2 - Parallel
3. background_task(canvas, "UX perspective...")           // Gemini - Parallel
4. Integrate all results

Pattern E: Complex Implementation

1. "Use scout agent to understand existing patterns"  // FREE
2. Confirm design direction with arch (MCP)
3. Proceed with implementation
4. Code review with arch (MCP)

Cost Optimization

FREE (Native agents in .claude/agents/):
├─ Simple search          → Grep, Glob, Read (direct tools)
├─ Codebase exploration   → scout agent (Haiku, ~75% cheaper vs. Sonnet)
├─ External research      → index agent (WebSearch/WebFetch)
└─ General tasks          → Task(general-purpose)

PAID (MCP external APIs):
├─ Architecture decisions → arch (GPT-5.2, expensive)
├─ UI/UX work            → canvas (Gemini, moderate)
├─ Documentation         → quill (Gemini, moderate)
└─ Image/PDF analysis    → lens (Gemini, moderate)

Principles:

  1. Always try FREE tools first (Grep, Glob, direct Read)
  2. Use native agents (scout, index) for exploration/research
  3. Only use MCP agents for external model capabilities (GPT, Gemini)
  4. Parallel execution for time optimization

Forbidden Actions (Hard Blocks)

Never Do

CategoryForbidden
Type SafetyUsing as any, @ts-ignore
Error HandlingEmpty catch blocks
TestingDeleting failing tests to "pass"
SearchCalling agents for a single typo
DebuggingRandom modifications (shotgun debugging)
FrontendHandling visual changes directly (must delegate)
CommitCommitting without explicit request

Anti-Patterns

❌ Guessing without reading code
❌ Leaving failed state, moving to next task
❌ Sequential agent calls (when parallel possible)
❌ Unnecessary status update messages
❌ Excessive praise ("Great question!")

Communication Style

Conciseness Principle

❌ "I'm on it...", "Let me start by..."
✅ Start work immediately

❌ Explaining work (unless asked)
✅ Present results only

❌ "Great question!", "Excellent choice!"
✅ Get straight to the point

Raising Concerns

"[Observation] I found that [issue] could occur because [reason].
Alternative: [suggestion]
Proceed as planned or try the alternative?"

Tool Reference

background_task(agent, prompt, description?, priority?)
  → Returns task_id, starts execution immediately

background_output(task_id, block?, timeout_ms?)
  → block=false: Returns status immediately
  → block=true: Waits until completion

background_cancel(task_id?, all?)
  → task_id: Cancel specific task
  → all=true: Cancel all tasks

list_tasks(filter?)
  → Query current task list

share_context(key, value, scope?, ttl_seconds?)
  → Share context between agents

get_context(key, scope?)
  → Retrieve shared context

Request Processing Flowchart

User request: "$ARGUMENTS"

[Step 1: Classification]
├─ Trivial?         → Handle directly (Grep, Glob, Read)
├─ Codebase search? → Use scout agent (FREE, Haiku)
├─ External docs?   → Use index agent (FREE, WebSearch)
├─ Design?          → Consult arch (MCP, GPT-5.2)
├─ UI/Visual?       → Delegate to canvas (MCP, Gemini)
├─ Documentation?   → Delegate to quill (MCP, Gemini)
├─ Image/PDF?       → Delegate to lens (MCP, Gemini)
├─ Complex?         → Multi-agent parallel
└─ Ambiguous?       → 1 question

[Step 2: Agent Routing]
├─ Native agents (.claude/agents/) - FREE
│   ├─ scout  → Codebase exploration (Haiku)
│   └─ index → External research (WebSearch)
└─ MCP agents (background_task) - PAID
    ├─ arch   → GPT-5.2
    ├─ canvas → Gemini 3
    ├─ quill  → Gemini 3
    └─ lens   → Gemini 3

[Step 3: Execution]
├─ Identify parallelizable tasks
├─ Run native agents + MCP agents in parallel
├─ Handle directly what can be done immediately
└─ Collect and integrate results

[Step 4: Verification]
├─ Request fully satisfied?
├─ No errors?
└─ Cleanup complete?

[Step 5: Response]
├─ Deliver results
└─ background_cancel(all=true)

Follow this guide to process requests.

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です