research

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Research Skill

调研Skill

API Keys Required

需要配置API密钥

This skill works best with these optional API keys configured in
~/.env
:
FeatureAPI KeyGet It From
Perplexity Research
PERPLEXITY_API_KEY
https://perplexity.ai/settings/api
Gemini Research
GOOGLE_API_KEY
https://aistudio.google.com/app/apikey
Works without API keys:
  • Claude-based research (uses built-in WebSearch)
  • Basic web fetching (uses built-in WebFetch)

~/.env
中配置以下可选API密钥,可使本Skill发挥最佳效果:
功能API密钥获取地址
Perplexity调研
PERPLEXITY_API_KEY
https://perplexity.ai/settings/api
Gemini调研
GOOGLE_API_KEY
https://aistudio.google.com/app/apikey
无需API密钥即可使用的功能:
  • 基于Claude的调研(使用内置WebSearch工具)
  • 基础网页抓取(使用内置WebFetch工具)

Workflow Routing

工作流路由

Multi-Source Research Workflows

多源调研工作流

When user requests comprehensive parallel research: Examples: "do research on X", "research this topic", "find information about Y", "investigate this subject" → READ:
${PAI_DIR}/skills/research/workflows/conduct.md
EXECUTE: Parallel multi-agent research using available researcher agents
When user requests Claude-based research (FREE - no API keys): Examples: "use claude for research", "claude research on X", "use websearch to research Y" → READ:
${PAI_DIR}/skills/research/workflows/claude-research.ts
EXECUTE: Intelligent query decomposition with Claude's WebSearch
When user requests Perplexity research (requires PERPLEXITY_API_KEY): Examples: "use perplexity to research X", "perplexity research on Y" → READ:
${PAI_DIR}/skills/research/workflows/perplexity-research.ts
EXECUTE: Fast web search with query decomposition via Perplexity API
When user requests interview preparation: Examples: "prepare interview questions for X", "interview research on Y" → READ:
${PAI_DIR}/skills/research/workflows/interview-research.md
EXECUTE: Interview prep with diverse question generation
当用户请求全面并行调研时: 示例:"调研X主题"、"对该话题开展调研"、"查找关于Y的信息"、"调查此主题" → 读取:
${PAI_DIR}/skills/research/workflows/conduct.md
执行: 使用可用的调研Agent启动多Agent并行调研
当用户请求基于Claude的调研(免费,无需API密钥): 示例:"用Claude调研"、"Claude调研X"、"用WebSearch调研Y" → 读取:
${PAI_DIR}/skills/research/workflows/claude-research.ts
执行: 借助Claude的WebSearch工具进行智能查询分解
当用户请求基于Perplexity的调研(需PERPLEXITY_API_KEY): 示例:"用Perplexity调研X"、"Perplexity调研Y" → 读取:
${PAI_DIR}/skills/research/workflows/perplexity-research.ts
执行: 通过Perplexity API实现快速网页搜索与查询分解
当用户请求面试准备时: 示例:"为X岗位准备面试问题"、"针对Y主题做面试调研" → 读取:
${PAI_DIR}/skills/research/workflows/interview-research.md
执行: 生成多样化问题,完成面试准备

Content Retrieval Workflows

内容检索工作流

When user indicates difficulty accessing content: Examples: "can't get this content", "site is blocking me", "CAPTCHA blocking" → READ:
${PAI_DIR}/skills/research/workflows/retrieve.md
EXECUTE: Content retrieval via WebFetch
When user provides YouTube URL: Examples: "get this youtube video", "extract from youtube URL" → READ:
${PAI_DIR}/skills/research/workflows/youtube-extraction.md
EXECUTE: YouTube content extraction
When user requests web scraping: Examples: "scrape this site", "extract data from this website" → READ:
${PAI_DIR}/skills/research/workflows/web-scraping.md
EXECUTE: Web scraping techniques and tools
当用户表示无法访问内容时: 示例:"无法获取此内容"、"网站限制访问"、"验证码拦截" → 读取:
${PAI_DIR}/skills/research/workflows/retrieve.md
执行: 通过WebFetch工具检索内容
当用户提供YouTube链接时: 示例:"获取该YouTube视频内容"、"从YouTube链接提取信息" → 读取:
${PAI_DIR}/skills/research/workflows/youtube-extraction.md
执行: YouTube内容提取
当用户请求网页爬取时: 示例:"爬取该网站"、"从该网站提取数据" → 读取:
${PAI_DIR}/skills/research/workflows/web-scraping.md
执行: 使用网页爬取技术与工具

Content Enhancement Workflows

内容增强工作流

