スキル一覧に戻る
lnittman

fanout

by lnittman

Claude Code skills for power users

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

SKILL.md


name: fanout description: This skill should be used for multi-perspective analysis through parallel copilot sessions. Triggers include "analyze from multiple angles", "what are the gaps/patterns/friction", "explore before deciding", pre-refactor landscape mapping, or skill/architecture auditing. Each agent gets a DIFFERENT prompt, results aggregated.

fanout

multi-perspective analysis through parallel copilot sessions. each agent gets a DIFFERENT prompt, results aggregated.

philosophy

principleapplication
different perspectiveseach agent analyzes from unique angle (not same prompt to many)
read-only by designanalysis and synthesis ONLY - never modify code or commit
parallel executionspawn all sessions simultaneously, collect when ready
structured aggregationcombine diverse insights into actionable synthesis
output contractsall agents return predictable JSON for reliable aggregation

when to use

useskip
"analyze this from multiple angles"single-perspective analysis (use pair consult)
"what are the gaps/patterns/friction points"same question to multiple models (use pair group)
"explore before deciding"ready to implement (use loop/auto)
pre-refactor landscape mappingcode changes needed (use pair delegate)
skill/architecture auditingorchestrating skills (use skill-compose)

decision tree: fanout vs other skills

What kind of multi-agent work?
├── Same prompt to different models for consensus?
│   └── use pair --group (gemini + sonnet + codex same question)
├── Different prompts for diverse analysis?
│   └── use FANOUT (gap + pattern + friction + synergy)
├── Orchestrating multiple skills in sequence?
│   └── use skill-compose
├── Discovering and executing work items?
│   └── use auto (ideation → spawn)
├── Single consultation or delegation?
│   └── use pair (consult/delegate/review modes)
└── Long autonomous session with checkpoints?
    └── use loop

decision tree: analysis type selection

What analysis perspectives needed?
├── Understanding existing patterns?
│   └── pattern-extraction template
├── Finding missing capabilities?
│   └── gap-analysis template
├── Identifying pain points?
│   └── friction-analysis template
├── Mapping connections between things?
│   └── synergy-mapping template
├── Auditing against platform capabilities?
│   └── platform-audit template
├── Meta-level reflection on approach?
│   └── meta-analysis template
└── Custom analysis?
    └── create ad-hoc prompt with output contract

decision tree: session count

How many parallel sessions?
├── Deep dive on single topic?
│   └── 2-3 sessions (focused perspectives)
├── Broad landscape analysis?
│   └── 4-6 sessions (comprehensive coverage)
├── Resource constrained?
│   └── 2-3 sessions (prioritize highest value)
├── Exploratory/unknown scope?
│   └── 3-4 sessions (balanced coverage)
└── Follow-up to prior fanout?
    └── 1-2 sessions (fill specific gaps)

workflow

phase 1: scope and select

  1. identify analysis target (codebase, skill, architecture, etc.)
  2. select 3-6 analysis templates based on goal
  3. customize templates if needed (target-specific context)

phase 2: spawn parallel sessions with --await

# Generate parent ID for this fanout operation
FANOUT_ID="fanout-$(date +%Y%m%d-%H%M%S)-$(openssl rand -hex 4)"

# Build prompts with output contracts
for TEMPLATE in gap pattern friction synergy platform meta; do
  cat templates/${TEMPLATE}-analysis.md | \
    sed "s/\$TARGET/$TARGET/" > /tmp/${TEMPLATE}.md
done

# Spawn all sessions in parallel with --await --parent --timeout
# Each runs in background, awaits completion, writes result
for TEMPLATE in gap pattern friction synergy platform meta; do
  (
    RESULT=$(cat /tmp/${TEMPLATE}.md | \
      agents session start -a copilot -p $PROJECT \
        -g "${TEMPLATE}: $TARGET" \
        --parent "$FANOUT_ID" \
        --timeout 120 \
        --await \
        --json -q)
    echo "$RESULT" >> /tmp/results.jsonl
  ) &
done

# Wait for all background jobs
wait

Key flags:

  • --await - blocks until session completes, returns output inline
  • --parent $FANOUT_ID - links all sessions for hierarchy queries
  • --timeout 120 - auto-kill after 120s (prevents runaway sessions)

phase 3: validate and filter results

