| name | gemini-deep-research |
| description | Run Gemini Deep Research reports on any topic. Use when user says "deep research", "research report", "gemini research", or "run a research report on...". Generates comprehensive research reports using Google's Deep Research agent. |
Gemini Deep Research
This skill runs Google's Deep Research agent to produce comprehensive research reports on any topic. Reports typically take 2-5 minutes to generate.
Configuration
API Key: The script checks for the key in this order:
GEMINI_API_KEY environment variable (recommended)
config.txt file in the skill directory
If using config.txt:
- Copy
config.txt.example to config.txt
- Add your API key
Get a key from: https://aistudio.google.com/apikey
Helper Script Location: ~/.claude/skills/gemini-deep-research/gemini-helper.ts
Output Folder: ~/obsidian/Research/
Workflow
Step 1: Get Research Topic
Use AskUserQuestion to ask what the user wants to research:
- Question: "What topic would you like me to research?"
- Let user provide a detailed topic or question
Step 2: Submit Research Request
Run the helper script to submit the research:
bun ~/.claude/skills/gemini-deep-research/gemini-helper.ts submit "<topic>"
The script returns JSON with the interaction ID:
{"id": "abc123", "status": "in_progress"}
Step 3: Start Background Polling
Start the background poller which checks every 60 seconds and caches the result when done:
bun ~/.claude/skills/gemini-deep-research/gemini-helper.ts poll <interaction-id>
This returns immediately and polls in the background.
Tell the user: "Research started! This typically takes 2-5 minutes. I'll let you know when it's ready. You can continue with other tasks."
Step 4: Check for Completion
Periodically check if the research is complete:
bun ~/.claude/skills/gemini-deep-research/gemini-helper.ts check <interaction-id>
Returns:
{"id": "abc123", "status": "in_progress", "cached": false}
or when complete:
{"id": "abc123", "status": "completed", "cached": true}
When cached: true, the result is ready.
Step 5: Get Research Report
Once status is "completed", get the full report:
bun ~/.claude/skills/gemini-deep-research/gemini-helper.ts result <interaction-id>
This outputs the full markdown report with citations (from cache if available).
Step 6: Save Report
Generate a filename using the topic:
- Format:
Deep-Research-YYYY-MM-DD-HHmm-<slug>.md
- Slug: lowercase topic with spaces replaced by hyphens, max 50 chars
- Example:
Deep-Research-2025-01-04-1430-climate-change-effects.md
Save to the Research folder:
~/obsidian/Research/
Step 7: Notify User
After saving:
- Notify the user: "Your research report is ready!"
- Show the report location
- Display a brief summary (first 3-5 key points)
- Offer to show the full report
Error Handling
- API key missing: Direct user to create config.txt from config.txt.example
- Research fails: Show error message from API
- Timeout (>10 min): Suggest trying a more focused query
Example Session
User: Run a deep research report
Claude: What topic would you like me to research?
User: The current state of fusion energy research and commercial viability
Claude: Starting deep research on fusion energy...
Research submitted! This typically takes 2-5 minutes.
I've started background polling - I'll let you know when it's ready.
You can continue with other tasks in the meantime.
[Later, after checking status...]
Claude: Your research report is ready!
Saved to: Research/Deep-Research-2025-01-04-1430-fusion-energy-research.md
Key findings:
1. ITER construction 70% complete, first plasma expected 2035
2. Private sector investment reached $6B in 2024
3. Commonwealth Fusion Systems targeting 2030s commercialization
4. ...
Would you like me to show the full report?