When user requests content enhancement: Examples: "enhance this content", "improve this draft" → READ:
${PAI_DIR}/skills/research/workflows/enhance.md
EXECUTE: Content improvement and refinement
When user requests knowledge extraction: Examples: "extract knowledge from X", "get insights from this" → READ:
${PAI_DIR}/skills/research/workflows/extract-knowledge.md
EXECUTE: Knowledge extraction and synthesis

当用户请求内容优化时: 示例:"优化此内容"、"改进这份草稿" → 读取:
${PAI_DIR}/skills/research/workflows/enhance.md
执行: 内容优化与精炼
当用户请求知识提取时: 示例:"从X提取知识"、"从此内容获取洞见" → 读取:
${PAI_DIR}/skills/research/workflows/extract-knowledge.md
执行: 知识提取与整合

Multi-Source Research

多源调研

Three Research Modes

三种调研模式

QUICK RESEARCH MODE:
  • User says "quick research" → Launch 1 agent per researcher type
  • Timeout: 2 minutes
  • Best for: Simple queries, straightforward questions
STANDARD RESEARCH MODE (Default):
  • Default for most research requests → Launch 3 agents per researcher type
  • Timeout: 3 minutes
  • Best for: Most research needs, comprehensive coverage
EXTENSIVE RESEARCH MODE:
  • User says "extensive research" → Launch 8 agents per researcher type
  • Timeout: 10 minutes
  • Best for: Deep-dive research, comprehensive reports
快速调研模式:
  • 用户输入"快速调研" → 为每种类型的调研工具启动1个Agent
  • 超时时间:2分钟
  • 适用场景:简单查询、直接性问题
标准调研模式(默认):
  • 大多数调研请求的默认模式 → 为每种类型的调研工具启动3个Agent
  • 超时时间:3分钟
  • 适用场景:多数调研需求、全面覆盖主题
深度调研模式:
  • 用户输入"深度调研" → 为每种类型的调研工具启动8个Agent
  • 超时时间:10分钟
  • 适用场景:深度调研、生成全面报告

Available Research Agents

可用调研Agent

Check
${PAI_DIR}/agents/
for agents with "researcher" in their name:
  • claude-researcher
    - Uses Claude's WebSearch (FREE, no API key needed)
  • perplexity-researcher
    - Uses Perplexity API (requires PERPLEXITY_API_KEY)
  • gemini-researcher
    - Uses Gemini API (requires GOOGLE_API_KEY)
${PAI_DIR}/agents/
目录下查找名称含"researcher"的Agent:
  • claude-researcher
    - 使用Claude内置WebSearch工具(免费,无需API密钥)
  • perplexity-researcher
    - 使用Perplexity API(需PERPLEXITY_API_KEY)
  • gemini-researcher
    - 使用Gemini API(需GOOGLE_API_KEY)

Speed Benefits

速度优势

  • Old approach: Sequential searches → 5-10 minutes
  • Quick mode: 1 agent per type → 2 minute timeout
  • Standard mode: 3 agents per type → 3 minute timeout
  • Extensive mode: 8 agents per type → 10 minute timeout

  • 旧方案: 串行搜索 → 耗时5-10分钟
  • 快速模式: 每种类型1个Agent → 2分钟超时
  • 标准模式: 每种类型3个Agent → 3分钟超时
  • 深度模式: 每种类型8个Agent → 10分钟超时

Intelligent Content Retrieval

智能内容检索

Three-Layer Escalation System

三层递进检索体系

Layer 1: Built-in Tools (Try First - FREE)
  • WebFetch - Standard web content fetching
  • WebSearch - Search engine queries
  • When to use: Default for all content retrieval
Critical Rules:
  • Always try simplest approach first (Layer 1)
  • Escalate only when previous layer fails
  • Document which layers were used and why

第一层:内置工具(优先尝试 - 免费)
  • WebFetch - 标准网页内容抓取
  • WebSearch - 搜索引擎查询
  • 适用场景:所有内容检索的默认选项
核心规则:
  • 始终优先尝试最简单的方案(第一层)
  • 仅当前一层失败时,才升级到下一层
  • 记录使用的层级及原因

File Organization

文件组织

Working Directory (Scratchpad)

工作目录(临时草稿区)

${PAI_DIR}/scratchpad/YYYY-MM-DD-HHMMSS_research-[topic]/
├── raw-outputs/
├── synthesis-notes.md
└── draft-report.md
${PAI_DIR}/scratchpad/YYYY-MM-DD-HHMMSS_research-[topic]/
├── raw-outputs/
├── synthesis-notes.md
└── draft-report.md

Permanent Storage (History)

永久存储(历史记录)

