Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill should be used when the user requests comprehensive research, deep investigation, or detailed academic-style reports on any topic. Trigger phrases include "deep research", "comprehensive investigation", "detailed report", "academic research", or requests for thorough analysis of complex subjects. The skill produces multi-thousand word reports in markdown format with extensive citations.
.claude/skills/leoyeai-deep-research/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-16 | ✗→✓ | ▲ Improved | 824% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 394% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 391% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 268% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 168% | 0% |
把"深度调研"当作一个可复用、可并行的生产流程来执行:主控负责澄清目标、拆解子目标、调度子进程、聚合与精修;子进程负责采集/抽取/局部分析并输出结构化 Markdown 素材;最终交付物必须是独立成品文件而不是聊天贴文。
关键约束(必须遵守)
--allowedTools 控制可用工具;仅在必要时启用网络等权限。firecrawl,其次 exa;确实无法满足时再考虑 WebFetch/WebSearch。claude -p 子进程;<3 个子目标时可由主进程直接执行,但仍需记录完整目录结构和原始数据。claude -p 子进程,并为其分配合适权限(通过 --allowedTools 参数)。.research/<name>/aggregated_raw.md),在成品中仅吸收关键洞察/证据。1) 检查是否真的是"分章节、多轮整合"产出;若只是一次性生成,退回按章节重写。 2) 评估是否足够细致;若偏单薄,先判断是"子任务素材不足"还是"统稿时压缩过度":前者驱动补充/追加调研,后者在既有素材上继续扩展润色,直至达到详细标准。
根据子目标数量选择执行路径:
| 规模 | 子目标数 | 执行方式 | 目录要求 | |------|----------|----------|----------| | 微型 | 1-2 | 主进程直接执行 | 仍需 raw/、logs/、final_report.md | | 小型 | 3-5 | 启动子进程,串行或少量并行 | 完整目录结构 | | 中型 | 6-15 | 并行子进程(默认 8 并发) | 完整目录结构 + 调度脚本 | | 大型 | >15 | GNU Parallel + 分批调度 | 完整目录结构 + 多阶段调度 |
注意:即使是微型任务,也必须:
raw/ 目录logs/dispatcher.logfirecrawl,其次 exa;若都不可用,记录原因并选择替代方案(必要时再降级到 WebFetch/WebSearch)。name(建议:<YYYYMMDD>-<短题>-<随机后缀>,全小写、短横线分隔、无空格)。.research/<name>/,并把所有产物都保存到该目录下(子目录如 prompts/、logs/、child_outputs/、raw/、cache/、tmp/)。.research/<name>/run_children.sh),要求:claude -p 调用,推荐要点:claude -p "prompt" --allowedTools "Read,Write,Edit,Bash,WebFetch,WebSearch,mcp__firecrawl__*"(以 claude --help 为准)。firecrawl,其次 exa;确实没办法才用 WebFetch/WebSearch;不使用 plan 工具与"人工交互等待"。.research/<name>/child_outputs/<id>.md)。bash timeout 600 claude -p "$(cat "$prompt_file")" \ --allowedTools "Read,Write,Edit,Bash,Glob,Grep,WebFetch,WebSearch,mcp__firecrawl__firecrawl_scrape,mcp__firecrawl__firecrawl_search" \ --output-format json \ > "$output_file" 2>&1
--allowedTools 中追加对应工具名。timeout 300),较大任务可放宽到最多 15 分钟(timeout 900),通过外部 timeout 命令兜底。首次命中 5 分钟超时时,结合任务实际判断是否拆分/改参数再重试;15 分钟仍未完成则视为 prompt 或流程需要排查。xargs/GNU Parallel,但必须先用小规模验证参数展开。默认并行 8 个,可按硬件或配额调整。stdbuf -oL -eL claude -p … 2>&1 | tee .research/<name>/logs/<id>.log 等方式保证实时刷新,便于 tail -f 观察进度。firecrawl → exa)→ WebFetch/WebSearch。printf/逐行写入注入变量,避免 Bash 3.2 在多字节字符场景下 cat <<EOF 截断变量的已知问题。.research/<name>/child_prompt_template.md)以便审计与复用。cat .research/<name>/prompts/<id>.md),确认变量替换正确、指令完整后再派发任务。tail -f .research/<name>/logs/<id>.log 追踪实时输出。.research/<name>/aggregate.py)读取 .research/<name>/child_outputs/ 下所有 Markdown,按预设顺序聚合为初版主文档(例如 .research/<name>/final_report.md)。.research/<name>/final_report.md 与关键子输出。.research/<name>/polish_outline.md),明确目标受众、章节顺序与每章核心论点。.research/<name>/polished_report.md),按大纲逐章撰写;每写完一章立刻自查事实、引用与语言要求,必要时回溯子稿核实。.research/<name>/);通过提供文件路径与必要摘要向用户回报,禁止在聊天中贴出完整成稿。.research/<name>/,避免覆盖旧文件。.research/<name>/raw/ 等缓存目录,后续处理优先读取本地缓存以减少重复请求。.research/<name>/tmp/、.research/<name>/raw/、.research/<name>/cache/ 等子目录,必要时在流程结束后按需清理。firecrawl,其次 exa;缺少 MCP 时再退回 WebFetch/WebSearch。bash# 基本非交互调用 claude -p "Your prompt here" # 指定允许的工具(无需人工确认) claude -p "Your prompt" --allowedTools "Read,Write,Edit,Bash" # JSON 格式输出(便于脚本解析) claude -p "Your prompt" --output-format json # 流式 JSON 输出 claude -p "Your prompt" --output-format stream-json # 继续上一次对话 claude -p "Follow up question" --continue # 继续指定会话 claude -p "Follow up" --resume <session_id>
bash#!/bin/bash # 子进程调度示例 prompt_file="$1" output_file="$2" log_file="$3" # 读取 prompt 并执行 timeout 600 claude -p "$(cat "$prompt_file")" \ --allowedTools "Read,Write,Edit,Bash,Glob,Grep,WebFetch,WebSearch,mcp__firecrawl__firecrawl_scrape,mcp__firecrawl__firecrawl_search,mcp__firecrawl__firecrawl_map" \ --output-format json \ 2>&1 | tee "$log_file" > "$output_file" exit_code=${PIPESTATUS[0]} echo "Exit code: $exit_code" >> "$log_file"
bash#!/bin/bash # 并行执行多个子任务 max_parallel=8 research_dir=".research/$name" # 使用 GNU Parallel(推荐) cat "$research_dir/tasks.txt" | parallel -j $max_parallel \ "timeout 600 claude -p \"\$(cat $research_dir/prompts/{}.md)\" \ --allowedTools 'Read,Write,Edit,Bash,WebFetch,WebSearch' \ --output-format json > $research_dir/child_outputs/{}.json 2>&1" # 或使用后台任务 for task_id in $(cat "$research_dir/task_ids.txt"); do ( timeout 600 claude -p "$(cat "$research_dir/prompts/$task_id.md")" \ --allowedTools "Read,Write,Edit,Bash,WebFetch,WebSearch" \ --output-format json \ > "$research_dir/child_outputs/$task_id.json" 2>&1 ) & # 控制并行数量 while [ $(jobs -r | wc -l) -ge $max_parallel ]; do sleep 1 done done wait # 等待所有后台任务完成
realpath/test -d 等确认关键路径(如 venv、资源目录)存在;必要时用 dirname "$0" 推导仓库根路径并通过参数传入,避免硬编码。.research/<name>/dispatcher.log;子任务单独写 .research/<name>/logs/<id>.log,失败时直接 tail 对应日志定位 MCP/调用细节。failed_ids 列表并在收尾阶段统一提示后续建议。.research/<name>/child_outputs/<id>.md 是否已合法存在;存在则跳过,减少配额消耗与重复访问。[来源](https://example.com)),避免把链接集中到段尾,便于即时查证。先思考再动手:追求有深度、有独立思考、超出预期的洞见(但不要在回答里提到"惊喜");揣摩用户为什么会问这个问题、背后的假设是什么、有没有更本质的问法;同时明确你的答案应满足的成功标准,再围绕标准组织内容。
保持协作:你的目标不是机械执行指令、也不是在信息不足时强行给出确定答案;而是与用户共同推进,逐步逼近更好的问题与更可靠的结论。
写作风格要求:
执行本技能时,在每一步输出清晰的决策与进度日志。
在提交最终报告前,必须核对以下清单:
.research/<name>/ 目录已创建logs/dispatcher.log 包含完整执行记录(非事后补写)raw/ 目录包含原始搜索/抓取结果prompts/、child_outputs/ 目录存在且有内容claude -p 子进程如有以下情况,应在报告中明确说明:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 8,561 | 10,686 | +25% | 1 | 1 | 0% | 713 | 6,029 | +746% | 0 | 0 | — |
case-16 | fail→pass | 3,931 | 3,721 | -5% | 1 | 1 | 0% | 624 | 5,767 | +824% | 0 | 0 | — |
case-02 | pass→fail | 12,649 | 10,005 | -21% | 1 | 1 | 0% | 2,531 | 6,219 | +146% | 0 | 0 | — |
case-03 | fail→fail | 7,834 | 3,977 | -49% | 1 | 1 | 0% | 764 | 5,793 | +658% | 0 | 0 | — |
case-04 | pass→fail | 3,610 | 6,103 | +69% | 1 | 1 | 0% | 844 | 6,332 | +650% | 0 | 0 | — |
case-05 | pass→pass | 13,471 | 14,127 | +5% | 1 | 1 | 0% | 2,876 | 8,278 | +188% | 0 | 0 | — |
case-06 | pass→fail | 4,423 | 6,628 | +50% | 1 | 1 | 0% | 806 | 5,992 | +643% | 0 | 0 | — |
case-07 | fail→pass | 8,318 | 20,908 | +151% | 1 | 1 | 0% | 1,693 | 8,366 | +394% | 0 | 0 | — |
case-08 | fail→pass | 7,580 | 11,083 | +46% | 1 | 1 | 0% | 1,452 | 7,131 | +391% | 0 | 0 | — |
case-09 | fail→pass | 7,762 | 5,180 | -33% | 1 | 1 | 0% | 1,662 | 6,113 | +268% | 0 | 0 | — |
case-10 | fail→pass | 12,653 | 5,988 | -53% | 1 | 1 | 0% | 2,250 | 6,034 | +168% | 0 | 0 | — |
case-11 | fail→pass | 4,708 | 4,036 | -14% | 1 | 1 | 0% | 1,039 | 5,816 | +460% | 0 | 0 | — |
case-12 | fail→fail | 14,616 | 19,061 | +30% | 1 | 1 | 0% | 2,606 | 8,658 | +232% | 0 | 0 | — |
case-13 | pass→pass | 15,591 | 24,853 | +59% | 1 | 1 | 0% | 2,785 | 7,465 | +168% | 0 | 0 | — |
case-14 | fail→pass | 7,079 | 7,521 | +6% | 1 | 1 | 0% | 1,323 | 6,686 | +405% | 0 | 0 | — |
case-15 | pass→pass | 6,729 | 5,655 | -16% | 1 | 1 | 0% | 1,119 | 6,206 | +455% | 0 | 0 | — |
case-17 | fail→pass | 11,910 | 11,331 | -5% | 1 | 1 | 0% | 2,375 | 6,982 | +194% | 0 | 0 | — |
case-18 | fail→pass | 10,641 | 4,217 | -60% | 1 | 1 | 0% | 1,957 | 5,786 | +196% | 0 | 0 | — |
case-19 | fail→pass | 16,014 | 6,034 | -62% | 1 | 1 | 0% | 1,047 | 6,251 | +497% | 0 | 0 | — |
case-20 | fail→pass | 9,741 | 4,305 | -56% | 1 | 1 | 0% | 1,688 | 5,820 | +245% | 0 | 0 | — |
case-21 | fail→fail | 10,303 | 7,545 | -27% | 1 | 1 | 0% | 1,880 | 6,545 | +248% | 0 | 0 | — |
case-22 | fail→pass | 12,095 | 4,669 | -61% | 1 | 1 | 0% | 2,232 | 5,815 | +161% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +41 percentage points is the difference between those two pass rates over the 19 comparable cases. 4 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.