skills/rabbit-hole/SKILL.md
Multi-agent investigation pipeline for deep research questions. Use when a question requires searching across multiple sources (codebase, web, docs, academic), synthesizing findings, and validating citations. Triggered by: "rabbit hole [topic]", "deep dive into [topic]", or any complex research question where a single search would be insufficient. Readonly — never modifies files. Always cites sources. Always validates citations.
npx skillsauth add synapseradio/ai-skills rabbit-holeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fan-out-in investigation pipeline. Separates territory-mapping (cheap, fast) from deep investigation (expensive, thorough). Forms a tree of inquiry — each node is a path of inquiry and its results.
Readonly. Always cites. Always validates.
START
│
▼
TRIAGE ──── simple? ──── QUICK_ANSWER ──── END
│
complex
│
▼
SCOUT (Wave 1: haiku, 1 agent)
│ → ranked leads
│
├── ≤2 obvious leads? ──── read directly, synthesize inline ──── REPORT
│
▼
INVESTIGATE (Wave 2: inherited model, 1-3 parallel agents)
│ → findings per branch
│
▼
VALIDATE & SYNTHESIZE (Wave 3: inherited model, 1 agent)
│ → validated findings + synthesis
│
▼
REPORT ──── user decides: done | go deeper on branch X
One user interrupt: at REPORT. Everything else is automatic.
You are the orchestrator. Follow this protocol exactly.
Evaluate the user's question:
If proceeding, tell the user:
Entering rabbit hole: [topic]
Scouting for leads...
Launch one Task agent with these parameters:
subagent_type: Exploremodel: haikudescription: Scout leads for: [topic]Scout agent prompt template:
You are a research scout. Your ONLY job is to find WHERE relevant information lives — not to analyze it.
QUESTION: [user's question]
Search for leads using all available tools: Grep, Glob, Read, WebSearch, exa.
Cast a wide net. Check:
- Local codebase (if question is about code)
- Official documentation
- Web sources
- Academic sources (if applicable)
Return a JSON array of leads, ranked by likely relevance (most relevant first):
```json
[
{
"source_type": "local_file | official_docs | web_article | academic | api_docs | community",
"path_or_url": "exact path or URL",
"relevance_reason": "1 sentence on why this lead matters",
"confidence": "high | medium | low"
}
]
Rules:
**After Scout returns**, evaluate the leads:
- **≤2 high-confidence leads**: Read them yourself, synthesize inline, skip to REPORT.
- **3+ leads**: Cluster by topic, proceed to INVESTIGATE.
### Phase 2: INVESTIGATE (Wave 2)
Cluster the scout's leads by topic/theme (2-4 clusters). Launch **1-3 parallel** Task agents:
- `subagent_type`: `general-purpose`
- `model`: inherited (do not specify — uses conversation model)
- `description`: `Investigate: [cluster topic]`
**Investigator agent prompt template:**
You are a research investigator. Thoroughly examine the sources assigned to you and extract findings relevant to the original question.
ORIGINAL QUESTION: [user's question]
YOUR ASSIGNED LEADS: [paste the lead cluster as JSON]
For each lead:
Return your findings as JSON:
{
"branch": "[cluster topic name]",
"findings": [
{
"claim": "What was found",
"evidence": "Key quote or data point supporting the claim",
"source": "Exact file:line or URL",
"source_type": "local_file | official_docs | web_article | academic | api_docs | community",
"confidence": "high | medium | low"
}
],
"depth_potential": "What remains unexplored in this branch, if anything"
}
Rules:
Launch investigator agents **in parallel** using multiple Task tool calls in a single message.
### Phase 3: VALIDATE & SYNTHESIZE (Wave 3)
After all investigators return, launch **one** Task agent:
- `subagent_type`: `general-purpose`
- `model`: inherited
- `description`: `Validate and synthesize findings`
**Validator-Synthesizer agent prompt template:**
You are a research validator and synthesizer. Your job is to verify citations, rank sources, and produce a coherent synthesis.
ORIGINAL QUESTION: [user's question]
INVESTIGATOR FINDINGS: [paste all investigator outputs as JSON]
Run the validation script on all cited sources. Construct a JSON array of all sources:
[
{ "type": "file", "path_or_url": "/path/to/file", "claim": "what was claimed" },
{ "type": "url", "path_or_url": "https://...", "claim": "what was claimed" }
]
Then run:
echo '<the JSON array>' | python3 [SKILL_DIR]/scripts/validate_sources.py
Mark each source as ✓ (valid), ? (unverified/timeout), or ✗ (broken/not_found).
Read the file: [SKILL_DIR]/references/research-hierarchy.md
Apply the tier definitions and confidence mapping to each finding.
Produce a synthesis with these sections:
Return your output as structured markdown following this format:
For each finding across all branches:
[What agrees across branches]
[Conflicts with trust context from hierarchy]
[What's missing or weakly supported]
[Assessment of completeness. What going deeper on specific branches would yield.]
**IMPORTANT**: Replace `[SKILL_DIR]` in the prompt with the actual skill directory path: the directory containing this SKILL.md file. To find it, the path is wherever this skill is installed. Use the Read tool to check: it will be something like `~/.claude/skills/rabbit-hole`.
### Phase 4: REPORT
Format the validator's output into the final report format (see Output Format below). Present to the user.
After presenting the report, offer:
What would you like to do?
## Go Deeper Protocol
When the user asks to go deeper on a branch:
1. Reformulate the question: original question + branch context + "what remains unexplored" from the report
2. Re-enter the pipeline at SCOUT with this refined question
3. The scout should focus specifically on the unexplored areas identified
4. Continue through INVESTIGATE → VALIDATE → REPORT as normal
## Output Format
```markdown
## Rabbit Hole: [topic]
### Tree
#### Branch: [topic]
- **Finding**: [claim]
- **Confidence**: high|medium|low
- **Sources**: [✓ path/URL] [? unverified] [✗ broken]
- **Finding**: [next claim]
- ...
- **Go deeper?**: [what remains unexplored]
#### Branch: [next topic]
- ...
### Synthesis
- **Converges on**: [strongest agreed-upon claims]
- **Conflicts**: [disagreements with source trust context]
- **Gaps**: [what's missing or weakly supported]
### Status
[How close to full understanding. What going deeper would look like.]
Apply at every boundary — do less when less is needed.
scripts/validate_sources.pyDeterministic citation validator. Run by the Validator-Synthesizer agent.
[{ "type": "file"|"url", "path_or_url": "...", "claim": "..." }][{ "source": "...", "status": "valid"|"broken"|"redirect"|"timeout"|"not_found", "details": "..." }]references/research-hierarchy.mdSource ranking rules loaded by the Validator-Synthesizer before synthesis. Contains tier definitions, conflict resolution rules, and domain-specific guidance.
tools
Open the possibility space through curiosity-driven questioning
tools
Interactive tutoring that adapts to your pace
data-ai
Trace justification chains to bedrock
tools
Follow reasoning step-by-step