Share
Embed
Use Gemini CLI from Claude Code as part of Sub Agent
This slide shows a 5-minute explanation of how to call Gemini CLI from Claude Code Sub Agent.
Shingo Tamaki
August 10, 2025
Transcript
24 slides
-
Agenda • What are ... • Claude / Gemini •
Claude Code / Gemini CLI • Claude Code Sub Agents, Slash Commands -
What are Claude, Gemini AI Assistant Name Maintained By Models
Desktop App Use Case Claude Anthropic Sonnet 4, Opus 4.1 Claude Desktop Software Development Google Gemini Google Gemini 2.5 (Pro, Flash, Flash-Lite) - Research & Analysis ChatGPT OpenAI GPT-5, gpt-5-mini, gpt-5-nano ChatGPT Creative Writing, etc Others are Cursor, Github Copilot Agent, etc -
What are Claude Code / Gemini CLI AI Assistant available
from Command Line Interface(CLI) • Claude Code • Gemini CLI • Codex CLI • Cursor CLI -
What's Sub Agents of Claude Code Create and use specialized
AI subagents in Claude Code for task-specific workflows and improved context management. • Context preservation • Specialized expertise • Reusability • Flexible permissions -
File format path: .claude/agents/foo.md --- name: your-sub-agent-name description: Description of
when this subagent should be invoked tools: tool1, tool2, tool3 # Optional - inherits all tools if omitted --- Your subagent's system prompt goes here. This can be multiple paragraphs and should clearly define the subagent's role, capabilities, and approach to solving problems. Include specific instructions, best practices, and any constraints the subagent should follow. -
Use Gemini CLI from Sub Agent use mcp-gemini-cli https://github.com/choplin/mcp-gemini-cli //
Add MCP Server claude mcp add -s project gemini-cli -- npx mcp-gemini-cli --allow-npx // Edit sub agent definition Please ask gemini-cli to do the investigation work but the report should be prepared by this agent. -
How it work ⏺ market-researcher(ࢢੳͱϨϙʔτ࡞) 㽾 Here's a summary of
the web search results on mobile app monetization for climbing sports apps: The dominant monetization model for climbing apps is a **freemium approach with a premium subscription**. This strategy allows apps to attract a large user base with free core features while generating revenue from dedicated users who subscribe for advanced funct … +19 lines (ctrl+r to expand) gemini-cli - googleSearch (MCP)(query: "\"climbing wall route reading\" \"bouldering problem\" AR augmented reality mobile app", limit: 8) +5 more tool uses -
Custome slash commands path: .claude/commands/start-project.md --- name: start-project description: Launch
new projects efficiently with a 2-phase parallel workflow. Execute requirement analysis → strategic analysis (parallel) → MVP definition in sequence tools: Read, Write, Grep, Glob, Bash, Task --- # Project Launch Master Command You are a master orchestrator for efficiently launching new projects. Execute the following 4-phase workflow strictly. ## Execution Phases ### Phase 1: Requirement Analysis & Definition (Sequential Execution) 1. Read request.md as request if it exists there. 2. Use **product-manager** subagent 3. Use **requirements-definition** slash command ### Phase 2: Strategic Analysis Phase (4 Parallel Subagents) Task 1: market-researcher subagent for market analysis ... Task 2: business-strategist subagent for business strategy ... -
Example (Phase1 P1) > /start-project is running… ⏺ ϓϩδΣΫτͷ্ཱͪ͛Λ։࢝͠·͢ɻ4ϑΣʔζͷϫʔΫϑϩʔΛ࣮ߦ͍͖ͯ͠·͢ɻ ϑΣʔζ1:
ཁ݅ੳͱఆٛ ·ͣɺrequest.mdϑΝΠϧͷଘࡏΛ֬ೝ͠·͢ɻ ⏺ Read(request.md) 㽾 Read 3 lines (ctrl+r to expand) ⏺ ཁ݅Λ֬ೝ͠·ͨ͠ɻϘϧμϦϯά࿅शࢧԉΞϓϦͷ։ൃͰ͢Ͷɻ࣍ʹproduct-managerΤʔδΣϯτΛ༻ͯ͠ৄࡉͳཁ݅ੳΛߦ͍·͢ɻ ⏺ Update Todos 㽾 ☐ ϑΣʔζ1: product-managerΤʔδΣϯτͰཁ݅ੳ ☐ ϑΣʔζ1: requirements-definitionίϚϯυͰཁ݅ఆٛॻ࡞ ☐ ϑΣʔζ2: 4ͭͷΤʔδΣϯτΛฒྻ࣮ߦʢࢢௐࠪɾϏδωεઓུɾ๏ɾMVPఆٛʣ ☐ ౷߹ϓϩδΣΫταϚϦʔͷ࡞ ⏺ product-manager(ཁ݅ੳͱػೳ༏ઌॱҐ͚) 㽾 Done (3 tool uses · 19.6k tokens · 2m 11.2s) ⏺ Update Todos 㽾 ☒ ϑΣʔζ1: product-managerΤʔδΣϯτͰཁ݅ੳ ☐ ϑΣʔζ1: requirements-definitionίϚϯυͰཁ݅ఆٛॻ࡞ ☐ ϑΣʔζ2: 4ͭͷΤʔδΣϯτΛฒྻ࣮ߦʢࢢௐࠪɾϏδωεઓུɾ๏ɾMVPఆٛʣ ☐ ౷߹ϓϩδΣΫταϚϦʔͷ࡞ -
Example (Phase1 P2) ⏺ ཁ݅ఆٛॻΛ࡞͠·͢ɻ ⏺ Write(requirements.md) 㽾 Wrote 200
lines to requirements.md # ϘϧμϦϯά࿅शࢧԉΞϓϦ ཁ݅ఆٛॻ ## 1. ϓϩδΣΫτ֓ཁ ### 1.1 Ϗδϣϯ ϘϧμϦϯάѪՈ͕ޮతָ͔ͭ͘͠࿅शͰ͖ΔϞόΠϧΞϓϦέʔγϣϯΛఏڙ͠ɺεΩϧ্ͱ࿅शମݧͷվળΛ࣮ݱ͢Δɻ ### 1.2 ϛογϣϯ - ϘϧμϦϯάΥʔϧͷը૾Λ׆༻ͨ͠ײతͳίʔεೝࣝࢧԉ - ελʔτϙδγϣϯͱϗʔϧυͷ໌֬ͳՄࢹԽ … +190 lines (ctrl+r to expand) ⏺ Update Todos 㽾 ☒ ϑΣʔζ1: product-managerΤʔδΣϯτͰཁ݅ੳ ☒ ϑΣʔζ1: requirements-definitionίϚϯυͰཁ݅ఆٛॻ࡞ ☐ ϑΣʔζ2: 4ͭͷΤʔδΣϯτΛฒྻ࣮ߦʢࢢௐࠪɾϏδωεઓུɾ๏ɾMVPఆٛʣ ☐ ౷߹ϓϩδΣΫταϚϦʔͷ࡞ -
Example (Phase 2 P1) ⏺ ϑΣʔζ2: ઓུతੳϑΣʔζ ࣍ʹɺ4ͭͷઐΤʔδΣϯτΛฒྻ࣮ߦͯ͠ɺଟ֯తͳੳΛߦ͍·͢ɻ ⏺ market-researcher(ࢢੳͱϨϙʔτ࡞)
㽾 Done (8 tool uses · 18.7k tokens · 18m 15.2s) ⏺ business-strategist(Ϗδωεઓུࡦఆ) 㽾 Done (4 tool uses · 42.9k tokens · 5m 57.0s) ⏺ legal-expert(๏ίϯϓϥΠΞϯεධՁ) 㽾 Done (1 tool use · 18.0k tokens · 1m 40.6s) ⏺ product-designer(MVPఆٛͱઃܭ) 㽾 Done (15 tool uses · 39.8k tokens · 10m 23.7s) ⏺ Update Todos 㽾 ☒ ϑΣʔζ1: product-managerΤʔδΣϯτͰཁ݅ੳ ☒ ϑΣʔζ1: requirements-definitionίϚϯυͰཁ݅ఆٛॻ࡞ ☒ ϑΣʔζ2: 4ͭͷΤʔδΣϯτΛฒྻ࣮ߦʢࢢௐࠪɾϏδωεઓུɾ๏ɾMVPఆٛʣ ☐ ౷߹ϓϩδΣΫταϚϦʔͷ࡞ -
Example (Project Summary P1) ⏺ ࠷ޙʹɺͯ͢ͷੳ݁ՌΛ౷߹ͨ͠ϓϩδΣΫταϚϦʔΛ࡞͠·͢ɻ ⏺ Write(project-summary.md) 㽾 Wrote
123 lines to project-summary.md # ϘϧμϦϯά࿅शࢧԉΞϓϦ ϓϩδΣΫταϚϦʔ ## ΤάθΫςΟϒαϚϦʔ ຊϓϩδΣΫτɺϘϧμϦϯάѪՈ͚ͷϞόΠϧΞϓϦέʔγϣϯ։ൃΛతͱ͍ͯ͠·͢ɻʮ**δϜͷนΛࡱӨ͢Δ͚ͩͰɺ Ͳͷϗʔϧυ͕՝ͳͷ͔ͻͱͰ͔Δ**ʯͱ͍͏໌֬ͳՁఏҊʹΑΓɺॳ৺ऀ͔Βதڃऀ·Ͱͷ෯͍ΫϥΠϚʔͷ࿅शମݧΛֵ৽͠·͢ɻ ### ! Ϗδϣϯ **ࣨϘϧμϦϯάʹ͓͚ΔੈքॳͷAI׆༻ܕϧʔτՄࢹԽΞϓϦ**ͱͯ͠ɺຊࢢͰͷϦʔμʔϙδγϣϯཱ֬Λࢦ͠·͢ɻ ### " ࢢػձ … +113 lines (ctrl+r to expand) ⏺ Update Todos 㽾 ☒ ϑΣʔζ1: product-managerΤʔδΣϯτͰཁ݅ੳ ☒ ϑΣʔζ1: requirements-definitionίϚϯυͰཁ݅ఆٛॻ࡞ ☒ ϑΣʔζ2: 4ͭͷΤʔδΣϯτΛฒྻ࣮ߦʢࢢௐࠪɾϏδωεઓུɾ๏ɾMVPఆٛʣ ☒ ౷߹ϓϩδΣΫταϚϦʔͷ࡞ -
Example (Project Summary P2) ⏺ ! ϓϩδΣΫτ্ཱͪ͛ྃ ϘϧμϦϯά࿅शࢧԉΞϓϦͷϓϩδΣΫτ্ཱ͕ͪ͛ྃ͠·ͨ͠ʂ " ࡞͞ΕͨՌ
1. ཁ݅ੳɾఆٛ - ϘϧμϦϯά࿅शࢧԉΞϓϦཁ݅ੳॻ.md - requirements.md 2. ઓུੳϨϙʔτ - market-analysis.md - ࢢੳʢڝ߹ɺࢢنɺλʔήοτʣ - business-strategy.md - ϏδωεઓུʢऩӹϞσϧɺ3ܭըʣ - legal-requirements.md - ๏తཁ݅ʢίϯϓϥΠΞϯεɺϦεΫʣ - mvp-specification.md - MVP༷ʢ12िؒ։ൃܭըʣ 3. ౷߹จॻ - project-summary.md - ϓϩδΣΫτ૯ׅ -
Example (Project Summary P3) ! ओཁϙΠϯτ - ՁఏҊ: ʮࡱӨ͢Δ͚ͩͰϧʔτ͕͔ΔʯγϯϓϧͳUX -
ࢢن: $98.46M → $169.27Mʢ9.4%ʣ - ऩӹ༧ଌ: 3ؒͰ¥193,884,820 - ։ൃظؒ: 12िؒͰMVPϦϦʔε - ٕज़બ: FlutterʢΫϩεϓϥοτϑΥʔϜ։ൃʣ ⏭ ࣍ͷεςοϓ 1. ։ൃνʔϜฤʢFlutter։ൃऀ2໊ɺσβΠφʔ1໊ʣ 2. ύʔτφʔδϜબఆʢ3-5δϜʣ 3. ϓϩτλΠϓ։ൃ։࢝ 4. ๏४උʢར༻نࡦఆʣ ϓϩδΣΫτͷৄࡉproject-summary.mdΛ֬͝ೝ͍ͩ͘͞ɻ -
Next • Use Codex CLI (GPT-5) from sub agent •
Improve subsequent processes and overall quality • Organize your operational flow by actually using it -
Self-introduction Shingo Tamaki iOS DeveloperʢϑϦʔϥϯεʣ ίϛϡχςΟ׆ಈ • ԭೄϞόΠϧΞϓϦ։ൃษڧձӡӦ • try!
Swift TokyoӡӦ • ϋοΧʔζνϟϯϓϧʔ2025ӡӦ