From google-ecosystem
Provides decision criteria, execution patterns, and handling for delegating tasks from Claude to Gemini CLI. Use for cross-agent optimization, risky commands, or TUI needs.
npx claudepluginhub melodic-software/claude-code-plugins --plugin google-ecosystemThis skill is limited to using the following tools:
> **STOP - Before providing ANY response about Gemini CLI capabilities:**
Delegates tasks to Gemini CLI for large-context analysis like broad codebase reviews or long-document processing. Activates on explicit requests such as 'use gemini' or 'delegate to gemini'.
Delegates coding tasks to Google Gemini CLI agent in the background via bash. Triggers on Gemini delegation phrases, second opinions from Gemini/Google, or parallel Google agent runs.
Invokes Google Gemini CLI for complex reasoning, research, and AI tasks in headless mode. Supports preview models, fallbacks, and session continuation.
Share bugs, ideas, or general feedback.
STOP - Before providing ANY response about Gemini CLI capabilities:
- INVOKE
gemini-cli-docsskill- QUERY for the specific feature topic
- BASE all responses EXCLUSIVELY on official documentation loaded
Meta-skill for determining when and how Claude should delegate to Gemini CLI. Documents decision criteria, execution patterns, and result handling.
Keywords: delegate to gemini, use gemini, gemini vs claude, which agent, hand off, gemini better, claude or gemini, second brain
Use this skill when:
| Scenario | Delegate to Gemini? | Rationale |
|---|---|---|
| Interactive TUI needed (vim, git rebase -i) | YES | Claude cannot handle PTY |
| Risky shell command | YES | Gemini sandbox isolation |
| Large codebase analysis (100K+ tokens) | YES | Gemini 1M+ context window |
| GCP/Firebase/Vertex auth required | YES | Native Google integration |
| Need instant rollback capability | YES | Gemini checkpointing |
| Quick code edit | NO | Claude is faster |
| Multi-turn conversation | NO | Claude maintains context better |
| Complex reasoning with files | NO | Claude's Edit tool is superior |
| Need persistent session | NO | Claude Code has better UX |
| Security-sensitive analysis | MAYBE | Gemini sandbox + Claude reasoning |
Best for: Quick queries, analysis, code generation
gemini "{prompt}" --output-format json
When to use:
Best for: Risky commands, untrusted code
gemini -s "Execute: {command}" --output-format json --yolo
When to use:
Best for: Risky refactors, migrations
/restore if failed, keep if passedWhen to use:
Best for: TUI commands (vim, rebase, htop)
When to use:
git rebase -ivim / nano / emacshtop / topBest for: Large codebases exceeding Claude's context
cat $(find src -name "*.ts") | gemini "Analyze architecture" --output-format json -m gemini-2.5-flash
When to use:
Best for: Validation and alternative perspectives
gemini "REVIEW MODE (read-only): Analyze this independently: {content}" --output-format json
When to use:
| Model | Context | Cost | Best For |
|---|---|---|---|
| gemini-2.5-flash | Large | Lower | Bulk analysis, simple tasks |
| gemini-2.5-pro | Very large | Higher | Complex reasoning, quality critical |
Use Flash when:
Use Pro when:
START
|
v
Does it need a TUI? โโโโโโโโโโโโโ> YES โ> gemini-interactive-shell agent
|
NO
|
v
Is it risky/destructive? โโโโโโโโ> YES โ> gemini-sandboxed-executor agent
|
NO
|
v
Is it a large file/codebase? โโโโ> YES โ> gemini-bulk-analyzer agent
|
NO
|
v
Need safety net for experiments? โ> YES โ> gemini-checkpoint-experimenter agent
|
NO
|
v
Want validation/second opinion? โโ> YES โ> gemini-second-opinion agent
|
NO
|
v
Simple query? โโโโโโโโโโโโโโโโโโโ> YES โ> /gemini-query command
|
NO
|
v
Keep in Claude โโโโโโโโโโโโโโโโโโโโโโโโโ> Use Claude's native tools
| Topic | Query Keywords |
|---|---|
| Headless mode | headless json output, output format, -p flag |
| Sandboxing | sandbox docker podman, seatbelt, -s flag |
| Checkpointing | checkpoint restore, rollback, /restore command |
| Interactive | interactive shell, enableInteractiveShell, PTY |
| Model selection | model routing, flash vs pro, -m flag |
| Auto-approve | yolo mode, --yolo, auto approve |
| Error | Cause | Recovery |
|---|---|---|
| JSON parse error | Malformed output | Retry with --output-format json |
| Timeout | Long-running task | Increase timeout, use streaming |
| Auth error | Missing credentials | Check gemini auth status |
| Sandbox error | Missing container | Build sandbox image first |
# Retry with exponential backoff
for i in 1 2 4; do
result=$(gemini "query" --output-format json 2>&1) && break
sleep $i
done
Query gemini-cli-docs for official documentation on:
Query: "Should I delegate this task to Gemini?" Expected Behavior:
Query: "I need to run git rebase -i, can Claude do this?" Expected Behavior:
Query: "I have a 100K+ token codebase to analyze" Expected Behavior: