deep-research

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gemini Deep Research Skill

Gemini Deep Research Skill

Run autonomous research tasks that plan, search, read, and synthesize information into comprehensive reports.
运行可自主规划、搜索、阅读并将信息整合为全面报告的研究任务。

Requirements

要求

  • Python 3.8+
  • httpx:
    pip install -r requirements.txt
  • GEMINI_API_KEY environment variable
  • Python 3.8+
  • httpx:执行
    pip install -r requirements.txt
    安装
  • 需配置GEMINI_API_KEY环境变量

Setup

配置步骤

  1. Get a Gemini API key from Google AI Studio
  2. Set the environment variable:
    bash
    export GEMINI_API_KEY=your-api-key-here
    Or create a
    .env
    file in the skill directory.
  1. Google AI Studio获取Gemini API密钥
  2. 设置环境变量:
    bash
    export GEMINI_API_KEY=your-api-key-here
    或在技能目录下创建
    .env
    文件。

Usage

使用方法

Start a research task

启动研究任务

bash
python3 scripts/research.py --query "Research the history of Kubernetes"
bash
python3 scripts/research.py --query "Research the history of Kubernetes"

With structured output format

指定结构化输出格式

bash
python3 scripts/research.py --query "Compare Python web frameworks" \
  --format "1. Executive Summary\n2. Comparison Table\n3. Recommendations"
bash
python3 scripts/research.py --query "Compare Python web frameworks" \
  --format "1. Executive Summary\n2. Comparison Table\n3. Recommendations"

Stream progress in real-time

实时流式查看进度

bash
python3 scripts/research.py --query "Analyze EV battery market" --stream
bash
python3 scripts/research.py --query "Analyze EV battery market" --stream

Start without waiting

启动任务后无需等待

bash
python3 scripts/research.py --query "Research topic" --no-wait
bash
python3 scripts/research.py --query "Research topic" --no-wait

Check status of running research

查看运行中任务的状态

bash
python3 scripts/research.py --status <interaction_id>
bash
python3 scripts/research.py --status <interaction_id>

Wait for completion

等待任务完成

bash
python3 scripts/research.py --wait <interaction_id>
bash
python3 scripts/research.py --wait <interaction_id>

Continue from previous research

基于已有研究继续跟进

bash
python3 scripts/research.py --query "Elaborate on point 2" --continue <interaction_id>
bash
python3 scripts/research.py --query "Elaborate on point 2" --continue <interaction_id>

List recent research

列出近期研究任务

bash
python3 scripts/research.py --list
bash
python3 scripts/research.py --list

Output Formats

输出格式

  • Default: Human-readable markdown report
  • JSON (
    --json
    ): Structured data for programmatic use
  • Raw (
    --raw
    ): Unprocessed API response
  • 默认格式:易读的Markdown报告
  • JSON
    --json
    参数):适用于程序化调用的结构化数据
  • 原始格式
    --raw
    参数):未处理的API响应

Cost & Time

成本与耗时

MetricValue
Time2-10 minutes per task
Cost$2-5 per task (varies by complexity)
Token usage~250k-900k input, ~60k-80k output
指标数值
耗时每任务2-10分钟
成本每任务2-5美元(随复杂度变化)
Token使用量输入约25万-90万Token,输出约6万-8万Token

Best Use Cases

最佳适用场景

  • Market analysis and competitive landscaping
  • Technical literature reviews
  • Due diligence research
  • Historical research and timelines
  • Comparative analysis (frameworks, products, technologies)
  • 市场分析与竞品格局分析
  • 技术文献综述
  • 尽职调查研究
  • 历史研究与时间线梳理
  • 对比分析(框架、产品、技术)

Workflow

工作流程

  1. User requests research → Run
    --query "..."
  2. Inform user of estimated time (2-10 minutes)
  3. Monitor with
    --stream
    or poll with
    --status
  4. Return formatted results
  5. Use
    --continue
    for follow-up questions
  1. 用户发起研究请求 → 执行
    --query "..."
    命令
  2. 告知用户预估耗时(2-10分钟)
  3. 使用
    --stream
    参数实时监控,或用
    --status
    参数轮询状态
  4. 返回格式化结果
  5. 使用
    --continue
    参数跟进后续问题

Exit Codes

退出码

  • 0: Success
  • 1: Error (API error, config issue, timeout)
  • 130: Cancelled by user (Ctrl+C)
  • 0:执行成功
  • 1:执行错误(API错误、配置问题、超时)
  • 130:用户取消(Ctrl+C)