plugins/google-ecosystem/skills/gemini-delegation-patterns/SKILL.md
Strategic patterns for Claude-to-Gemini delegation. Covers decision criteria, execution patterns, result parsing, and error handling. Use when determining if a task should be delegated to Gemini CLI.
npx skillsauth add melodic-software/claude-code-plugins gemini-delegation-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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:
development
Search Milan Jovanovic's .NET blog for Clean Architecture, DDD, CQRS, EF Core, and ASP.NET Core patterns. Use for finding applicable patterns, code examples, and architecture guidance. Invoke when working with .NET projects that could benefit from proven architectural patterns.
tools
Install and configure Data API Builder (DAB) for production SQL Server MCP access with RBAC
tools
Manage MssqlMcp servers - status, rebuild, and upstream updates
tools
Developer environment setup guides for Windows, macOS, Linux, and WSL. Use when setting up development machines, installing tools, configuring environments, or following platform-specific setup guides. Covers package management, shell/terminal, code editors, AI tooling, containerization, databases, and more.