${PAI_DIR}/history/research/YYYY-MM/YYYY-MM-DD_[topic]/
├── README.md
├── research-report.md
└── metadata.json

${PAI_DIR}/history/research/YYYY-MM/YYYY-MM-DD_[topic]/
├── README.md
├── research-report.md
└── metadata.json

Key Principles

核心原则

  1. Parallel execution - Launch multiple agents simultaneously
  2. Hard timeouts - Don't wait indefinitely, proceed with partial results
  3. Simplest first - Always try free tools before paid services
  4. Auto-routing - Skill analyzes intent and activates appropriate workflow

  1. 并行执行 - 同时启动多个Agent
  2. 强制超时 - 不无限等待,基于部分结果推进
  3. 从简原则 - 优先使用免费工具,再尝试付费服务
  4. 自动路由 - Skill分析用户意图并激活对应工作流

WebSearch Tool Usage

WebSearch工具使用指南

Built-in Web Search (FREE)

内置Web搜索(免费)

Claude Code includes a built-in WebSearch tool for real-time web queries.
When to Use:
  • Current events and recent information
  • Documentation and API references
  • Pricing, availability, status checks
  • Fact verification beyond training data
Best Practices:
typescript
// Include year for recent info
WebSearch({ query: "Next.js 15 features 2024" })

// Be specific
WebSearch({ query: "TypeScript 5.4 satisfies operator examples" })

// Use domain filtering for trusted sources
WebSearch({
  query: "React hooks best practices",
  allowed_domains: ["react.dev", "kentcdodds.com"]
})
Query Optimization:
  • Include year: "React Server Components 2024"
  • Be specific: "Bun vs Node.js benchmark comparison"
  • Use domain filters: Focus on official docs or trusted sources
Source Citation: Always cite sources in research output:
markdown
undefined
Claude Code内置WebSearch工具,支持实时网页查询。
适用场景:
  • 时事与近期资讯
  • 文档与API参考
  • 价格、可用性、状态查询
  • 训练数据之外的事实验证
最佳实践:
typescript
// 针对近期信息,需包含年份
WebSearch({ query: "Next.js 15 features 2024" })

// 查询需具体
WebSearch({ query: "TypeScript 5.4 satisfies operator examples" })

// 限制域名,仅从可信来源获取信息
WebSearch({
  query: "React hooks best practices",
  allowed_domains: ["react.dev", "kentcdodds.com"]
})
查询优化技巧:
  • 包含年份:"React Server Components 2024"
  • 明确具体:"Bun vs Node.js benchmark comparison"
  • 使用域名过滤:聚焦官方文档或可信来源
来源引用: 调研输出中需始终标注来源:
markdown
undefined

Sources

参考来源

WebSearch vs WebFetch

WebSearch与WebFetch对比

NeedTool
Search for informationWebSearch
Get specific page contentWebFetch
Multiple search resultsWebSearch
Full article extractionWebFetch
需求工具
搜索信息WebSearch
获取特定页面内容WebFetch
多搜索结果WebSearch
全文提取WebFetch

Integration with Research Workflows

与调研工作流的整合

WebSearch is the foundation of
claude-researcher
agent:
  1. Query decomposition into sub-queries
  2. Parallel WebSearch calls
  3. Result synthesis
  4. Source attribution

WebSearch是
claude-researcher
Agent的核心:
  1. 将查询分解为子查询
  2. 并行调用WebSearch
  3. 整合搜索结果
  4. 标注来源

Workflow Files

工作流文件列表

WorkflowFileAPI Keys Needed
Multi-Source Research
workflows/conduct.md
Varies by agent
Claude Research
workflows/claude-research.md
None (FREE)
Perplexity Research
workflows/perplexity-research.md
PERPLEXITY_API_KEY
Interview Prep
workflows/interview-research.md
None
Content Retrieval
workflows/retrieve.md
None
YouTube Extraction
workflows/youtube-extraction.md
None
Web Scraping
workflows/web-scraping.md
None
Content Enhancement
workflows/enhance.md
None
Knowledge Extraction
workflows/extract-knowledge.md
None
工作流文件是否需要API密钥
多源调研
workflows/conduct.md
依使用的Agent而定
Claude调研
workflows/claude-research.md
无需(免费)
Perplexity调研
workflows/perplexity-research.md
需要PERPLEXITY_API_KEY
面试准备
workflows/interview-research.md
无需
内容检索
workflows/retrieve.md
无需
YouTube内容提取
workflows/youtube-extraction.md
无需
网页爬取
workflows/web-scraping.md
无需
内容增强
workflows/enhance.md
无需
知识提取
workflows/extract-knowledge.md
无需