multi-agent-orchestration
Orchestrate tasks across multiple AI providers (Claude, OpenAI, Gemini, Cursor, OpenCode, Ollama). Use when delegating tasks to specialized providers, routing based on capabilities, or implementing fallback strategies.
What this skill does
# Multi-Agent Orchestration Skill Route and delegate tasks to the most appropriate AI provider based on task characteristics and provider capabilities. ## Variables | Variable | Default | Description | |----------|---------|-------------| | ENABLED_CLAUDE | true | Enable Claude Code as provider | | ENABLED_OPENAI | true | Enable OpenAI/Codex as provider | | ENABLED_GEMINI | true | Enable Gemini as provider | | ENABLED_CURSOR | true | Enable Cursor as provider | | ENABLED_OPENCODE | true | Enable OpenCode as provider | | ENABLED_OLLAMA | true | Enable local Ollama as provider | | DEFAULT_PROVIDER | claude | Fallback when routing is uncertain | | CHECK_COST_STATUS | true | Check usage before delegating | ## Instructions **MANDATORY** - Follow the Workflow steps below in order. Do not skip steps. - Before delegating, understand the task characteristics - Use the model-discovery skill for current model names - Check cost/usage status before high-volume delegation ## Quick Decision Tree ``` What type of task is this? │ ├─ Needs conversation history? ─────────► Keep in Claude (no delegation) │ ├─ Needs sandboxed execution? ──────────► OpenAI/Codex │ ├─ Large context (>100k tokens)? ───────► Gemini │ ├─ Multimodal (images/video)? ──────────► Gemini │ ├─ Needs web search? ───────────────────► Gemini │ ├─ Quick IDE edit? ─────────────────────► Cursor │ ├─ Privacy required / offline? ─────────► Ollama │ ├─ Provider-agnostic fallback? ─────────► OpenCode │ └─ General reasoning / coding? ─────────► Claude (default) ``` ## Red Flags - STOP and Reconsider If you're about to: - Delegate without checking provider availability - Use hardcoded model names (use model-discovery skill instead) - Send sensitive data to a provider without user consent - Delegate a task that requires your conversation history - Skip the routing decision and guess which provider **STOP** -> Read the appropriate cookbook file -> Check provider status -> Then proceed ## Workflow 1. [ ] Analyze the task: What capabilities are required? 2. [ ] **CHECKPOINT**: Consult `reference/provider-matrix.md` for routing decision 3. [ ] Check provider availability: Run provider-check and cost-status if CHECK_COST_STATUS is true 4. [ ] Read the appropriate cookbook file for the selected provider 5. [ ] **CHECKPOINT**: Confirm API key / auth is configured 6. [ ] Execute delegation with proper context 7. [ ] Parse and summarize results for the user ## Cookbook ### Claude Code (Orchestrator) - IF: Task requires complex reasoning, multi-file analysis, or conversation history - THEN: Keep task in Claude Code (you are the orchestrator) - WHY: Best for architecture decisions, complex refactoring ### OpenAI / Codex - IF: Task needs sandboxed execution OR security-sensitive operations - THEN: Read and execute `cookbook/openai-codex.md` - REQUIRES: `OPENAI_API_KEY` or Codex subscription ### Google Gemini - IF: Task involves large context (>100k tokens), multimodal (images/video), OR web search - THEN: Read and execute `cookbook/gemini-cli.md` - REQUIRES: `GEMINI_API_KEY` or Gemini subscription ### Cursor - IF: Task is quick IDE edits, simple codegen, or rename/refactor - THEN: Read and execute `cookbook/cursor-agent.md` - REQUIRES: Cursor installed and configured ### OpenCode - IF: Need provider-agnostic execution or a fallback CLI - THEN: Read and execute `cookbook/opencode-cli.md` - REQUIRES: OpenCode CLI installed and configured ### Ollama (Local) - IF: Task needs privacy, offline operation, or cost-free inference - THEN: Read and execute `cookbook/ollama-local.md` - REQUIRES: Ollama running with models pulled ## Model Names **Do not hardcode model version numbers** - they become stale quickly. For current model names, use the `model-discovery` skill: ```bash python .claude/ai-dev-kit/skills/model-discovery/scripts/fetch_models.py ``` Or read: `.claude/ai-dev-kit/skills/model-discovery/SKILL.md` ## Quick Reference | Task Type | Primary | Fallback | |-----------|---------|----------| | Complex reasoning | Claude | OpenAI | | Sandboxed execution | OpenAI | Cursor | | Large context (>100k) | Gemini | Claude | | Multimodal | Gemini | Claude | | Quick codegen | Cursor | Claude | | Web search | Gemini | (web tools) | | Privacy/offline | Ollama | Claude | See `reference/provider-matrix.md` for detailed routing guidance. ## Tool Discovery Orchestration tools are available in `.claude/ai-dev-kit/dev-tools/orchestration/`: ```bash # Check provider status and usage .claude/ai-dev-kit/dev-tools/orchestration/monitoring/cost-status.sh # Check CLI availability (optional apply) .claude/ai-dev-kit/dev-tools/orchestration/monitoring/provider-check.py # Intelligent task routing .claude/ai-dev-kit/dev-tools/orchestration/routing/route-task.py "your task" # Direct provider execution .claude/ai-dev-kit/dev-tools/orchestration/providers/claude-code/spawn.sh "task" .claude/ai-dev-kit/dev-tools/orchestration/providers/codex/execute.sh "task" .claude/ai-dev-kit/dev-tools/orchestration/providers/gemini/query.sh "task" .claude/ai-dev-kit/dev-tools/orchestration/providers/cursor/agent.sh "task" .claude/ai-dev-kit/dev-tools/orchestration/providers/opencode/execute.sh "task" .claude/ai-dev-kit/dev-tools/orchestration/providers/ollama/query.sh "task" ``` ## Output Delegation results should be: 1. Parsed from provider's response format 2. Summarized for the user 3. Integrated back into the conversation context ```markdown ## Delegation Result **Provider**: [provider name] **Task**: [brief description] **Status**: Success / Partial / Failed ### Summary [Key findings or outputs] ### Details [Full response if relevant] ```
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.