
Deep Research
- 24 installs
- 2 repo stars
- Updated August 1, 2026
- mhagrelius/dotfiles
Helps with ai & agent building tasks.
About
deep-research is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- deep-research
- AI & Agent Building
- AI-coding skill
Deep Research by the numbers
- 24 all-time installs (skills.sh)
- Ranked #9,876 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mhagrelius/dotfiles --skill deep-researchAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 24 |
|---|---|
| repo stars | ★ 2 |
| Last updated | August 1, 2026 |
| Repository | mhagrelius/dotfiles ↗ |
What it does
Helps with ai & agent building tasks.
Files
Deep Research
Autonomous multi-agent research system. Dispatches parallel sub-agents, stores findings to files, synthesizes into briefs or reports.
Core principle: Planning → Parallel research agents → File-based findings → Synthesis = high quality research with minimal context usage.
When to Use
digraph when_to_use {
"User requests research?" [shape=diamond];
"Quick factual lookup?" [shape=diamond];
"Use single search tool directly" [shape=box];
"Multiple sources or synthesis needed?" [shape=diamond];
"deep-research" [shape=box];
"User requests research?" -> "Quick factual lookup?" [label="yes"];
"Quick factual lookup?" -> "Use single search tool directly" [label="yes"];
"Quick factual lookup?" -> "Multiple sources or synthesis needed?" [label="no"];
"Multiple sources or synthesis needed?" -> "deep-research" [label="yes"];
}Use for: Technical research, domain knowledge, market analysis, architectural patterns, comparing approaches, learning complex topics
Don't use for: Single fact lookups, specific URL fetches, questions answerable in one search
The Process
digraph process {
rankdir=TB;
"Create research directory in scratchpad" -> "Dispatch Query Analyzer agent";
"Dispatch Query Analyzer agent" -> "Analyzer writes research-plan.md";
"Analyzer writes research-plan.md" -> "Read plan, dispatch N Research agents IN PARALLEL";
"Read plan, dispatch N Research agents IN PARALLEL" -> "Each agent writes findings-{thread}.md";
"Each agent writes findings-{thread}.md" -> "Wait for all agents";
"Wait for all agents" -> "Dispatch Synthesizer agent";
"Dispatch Synthesizer agent" -> "Synthesizer reads all findings, writes final-output.md";
"Synthesizer reads all findings, writes final-output.md" -> "Read final output, present summary to user";
}Quick Reference
Phase 1: Planning (Query Analyzer Agent)
Uses ./query-analyzer-prompt.md. Writes research-plan.md containing:
- Query type: technical | domain | hybrid
- Complexity: simple (2-3 agents) | moderate (3-4) | complex (5-6)
- Research threads with source recommendations
- Output format recommendation: brief | report
Phase 2: Parallel Research
Uses ./research-agent-prompt.md. Each agent: 1. Invokes exa-search skill for source strategy 2. Executes searches (Exa-primary, see Source Selection below) 3. Writes findings-{thread-name}.md
Source Selection:
| Query Signal | Primary Source |
|---|---|
| Code, APIs, libraries | mcp__exa__get_code_context_exa |
| Concepts, analysis, opinions | mcp__exa__web_search_exa |
| Video explanations needed | yt-transcribe skill |
| Very recent news (< 1 week) | WebSearch fallback |
Phase 3: Synthesis
Uses ./synthesizer-prompt.md. Reads all findings files, writes final-output.md:
- Actionable Brief (~300 words): Simple query + clear consensus
- Structured Report (~1500 words): Complex query or conflicting findings
Agent Dispatch Methods
For complex queries (4+ threads): Use Task tool with subagent_type: "general-purpose" for true sub-agent isolation. Dispatch all research agents in a single message (parallel Task calls).
For simpler queries (2-3 threads): Parallel tool calls within same context is acceptable - make all searches simultaneously, then write findings files.
Either way: research threads must execute in parallel, not sequentially.
File Structure
{scratchpad}/deep-research-{timestamp}/
├── research-plan.md
├── findings-*.md
└── final-output.mdCommon Mistakes
| Mistake | Fix |
|---|---|
| Doing research yourself instead of dispatching agents | Always use the three-phase architecture |
| Keeping findings in context instead of files | Each agent MUST write to files |
| Sequential research agents | Dispatch all research agents in PARALLEL |
| Skipping planning phase | Always run Query Analyzer first |
| Using WebSearch as default | Exa is primary; WebSearch only for very recent news |
Red Flags - STOP
- "I'll just do a quick search myself" → Use the full process
- "I don't need to write files for this" → Files are mandatory
- "I'll research these topics one at a time" → Parallel dispatch
- "This is simple, I'll skip planning" → Always plan first
Deep Research Skill - Design Document
Created: 2026-01-10
Overview
A fully autonomous multi-agent research system that analyzes queries, dispatches parallel research agents, stores findings to files, and synthesizes results into actionable briefs or structured reports.
Requirements
Use Cases
- Technical research - Libraries, APIs, architectural patterns, debugging
- Domain knowledge - Topics, market research, competitive analysis
- Hybrid - Technical implementation of domain concepts
Output Format
- Flexible between structured reports and actionable briefs
- Determined automatically based on query complexity and findings
Depth Control
- Fully autonomous - agent makes all depth decisions
- No user checkpoints during research
Source Strategy
- Exa-primary - Default to semantic search over standard web search
- Source-adaptive - Agent determines best sources based on query type
- Use exa-search skill to guide source selection
Parallelism
- Query-dependent scaling
- Simple queries: 2-3 agents
- Complex queries: 5-6 agents
Architecture
Three-Phase Design
PHASE 1: PLANNING
┌─────────────────────────────────────────────────────────────────┐
│ Query Analyzer Agent │
│ - Classify query type (technical/domain/hybrid) │
│ - Assess complexity → determine agent count │
│ - Decompose into research threads │
│ - Output: research-plan.md │
└─────────────────────────────────────────────────────────────────┘
│
▼
PHASE 2: PARALLEL RESEARCH
┌─────────────────────────────────────────────────────────────────┐
│ Research Agents (2-6 in parallel) │
│ - Each assigned specific thread │
│ - Use exa-search skill for source strategy │
│ - Write findings to findings-{thread}.md │
│ - Operate independently, no cross-communication │
└─────────────────────────────────────────────────────────────────┘
│
▼
PHASE 3: SYNTHESIS
┌─────────────────────────────────────────────────────────────────┐
│ Synthesizer Agent │
│ - Reads all findings files │
│ - Resolves conflicts, identifies gaps │
│ - Determines output format (brief vs report) │
│ - Writes final-output.md │
└─────────────────────────────────────────────────────────────────┘Query Classification
| Query Type | Signals | Primary Sources |
|---|---|---|
| Technical | APIs, libraries, code, architecture | mcp__exa__get_code_context_exa |
| Domain | Market, trends, concepts, comparisons | mcp__exa__web_search_exa, yt-transcribe |
| Hybrid | Technical implementation of domain concept | Both |
Complexity → Agent Count
| Complexity | Indicators | Agents |
|---|---|---|
| Simple | Single concept, narrow scope | 2-3 |
| Moderate | Multiple related concepts | 3-4 |
| Complex | Multi-faceted, cross-domain | 5-6 |
Source Selection Logic
| Signal | Source |
|---|---|
| Code patterns, API usage, library docs | mcp__exa__get_code_context_exa |
| Conceptual understanding | mcp__exa__web_search_exa |
| Expert opinions, analysis | mcp__exa__web_search_exa (blogs, articles) |
| Video tutorials, talks | yt-transcribe when written sources insufficient |
| Very recent events (< 1 week) | WebSearch fallback |
| Specific known URL | WebFetch |
Output Format Decision
| Condition | Format |
|---|---|
| Simple query + clear consensus | Actionable Brief (~200-500 words) |
| Complex query OR conflicts OR multi-faceted | Structured Report (~1000-3000 words) |
File Structure
{scratchpad}/deep-research-{timestamp}/
├── research-plan.md
├── findings-thread-1.md
├── findings-thread-2.md
├── findings-thread-N.md
└── final-output.mdContext Management
- Parent agent never loads raw search results (~90% context savings)
- Each research agent starts fresh (no pollution)
- Synthesizer reads curated findings, not raw data
- Files preserved for debugging/re-synthesis
Integration
| Skill/Tool | Purpose | Used By |
|---|---|---|
exa-search | Source strategy guidance | Research Agents |
mcp__exa__web_search_exa | Semantic web search (default) | Research Agents |
mcp__exa__get_code_context_exa | Technical/code queries | Research Agents |
yt-transcribe | Video content extraction | Research Agents |
WebSearch | Recent news fallback | Research Agents |
WebFetch | Known URLs | Research Agents |
Error Handling
- Research agent fails → note gap, continue with others
- Synthesizer finds critical gaps → flag in output, don't block
- All findings preserved in files
Query Analyzer Agent Prompt
You are analyzing a research query to create a research plan. Your output will guide parallel research agents.
Your Task
Analyze this research query and write a research plan to {research_dir}/research-plan.md.
Query: {query}
Analysis Steps
1. Classify query type:
technical- APIs, libraries, code patterns, architecture, debuggingdomain- Market trends, concepts, comparisons, "what is X"hybrid- Technical implementation of domain concepts
2. Assess complexity:
simple(2-3 agents) - Single concept, narrow scope, one domainmoderate(3-4 agents) - Multiple related concepts, some comparison neededcomplex(5-6 agents) - Multi-faceted, cross-domain, requires diverse sources
3. Decompose into research threads:
- Each thread should be independent (no dependencies between threads)
- Each thread gets one research agent
- Assign primary sources based on thread content
4. Recommend output format:
brief- If query is focused and likely has clear consensusreport- If query is broad, multi-faceted, or likely has conflicting views
Source Recommendations
| Thread Focus | Recommend |
|---|---|
| Code examples, API usage, library docs | mcp__exa__get_code_context_exa |
| Concepts, best practices, expert opinions | mcp__exa__web_search_exa |
| Tutorials, visual explanations | yt-transcribe if written sources insufficient |
| Very recent developments (< 1 week) | WebSearch |
Output Format
Write to {research_dir}/research-plan.md:
# Research Plan: [Brief query summary]
## Classification
- **Type:** technical | domain | hybrid
- **Complexity:** simple | moderate | complex
- **Agent Count:** [2-6]
- **Output Format:** brief | report
## Research Threads
### Thread 1: [Name]
- **Focus:** [What this thread investigates]
- **Primary Source:** [tool recommendation]
- **Key Questions:**
- [Specific question 1]
- [Specific question 2]
### Thread 2: [Name]
...
## Success Criteria
[What would make this research complete and useful]Constraints
- Do NOT conduct research yourself - only plan
- Do NOT recommend more than 6 threads
- Each thread must be independently researchable
- Write the plan file, then return a brief summary
Research Agent Prompt
You are a research agent assigned to investigate one specific thread. Write your findings to a file.
Your Assignment
Thread: {thread_name} Focus: {thread_focus} Primary Source: {primary_source} Key Questions: {key_questions}
Output File: {research_dir}/findings-{thread_slug}.md
Research Process
1. Invoke exa-search skill to confirm source strategy for your thread 2. Execute searches using your assigned primary source tool 3. Go deeper if initial results are insufficient - follow promising leads 4. Write findings to your output file
Source Tools Available
mcp__exa__web_search_exa- Semantic web search (concepts, opinions, analysis)mcp__exa__get_code_context_exa- Code patterns, API docs, library usageyt-transcribeskill - Video content when written sources insufficientWebSearch- Very recent news only (< 1 week old)WebFetch- Specific known URLs
Default to Exa tools. Only use WebSearch for very recent events.
Depth Decisions
You decide when you have enough:
- Initial search yields clear, comprehensive answers → Move to writing
- Results are thin or conflicting → Execute follow-up searches
- Found promising subtopic → Investigate deeper
- Hitting diminishing returns → Stop and document gaps
Output Format
Write to your findings file:
# Findings: {thread_name}
## Summary
[2-3 sentence executive summary of key discoveries]
## Key Findings
### [Finding 1 Title]
[Detailed finding with specifics]
- Source: [URL]
### [Finding 2 Title]
...
## Sources Consulted
- [Source 1] - [why it was relevant]
- [Source 2] - [why it was relevant]
## Gaps & Uncertainties
- [What couldn't be determined]
- [Conflicting information encountered]
## Suggested Follow-ups
- [If synthesizer needs more on X, recommend searching Y]Constraints
- Write ALL findings to your file - do not return them in your response
- Do NOT coordinate with other research agents
- Do NOT read other findings files
- Focus only on your assigned thread
- Return a brief confirmation when done (e.g., "Completed findings for {thread_name}, written to {file}")
Synthesizer Agent Prompt
You are synthesizing research findings from multiple agents into a final output.
Your Task
1. Read the research plan: {research_dir}/research-plan.md 2. Read all findings files: {research_dir}/findings-*.md 3. Synthesize into final output: {research_dir}/final-output.md
Synthesis Process
1. Read all inputs - research plan and every findings file 2. Identify themes - What patterns emerge across findings? 3. Resolve conflicts - Where sources disagree, note the disagreement 4. Find gaps - What questions remain unanswered? 5. Determine format - Brief or report based on complexity and findings 6. Write output - Synthesize into cohesive final document
Format Decision
| Condition | Format |
|---|---|
| Simple query + clear consensus across findings | Actionable Brief |
| Complex query OR conflicting findings OR multi-faceted answer | Structured Report |
Actionable Brief Format (~200-500 words)
# [Query Topic] - Research Brief
## Bottom Line
[1-2 sentence direct answer to the research question]
## Key Points
- [Most important finding 1]
- [Most important finding 2]
- [Most important finding 3]
## Recommendations
1. [Specific actionable recommendation]
2. [Specific actionable recommendation]
## Limitations
[What this research didn't cover or couldn't determine]
## Key Sources
- [Most authoritative source 1]
- [Most authoritative source 2]Structured Report Format (~1000-3000 words)
# [Query Topic] - Research Report
## Executive Summary
[3-5 sentence overview of findings and conclusions]
## Background
[Context needed to understand the findings]
## Findings
### [Topic Area 1]
[Synthesized findings with citations]
### [Topic Area 2]
[Synthesized findings with citations]
## Analysis
[Cross-cutting insights, comparisons, implications]
## Recommendations
[If applicable - actionable next steps]
## Limitations & Gaps
[What couldn't be determined, conflicting information]
## Sources
[Consolidated list from all findings files with relevance notes]Handling Conflicts
When findings conflict:
- Note both perspectives
- Identify which sources are more authoritative
- Explain the disagreement rather than hiding it
- Make a recommendation if one view is better supported
Constraints
- Read ALL findings files - don't skip any
- Write output to file - do not return full content in response
- Cite sources from findings files
- Flag critical gaps prominently
- Return brief summary when done (e.g., "Synthesis complete. Format: [brief|report]. Key findings: [1-2 sentences]")