PROACTIVELY consult Gemini CLI for research, large codebase comprehension, and multimodal data processing. Gemini excels at: massive context windows (1M tokens), Google Search grounding, video/audio/PDF analysis, and repository-wide understanding. Use for pre-implementation research, documentation analysis, and multimodal tasks. Explicit triggers: "research", "investigate", "analyze video/audio/PDF", "understand codebase".
Gemini CLI (gemini-3-pro-preview) is your research specialist with 1M token context.
詳細ルール:
.claude/rules/gemini-delegation.md
サブエージェント経由を推奨。 Gemini出力は大きくなりがちなため。
| 状況 | 方法 |
|---|---|
| コードベース分析 | サブエージェント経由(推奨) |
| ライブラリ調査 | サブエージェント経由(推奨) |
| マルチモーダル | サブエージェント経由(推奨) |
| 短い質問 (1-2文回答) | 直接呼び出しOK |
| Task |
|---|
| Gemini |
|---|
| Codex |
|---|
| リポジトリ全体理解 | ✓ | |
| ライブラリ調査 | ✓ | |
| マルチモーダル (PDF/動画/音声) | ✓ | |
| 最新ドキュメント検索 | ✓ | |
| 設計判断 | ✓ | |
| デバッグ | ✓ | |
| コード実装 | ✓ |
| Situation | Trigger Examples |
|---|---|
| Research | 「調べて」「リサーチ」 / "Research" "Investigate" |
| Library docs | 「ライブラリ」「ドキュメント」 / "Library" "Docs" |
| Codebase analysis | 「コードベース全体」 / "Entire codebase" |
| Multimodal | 「PDF」「動画」「音声」 / "PDF" "Video" "Audio" |
Use Task tool with subagent_type='general-purpose' to preserve main context.
Task tool parameters:
- subagent_type: "general-purpose"
- run_in_background: true (optional, for parallel work)
- prompt: |
Research: {topic}
gemini -p "{research question}" 2>/dev/null
Save full output to: .claude/docs/research/{topic}.md
Return CONCISE summary (5-7 bullet points).
For quick questions expecting brief answers:
gemini -p "Brief question" 2>/dev/null
# Codebase analysis
gemini -p "{question}" --include-directories . 2>/dev/null
# Multimodal (PDF/video/audio)
gemini -p "{prompt}" < /path/to/file.pdf 2>/dev/null
# JSON output
gemini -p "{question}" --output-format json 2>/dev/null
.claude/docs/research/{topic}.mdSave Gemini research results to:
.claude/docs/research/{topic}.md
This allows Claude and Codex to reference the research later.
gemini -p "Research best practices for {feature} in Python 2025.
Include:
- Common patterns and anti-patterns
- Library recommendations (with comparison)
- Performance considerations
- Security concerns
- Code examples" 2>/dev/null
gemini -p "Analyze this repository:
1. Architecture overview
2. Key modules and responsibilities
3. Data flow between components
4. Entry points and extension points
5. Existing patterns to follow" --include-directories . 2>/dev/null
See: references/lib-research-task.md
# Video
gemini -p "Analyze video: main concepts, key points, timestamps" < tutorial.mp4 2>/dev/null
# PDF
gemini -p "Extract: API specs, examples, constraints" < api-docs.pdf 2>/dev/null
# Audio
gemini -p "Transcribe and summarize: decisions, action items" < meeting.mp3 2>/dev/null
| Workflow | Steps |
|---|---|
| New feature | Gemini research → Codex design review |
| Library choice | Gemini comparison → Codex decision |
| Bug investigation | Gemini codebase search → Codex debug |