Gemini Deep Research Skill
Run autonomous research tasks that plan, search, read, and synthesize information into comprehensive reports.
When to Use This Skill
Use this skill when:
- - Performing market analysis
- Conducting competitive landscaping
- Creating literature reviews
- Doing technical research
- Performing due diligence
- Need detailed, cited research reports
Requirements
- - Python 3.8+
- httpx: INLINECODE0
- GEMINIAPIKEY environment variable
Setup
- 1. Get a Gemini API key from Google AI Studio
- Set the environment variable:
export GEMINI_API_KEY=your-api-key-here
Or create a
.env file in the skill directory.
Usage
Start a research task
CODEBLOCK1
With structured output format
CODEBLOCK2
Stream progress in real-time
CODEBLOCK3
Start without waiting
CODEBLOCK4
Check status of running research
CODEBLOCK5
Wait for completion
CODEBLOCK6
Continue from previous research
CODEBLOCK7
List recent research
CODEBLOCK8
Output Formats
- - Default: Human-readable markdown report
- JSON (
--json): Structured data for programmatic use - Raw (
--raw): Unprocessed API response
Cost & Time
| Metric | Value |
|---|
| Time | 2-10 minutes per task |
| Cost |
$2-5 per task (varies by complexity) |
| Token usage | ~250k-900k input, ~60k-80k output |
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 INLINECODE4
- Inform user of estimated time (2-10 minutes)
- Monitor with
--stream or poll with INLINECODE6 - Return formatted results
- Use
--continue for follow-up questions
Exit Codes
- - 0: Success
- 1: Error (API error, config issue, timeout)
- 130: Cancelled by user (Ctrl+C)
Gemini 深度研究技能
运行自主研究任务,规划、搜索、阅读信息并将其综合成全面的报告。
何时使用此技能
在以下情况下使用此技能:
- - 进行市场分析
- 开展竞争格局研究
- 创建文献综述
- 进行技术研究
- 执行尽职调查
- 需要详细且带有引用的研究报告
要求
- - Python 3.8+
- httpx:pip install -r requirements.txt
- GEMINIAPIKEY 环境变量
设置
- 1. 从 Google AI Studio 获取 Gemini API 密钥
- 设置环境变量:
bash
export GEMINI
APIKEY=your-api-key-here
或者在技能目录中创建 .env 文件。
使用方法
启动研究任务
bash
python3 scripts/research.py --query 研究 Kubernetes 的历史
使用结构化输出格式
bash
python3 scripts/research.py --query 比较 Python Web 框架 \
--format 1. 执行摘要\n2. 比较表格\n3. 建议
实时流式传输进度
bash
python3 scripts/research.py --query 分析电动汽车电池市场 --stream
无需等待启动
bash
python3 scripts/research.py --query 研究主题 --no-wait
检查正在运行的研究状态
bash
python3 scripts/research.py --status <交互ID>
等待完成
bash
python3 scripts/research.py --wait <交互ID>
从之前的研究继续
bash
python3 scripts/research.py --query 详细说明第2点 --continue <交互ID>
列出最近的研究
bash
python3 scripts/research.py --list
输出格式
- - 默认:人类可读的 Markdown 报告
- JSON(--json):用于程序化使用的结构化数据
- 原始(--raw):未处理的 API 响应
成本与时间
每个任务 $2-5(因复杂度而异) |
| Token 使用量 | 约 25万-90万 输入,约 6万-8万 输出 |
最佳使用场景
- - 市场分析和竞争格局研究
- 技术文献综述
- 尽职调查研究
- 历史研究与时间线
- 比较分析(框架、产品、技术)
工作流程
- 1. 用户请求研究 → 运行 --query ...
- 告知用户预计时间(2-10 分钟)
- 使用 --stream 监控或使用 --status 轮询
- 返回格式化结果
- 使用 --continue 进行后续问题
退出代码
- - 0:成功
- 1:错误(API 错误、配置问题、超时)
- 130:用户取消(Ctrl+C)