# Filter successful results (--await returns combined session + await data)
jq -c 'select(.await.status == "completed")' /tmp/results.jsonl > /tmp/valid.jsonl

# Check for failures
FAILED=$(jq -c 'select(.await.status != "completed")' /tmp/results.jsonl | wc -l)
if [ "$FAILED" -gt 0 ]; then
  echo "Warning: $FAILED sessions failed or timed out"
fi

# Query all child sessions via parent hierarchy
agents session list --json -q | \
  jq -r --arg parent "$FANOUT_ID" '.[] | select(.parent_session_id == $parent)'

phase 4: aggregate and synthesize

  1. parse all output contracts from valid results
  2. extract key findings from each perspective
  3. identify patterns across analyses (repeated themes)
  4. surface contradictions (where perspectives conflict)
  5. synthesize actionable recommendations

output contract (reused from pair)

all fanout agents MUST return this structure:

{
  "mode": "fanout",
  "analysis_type": "gap | pattern | friction | synergy | platform | meta | custom",
  "status": "success | partial | blocked | failed",
  "summary": "50-200 words",
  "confidence": 8,
  "artifacts": [
    {
      "type": "analysis",
      "content": "structured findings"
    }
  ],
  "sources": {
    "files_read": ["path/to/file.ts:10-50"],
    "tools_used": ["layer", "outline", "grep"]
  },
  "assumptions": ["assumption that could affect correctness"],
  "next_steps": ["recommended follow-up"],
  "blockers": []
}

CRITICAL constraint: fanout analysis agents must NOT:

  • modify files
  • create commits
  • write to disk (except output contract)
  • execute side effects

analysis templates

templatepurposewhen to use
gap-analysisfind missing capabilitiesbefore adding features
pattern-extractionidentify existing patternsbefore refactoring
friction-analysissurface pain pointsimproving DX/UX
synergy-mappingfind connection opportunitiesintegration planning
platform-auditcheck against capabilitiestool utilization review
meta-analysisreflect on approach itselfcontinuous improvement

see templates/ directory for full prompt templates.

aggregation patterns

theme extraction

collect: all artifact.content from results
group by: repeated concepts/recommendations
output: ranked themes by frequency + confidence-weighted

contradiction surfacing

for each pair of results:
  compare: recommendations in next_steps
  identify: conflicting advice
  note: confidence scores of each
output: conflicts with context for resolution

confidence-weighted synthesis

for each recommendation across all results:
  weight = confidence * (1 if status=success else 0.5)
  accumulate weights per unique recommendation
output: recommendations sorted by accumulated weight

concrete values

metricvaluesourcerationale
default sessions4heuristicbalances coverage vs cognitive load; 4 perspectives sufficient for most analyses without overwhelming synthesis
max sessions6heuristicdiminishing returns beyond 6; Miller's 7±2 suggests humans struggle synthesizing >7 distinct inputs
session timeout120sempiricalcopilot + gemini-3-pro completes most prompts in 30-90s; 120s allows buffer without runaway
min confidence for inclusion5conventionmidpoint on 1-10 scale; below 5 indicates agent uncertainty too high to trust findings
aggregation weight threshold0.5heuristicpartial/failed results weighted at 50% to include signal without overweighting uncertain data

sourcing legend: heuristic = based on practical experience, not formal research; empirical = measured from actual tool usage; convention = widely adopted standard

integration with agents CLI

# Start trace for fanout run
export AGENTS_TRACE_ID=$(agents report start "fanout: $TARGET" --agent claude --json -q | jq -r '.traceId')

# Report progress as sessions complete
agents report progress "3/6 analyses complete" --confidence 7

# Report completion with synthesis (gist captures multi-perspective analysis)
agents report complete "fanout synthesis ready: 6 perspectives, 12 recommendations" --confidence 9 --gist

# If blocked
agents report blocked "2 sessions timed out" --blocker-type error

session spawning pattern

IMPORTANT: use agents session start NOT direct copilot calls.

# Correct: --await blocks until completion, returns output inline
RESULT=$(cat prompt.md | agents session start -a copilot -p $PROJECT \
  -g "analysis" \
  --parent "$FANOUT_ID" \
  --timeout 120 \
  --await \
  --json -q)

# Result contains both session info and await output:
# { "session_id": "...", "await": { "status": "completed", "output": "..." } }
STATUS=$(echo "$RESULT" | jq -r '.await.status')
OUTPUT=$(echo "$RESULT" | jq -r '.await.output')

