/install gemini-sub-agent
gemini-sub-agent
Use Google Gemini (via subscription, $0 API cost) as a sub-agent inside OpenClaw workflows.
Setup
Run once on a fresh machine:
bash skills/gemini-sub-agent/scripts/setup.sh
Then authenticate (headless VPS flow):
- On VPS:
gcloud auth application-default login --no-browser→ copy the--remote-bootstrapURL - On laptop:
gcloud auth application-default login --remote-bootstrap="\x3CURL>"→ copy thelocalhost:8085output - Paste
localhost:8085output back into VPS prompt - Complete Gemini CLI OAuth:
GOOGLE_GENAI_USE_GCA=true gemini -p "hello"→ paste auth code
Credentials are cached indefinitely and auto-refresh.
Available Models
| Model | Use for |
|---|---|
gemini-3.1-pro-preview |
Default — latest flagship, best reasoning |
gemini-2.5-pro |
Stable coding tasks, multi-file edits |
gemini-3-flash-preview |
Fast summaries, quick Q&A |
gemini-3-pro-preview |
Previous gen Pro, reliable fallback |
gemini-2.5-flash |
Lightweight fallback |
Usage Patterns
1. Simple text task (exec)
ask-gemini "your prompt here"
ask-gemini -m gemini-2.5-pro "your prompt"
2. Pipe large content (long-context)
cat large_file.txt | ask-gemini "summarize this in 5 bullets"
cat report.md | ask-gemini "extract all action items"
3. Agentic coding (replaces Swift/Sonnet for 30-200 line tasks)
cd /path/to/project
GOOGLE_GENAI_USE_GCA=true gemini -m gemini-2.5-pro -y -p "write a script that..."
-y = yolo mode (auto-approves all file writes and shell commands). Gemini reads/writes files autonomously.
4. Pipe files directly into agentic session
cat existing_script.py | GOOGLE_GENAI_USE_GCA=true gemini -m gemini-2.5-pro -y -p "refactor this to add error handling"
Routing Rules (when to use Gemini vs others)
| Task | Use |
|---|---|
| Text, analysis, summarization | ask-gemini |
| Medium coding (30–200 lines) | Gemini agentic (-y) instead of Swift/Sonnet |
| Large file / long-context | ask-gemini (1M token window) |
| Web search / research | Research agent (Grok) — Gemini has no web access |
| Multi-agent orchestration | OpenClaw native (sessions_spawn) |
| Complex architecture / debugging | Codex (Opus) — escalate if Gemini fails twice |
Escalation
If Gemini returns wrong output twice on the same task → escalate to Swift (Sonnet) or Codex (Opus).
Log the failure in failures/hot_antipatterns.md with the task type.
Scripts
scripts/setup.sh— Full install: gemini-cli + gcloud + ask-gemini wrapperscripts/ask-gemini— The wrapper script itself (copy to/usr/local/bin/)
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install gemini-sub-agent - 安装完成后,直接呼叫该 Skill 的名称或使用
/gemini-sub-agent触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Gemini Sub-Agent 是什么?
Use Google Gemini as a free sub-agent via a Google One / Gemini Advanced subscription (no API key or API credits needed). Use when: (1) delegating tasks that... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 462 次。
如何安装 Gemini Sub-Agent?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install gemini-sub-agent」即可一键安装,无需额外配置。
Gemini Sub-Agent 是免费的吗?
是的,Gemini Sub-Agent 完全免费(开源免费),可自由下载、安装和使用。
Gemini Sub-Agent 支持哪些平台?
Gemini Sub-Agent 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Gemini Sub-Agent?
由 tedo0626(@tedo0626)开发并维护,当前版本 v1.0.0。