Skip to content

Commit 1de1c19

Browse files
committed
feat: Add web-search skill
1 parent cb20bda commit 1de1c19

1 file changed

Lines changed: 123 additions & 0 deletions

File tree

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
______________________________________________________________________
2+
3+
## name: web-research description: Use this skill for requests related to web research; it provides a structured approach to conducting comprehensive web research
4+
5+
# Web Research Skill
6+
7+
This skill provides a structured approach to conducting comprehensive web research using the `task` tool to spawn
8+
research subagents. It emphasizes planning, efficient delegation, and systematic synthesis of findings.
9+
10+
## Output Directory Configuration
11+
12+
**Default Output Directory**: `{project_root}/docs/research/[topic_name]/`
13+
14+
The output directory is **project-specific**. Check the project's `CLAUDE.md` for a custom research output path. If no custom path is specified, use the default: `{project_root}/docs/research/[topic_name]/`
15+
16+
All research artifacts (plans, findings, reports) should be placed in this directory to maintain consistency with the project's documentation structure.
17+
18+
## When to Use This Skill
19+
20+
Use this skill when you need to:
21+
22+
- Research complex topics requiring multiple information sources
23+
- Gather and synthesize current information from the web
24+
- Conduct comparative analysis across multiple subjects
25+
- Produce well-sourced research reports with clear citations
26+
27+
## Research Process
28+
29+
### Step 1: Create and Save Research Plan
30+
31+
Before delegating to subagents, you MUST:
32+
33+
1. **Create a research folder** - Organize all research files in the project's research directory:
34+
35+
```
36+
mkdir -p docs/research/[topic_name]
37+
```
38+
39+
This keeps files organized within the project's documentation structure.
40+
41+
1. **Analyze the research question** - Break it down into distinct, non-overlapping subtopics
42+
43+
1. **Write a research plan file** - Use the `write_file` tool to create `docs/research/[topic_name]/research_plan.md`
44+
containing:
45+
46+
- The main research question
47+
- 2-5 specific subtopics to investigate
48+
- Expected information from each subtopic
49+
- How results will be synthesized
50+
51+
**Planning Guidelines:**
52+
53+
- **Simple fact-finding**: 1-2 subtopics
54+
- **Comparative analysis**: 1 subtopic per comparison element (max 3)
55+
- **Complex investigations**: 3-5 subtopics
56+
57+
### Step 2: Delegate to Research Subagents
58+
59+
For each subtopic in your plan:
60+
61+
1. **Use the `task` tool** to spawn a research subagent with:
62+
63+
- Clear, specific research question (no acronyms)
64+
- Instructions to write findings to a file: `docs/research/[topic_name]/findings_[subtopic].md`
65+
- Budget: 3-5 web searches maximum
66+
67+
2. **Run up to 3 subagents in parallel** for efficient research
68+
69+
**Subagent Instructions Template:**
70+
71+
```
72+
Research [SPECIFIC TOPIC]. Use the web_search tool to gather information.
73+
After completing your research, use write_file to save your findings to docs/research/[topic_name]/findings_[subtopic].md.
74+
Include key facts, relevant quotes, and source URLs.
75+
Use 3-5 web searches maximum.
76+
```
77+
78+
### Step 3: Synthesize Findings
79+
80+
After all subagents complete:
81+
82+
1. **Review the findings files** that were saved locally:
83+
84+
- First run `list_files docs/research/[topic_name]` to see what files were created
85+
- Then use `read_file` with the **file paths** (e.g., `docs/research/[topic_name]/findings_*.md`)
86+
- **Important**: Use `read_file` for LOCAL files only, not URLs
87+
88+
2. **Synthesize the information** - Create a comprehensive response that:
89+
90+
- Directly answers the original question
91+
- Integrates insights from all subtopics
92+
- Cites specific sources with URLs (from the findings files)
93+
- Identifies any gaps or limitations
94+
95+
3. **Write final report** (optional) - Use `write_file` to create `docs/research/[topic_name]/research_report.md` if
96+
requested
97+
98+
**Note**: If you need to fetch additional information from URLs, use the `fetch_url` tool, not `read_file`.
99+
100+
## Available Tools
101+
102+
You have access to:
103+
104+
- **write_file**: Save research plans and findings to local files
105+
- **read_file**: Read local files (e.g., findings saved by subagents)
106+
- **list_files**: See what local files exist in a directory
107+
- **fetch_url**: Fetch content from URLs and convert to markdown (use this for web pages, not read_file)
108+
- **task**: Spawn research subagents with web_search access
109+
110+
## Research Subagent Configuration
111+
112+
Each subagent you spawn will have access to:
113+
114+
- **web_search**: Search the web using Tavily (parameters: query, max_results, topic, include_raw_content)
115+
- **write_file**: Save their findings to the filesystem
116+
117+
## Best Practices
118+
119+
- **Plan before delegating** - Always write research_plan.md first
120+
- **Clear subtopics** - Ensure each subagent has distinct, non-overlapping scope
121+
- **File-based communication** - Have subagents save findings to files, not return them directly
122+
- **Systematic synthesis** - Read all findings files before creating final response
123+
- **Stop appropriately** - Don't over-research; 3-5 searches per subtopic is usually sufficient

0 commit comments

Comments
 (0)