# Wrong: no tracking, no parent correlation, loses result
copilot -p --model gemini-3-pro "prompt"

error handling

failuredetectionmitigation
session timeoutawait.status == "timeout" or exit_code=143skip, note in synthesis
session failedawait.status == "failed"check await.error, report
parse errorJSON extraction from await.output failsinclude raw text, flag as unstructured
low confidenceconfidence < 5 in output contractweight down in aggregation
status: failedexplicit failure in contractexclude from synthesis, report
partial resultsstatus: partial in contractinclude with caveat

anti-patterns

patternproblemfix
same prompt to alldefeats purpose, use pair groupdifferent template per session
modifying codeviolates read-onlyuse pair delegate for changes
skipping output contractcan't aggregatealways include contract in prompt
sequential spawningslow, wastes parallelismspawn all then collect
ignoring low-confidencemissing nuanced signalsinclude with weight, don't discard
too many sessionsresource wastecap at 6, prioritize templates
no trace correlationinvisible in trailsalways use agents report

composition with other skills

fanout → pair

1. fanout: multi-perspective analysis
2. synthesize findings
3. pair consult: validate synthesis with human or senior model
4. pair delegate: implement selected recommendations

ask-deep → fanout

1. ask-deep: clarify scope and priorities
2. fanout: deep analysis from multiple angles
3. synthesize: present findings
4. ask-deep review: validate findings with user

fanout → loop

1. fanout: landscape analysis before work
2. synthesize: prioritized action items
3. loop: autonomous implementation with findings as context

template summaries

templatelineskey sectionswhen to use
gap-analysis66explore current state → identify expected capabilities → surface gaps → prioritize by impactbefore adding features; comparing to mature projects
pattern-extraction68explore codebase → identify coding patterns → identify architectural patterns → document eachpre-refactor; understanding conventions
friction-analysis69explore workflow → identify friction categories (setup/build/test/debug/deploy/cognitive) → assess severityimproving DX; reducing development time
synergy-mapping68identify components → map current integrations → find missing connections → assess synergy valueintegration planning; finding opportunities
platform-audit67inventory tools → audit utilization → identify underused capabilities → compare to best practicestool review; capability discovery
meta-analysis70examine approach → identify assumptions → surface blind spots → recommend improvementscontinuous improvement; retrospectives

all templates include: <role>, <context>, <task>, <constraints> (READ-ONLY), and <output_contract> (JSON)

reference summaries

referencelineskey content
aggregation.md309theme extraction algorithms, contradiction surfacing logic, confidence-weighted synthesis, tie-breaking rules
failure-modes.md376timeout handling, parse errors, low confidence, partial results, session failures, recovery strategies
prompt-design.md229output contract structure, variable substitution, constraint patterns, effective role definitions

tool integration

toolcommandpurpose
agentsagents session start --await --parent, agents reportparallel session spawning, trace correlation
copilot(via agents session)analysis sessions
jqjq -c 'select(.await.status == "completed")'JSON parsing and filtering
layerlayer . --format=jsonarchitecture analysis in prompts
outlineoutline --callers, outline --unusedcode structure analysis in prompts
trailsagents report (unified)fanout history persistence

trails integration

fanout uses agents report which handles trails internally:

# Start fanout trace
export AGENTS_TRACE_ID=$(agents report start "fanout: $TARGET" --agent claude --json -q | jq -r '.traceId')

# Progress updates
agents report progress "4/6 analyses complete" --confidence 7

# Complete with synthesis (gist for permanent artifact)
agents report complete "fanout: $COUNT perspectives, $RECS recommendations" --confidence 9 --gist

# Query fanout history
trails trail replay --format json | jq '.[] | select(.task | contains("fanout"))'

trails enables:

  • tracking analysis patterns over time
  • measuring session success/timeout rates
  • correlating fanout findings with implementation outcomes

tooling requirements

toolrequiredpurposefallback
agents CLIyessession spawning with --await, trace correlationnone (core to fanout)
jqyesJSON parsing and filteringnone (install with brew install jq)
openssloptionalrandom ID generationuse date +%s or uuidgen
layerrecommendedarchitecture analysis in promptsfind . -name "package.json"
outlinerecommendedcode structure analysis in promptsgrep -rn "export"

references

スコア

総合スコア

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

レビュー

💬

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