fanout
Dispatch the same query to multiple subagents in parallel across chunks in a manifest and aggregate results with source provenance
от jmagly★ 233 звезды на GitHub
Установить fanout в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Fanout
Dispatch the same query to multiple subagents in parallel, each processing one chunk from a chunk manifest. Aggregates results with source provenance — every answer is tagged with which chunk it came from.
Triggers
Alternate expressions and non-obvious activations:
- "search all chunks" → fanout query across manifest
- "run in parallel across the chunks" → fanout with current manifest
- "ask each piece this question" → fanout with default parallelism
- "parallel grep" → fanout with a pattern as the query
Trigger Patterns Reference
| Pattern | Example | Action |
|---|---|---|
| Fanout search | "search all chunks for authentication bugs" | Fanout query across manifest |
| Explicit chunks dir | "fanout across .aiwg/rlm-chunks/auth/" | --chunks .aiwg/rlm-chunks/auth/ |
| Limit parallelism | "search chunks, max 2 at a time" | --max-parallel 2 |
| Synthesis request | "search all chunks and give me one answer" | --synthesize |
| Model selection | "use haiku to search the chunks" | --model haiku |
| Manifest path | "fanout using manifest.json" | --chunks manifest.json |
Behavior
When triggered:
Parse arguments — extract query, chunks path (directory or manifest), parallelism limit, model, and synthesis flag.
Load manifest — read
manifest.jsonfrom the chunks directory, or use the provided manifest path directly. Validate that chunk files exist.Respect context budget — if
AIWG_CONTEXT_WINDOWis set, cap--max-parallelat the budget-appropriate limit per the context-budget rule. Default cap is 4 parallel subagents.Dispatch subagents — launch up to
--max-parallelsubagents simultaneously. Each subagent:- Receives the query and exactly one chunk's content
- Is instructed to answer only from that chunk's content
- Returns a structured result:
{ chunk_id, answer, confidence, relevant_lines }
Wait for all subagents — collect results as they complete. Track which chunks returned answers vs. "not found in this chunk".
Aggregate with provenance — compile results into a provenance-tagged list. Each entry shows:
- The answer or finding
- The chunk it came from (
chunk-0003) - The source lines within that chunk
- Confidence level (high / medium / low)
Optionally synthesize — if
--synthesizeis set, pass all results to a synthesis subagent that merges them into a single coherent answer.Report result — print the aggregated findings with provenance, or the synthesized answer.
Aggregated Result Format
Fanout Query: "Where is the token refresh logic?"
Chunks searched: 8 | Matches found: 3 | Model: haiku
Matches:
[chunk-0002] lines 45-67 — HIGH confidence
Token refresh is handled in `AuthMiddleware.refreshToken()`.
The method checks expiry, calls `/auth/refresh`, and updates the
session cookie on success.
[chunk-0005] lines 112-118 — MEDIUM confidence
`refreshToken()` is called from the React hook `useSession`
when the access token has less than 60 seconds remaining.
[chunk-0007] lines 203-208 — LOW confidence
Environment variable REFRESH_INTERVAL_MS controls refresh
frequency. Default: 300000 (5 minutes).
Chunks with no match: chunk-0001, chunk-0003, chunk-0004, chunk-0006, chunk-0008
Synthesized Result Format (--synthesize)
Fanout Query: "Where is the token refresh logic?"
Synthesis from 3 matching chunks:
Token refresh is implemented in `AuthMiddleware.refreshToken()` (chunk-0002,
lines 45-67). The React layer triggers refresh via the `useSession` hook when
the access token has less than 60 seconds remaining (chunk-0005, lines 112-118).
Refresh interval is configurable via REFRESH_INTERVAL_MS (default: 5 minutes,
chunk-0007, lines 203-208).
Parameters
<query>— Natural language question or task to answer using the chunks (required)--chunks <dir|manifest.json>— Path to chunks directory or manifest file (default:.aiwg/rlm-chunks/)--max-parallel N— Max simultaneously active subagents (default:4, bounded by context budget). Alias--parallelis accepted for one release cycle and emits a deprecation warning; remove it after the next stable release.--model haiku|sonnet|opus— Model for subagents (default:haikufor cost efficiency)--synthesize— After collecting results, synthesize into a single answer
Examples
Example 1: Basic fanout search
User: "fanout search across the auth chunks: where is token expiry checked?"
Action: Dispatch query to each chunk in .aiwg/rlm-chunks/auth/, 4 parallel subagents using haiku.
Response:
Fanout Query: "where is token expiry checked?"
Chunks searched: 6 | Matches found: 2 | Model: haiku
Matches:
[chunk-0002] lines 88-95 — HIGH confidence
Token expiry is checked in `validateToken()` by comparing
`token.exp` against `Date.now() / 1000`.
[chunk-0004] lines 31-38 — MEDIUM confidence
JWT middlew
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fanout?
Dispatch the same query to multiple subagents in parallel across chunks in a manifest and aggregate results with source provenance
Как установить скилл fanout?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fanout запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…