Handoff gemini

From claude-world/director-mode-lite · View interactive version

Handoff gemini is an AI agent skill from the GitHub repository claude-world/director-mode-lite. Delegate long-context analysis, research, and large-document summarization to Google Gemini CLI (1M-token context) via non-interactive `gemini -p`, preserving Claude context. Use when the user says 'use gemini'/'hand off to gemini' or a task needs 100K+ tokens of context.

How to use this skill

Skill file

Handoff to Gemini CLI

Delegate tasks to Google Gemini CLI to save Claude context.


When to Use Gemini

| Use Gemini For | Keep in Claude |

|----------------|----------------|

| Long document analysis | Complex coding |

| Multimodal tasks | Architecture decisions |

| Research and summarization | Multi-step workflows |

| Large file comprehension | Problem analysis |


Prerequisites

# Install Gemini CLI (Google)
npm install -g @google/gemini-cli
# Or via: https://github.com/google-gemini/gemini-cli

Handoff Process

1. Prepare Context

## Task for Gemini
**Goal**: [What needs to be done]
**Files**: [Which files to analyze]
**Output**: [What format to return]

2. Generate Command

Pass the prompt with -p (non-interactive). Reference files or directories inline with @<path>, or pipe content via stdin. There is no -f flag.

# Analyze a directory (@ reads it recursively)
gemini -p "Summarize the components in @src/"

# Research task (no file context)
gemini -p "Research best practices for [topic]"

# Document analysis (single file via @)
gemini -p "Extract key points from @docs/spec.md"

# Large or generated context via stdin
cat docs/spec.md | gemini -p "Extract key points"

Note: A src/**/*.ts-style glob only expands if the shell has globstar enabled (shopt -s globstar in bash). Prefer a directory reference like @src/, which Gemini reads recursively without relying on shell globbing.

3. Provide Instructions


Example

## Task: Research API Best Practices

**Command:**
gemini -p "Research REST API versioning strategies. Summarize pros/cons."

**After:**
- Review research
- Share relevant findings
- Implement chosen strategy

Benefits

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.