원클릭으로
coordinate-subagents
Advanced subagent troubleshooting. Use when subagent calls fail, return bad output, or need voting for critical decisions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Advanced subagent troubleshooting. Use when subagent calls fail, return bad output, or need voting for critical decisions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | coordinate-subagents |
| description | Advanced subagent troubleshooting. Use when subagent calls fail, return bad output, or need voting for critical decisions. |
| tools | ["Task"] |
Core coordination patterns are in CLAUDE.md <subagent_coordination>. This skill covers edge cases.
For irreversible actions (deletions, deployments, security assessments), run same query 2-3 times in parallel:
<!-- 3 parallel agents, same question -->
<invoke name="Task">
<parameter name="subagent_type">Explore</parameter>
<parameter name="model">haiku</parameter>
<parameter name="prompt">@type: AssessAction about: "safe to delete auth_old.ts" ...</parameter>
</invoke>
<invoke name="Task">
<parameter name="subagent_type">Explore</parameter>
<parameter name="model">haiku</parameter>
<parameter name="prompt">@type: AssessAction about: "safe to delete auth_old.ts" ...</parameter>
</invoke>
<invoke name="Task">
<parameter name="subagent_type">Explore</parameter>
<parameter name="model">haiku</parameter>
<parameter name="prompt">@type: AssessAction about: "safe to delete auth_old.ts" ...</parameter>
</invoke>
Interpret results:
| Symptom | Action |
|---|---|
| Output exceeds budget by >30% | Discard entirely, retry same prompt |
| Wrong format (expected TOON, got prose) | Discard, retry with stricter instruction |
| 2 consecutive failures | Refine query OR escalate model (haiku→sonnet) |
| Contradictory answers across retries | Query is ambiguous, decompose further |
Never: Try to parse/repair confused output. Discard and retry.
Token-Oriented Object Notation. Use for uniform arrays (file lists, steps, configs).
# Array with header declaring fields
items[N]{field1,field2,field3}:
value1,value2,value3
value1,value2,value3
"value, with comma"\"nested quote\"\nFile list:
files[3]{path,purpose,lines}:
src/auth/login.ts,Main login handler,145
src/auth/session.ts,Session management,89
src/auth/token.ts,JWT utilities,67
Process steps:
steps[4]{position,action,file}:
1,Parse request body,src/middleware/parser.ts
2,Validate auth token,src/middleware/auth.ts
3,Check permissions,src/middleware/rbac.ts
4,Execute handler,src/routes/api.ts
Key-value config:
config[3]{key,value}:
maxTokens,1500
format,toon
itemLimit,10
If coordination isn't working, check for these:
| Anti-Pattern | Fix |
|---|---|
| Single agent doing multiple tasks | Split: one task per agent |
| No token budget specified | Add @constraints: maxTokens: N |
| Using opus for simple search | Downgrade to haiku |
| Full conversation history in prompt | Strip to goal + constraints only |
| Sequential independent calls | Parallelize in one message |
| Parsing broken output | Discard and retry instead |
| Asking to "explain" or "describe" | Request structured format |
| Direct MCP/web tool calls in main context | Delegate: payloads unpredictable, request TOON summary |
| Verifying N external sources inline | Delegate: N scrapes = N×2000 tokens wasted |
Bad: Compound task
Find authentication code and analyze security vulnerabilities and suggest fixes
Good: Three focused agents
Agent 1: Find authentication code (haiku, 1500 tokens)
Agent 2: Analyze security of [files from agent 1] (sonnet, 2000 tokens)
Agent 3: Suggest fixes for [issues from agent 2] (sonnet, 2000 tokens)
Note: Agent 2 depends on Agent 1, so run sequentially. But if you had 3 independent searches, run all in parallel.
Subagent returned garbage
├─ Was format specified? → Add explicit TOON/JSON instruction
├─ Was budget set? → Add @constraints maxTokens
├─ Was task atomic? → Check for "and", split if needed
├─ Right model? → Simple task shouldn't use opus
└─ Second failure? → Escalate model or refine query
MCP tools and web scrapes are context pollution hazards:
| Tool | Typical Payload | Risk |
|---|---|---|
firecrawl_scrape | 500-5000 tokens | High - full page content |
firecrawl_search | 200-1000 tokens | Medium - result snippets |
WebFetch | 500-3000 tokens | High - full page content |
Rule: Any task involving N external fetches should be delegated with:
min(N × 200, 2500) tokens for summary outputonlyMainContent: true, formats: ["markdown"]Example - URL verification:
Task(Explore, sonnet):
"Verify these 10 legislation URLs. For each, scrape with onlyMainContent:true,
confirm HTTP 200, identify managing authority from page content.
@return ItemList in TOON:
results[10]{jurisdiction,url,status,authority}:
Commonwealth,https://legislation.gov.au,valid,Office of Parliamentary Counsel
...
@constraints: maxTokens: 2000"
CLAUDE.md <subagent_coordination>references/toon-format.mdExpert guidance for creating, building, and using Claude Code subagents and the Task tool. Use when working with subagents, setting up agent configurations, understanding how agents work, or using the Task tool to launch specialized agents.
Behavioral principle for context preservation through strategic delegation. Use when starting multi-step operations, uncertain about scope, or when direct execution might exhaust context. Complements never-guess and resolve-ambiguity skills.
Maintain awareness of operation counts across the conversation to prevent cumulative context exhaustion. Use when you notice multiple operations accumulating or when working on iterative tasks across turns.
Selects and applies mental models for structured problem analysis. Triggers when user asks "why", "what if", "how should we", needs systematic problem-solving, or mentions analyzing a situation. MUST BE USED when comparing options, making decisions, or evaluating trade-offs.
Provides Flutter and Dart development workflows using dart-mcp tools. Triggers when working with .dart files, pubspec.yaml, or when user mentions Flutter, widget, Riverpod, Freezed, or Dart development. MUST BE USED for Flutter project work involving dart_analyzer, dart_run_tests, hot_reload, or IDE MCP tools.
Create Architecture Decision Records (ADRs) following LCA conventions. INVOKE THIS SKILL when user: - Asks to "document a decision" or "record a decision" - Mentions "ADR", "decision record", or "architectural decision" - Wants to capture trade-offs or options considered - Needs to supersede or update an existing decision - Asks about decision history or rationale Trigger keywords: ADR, decision record, architectural decision, trade-offs, options, rationale