From nexus-agents
Delegates tasks with >100K token context, image/screenshot analysis, large codebases (>50 files), or speed/cost needs to Gemini CLI using MCP tools or direct invocation.
npx claudepluginhub williamzujkowski/nexus-agentsThis skill is limited to using the following tools:
<!-- CANONICAL SOURCES:
Delegates tasks like long document analysis, multimodal processing, research, summarization, and large file handling to Google Gemini CLI to preserve Claude context.
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 code tasks to Gemini CLI for large-context (1M+ tokens) analysis and batch processing after delegation-core selects Gemini models. Handles auth, quota checks, execution, and logging.
Share bugs, ideas, or general feedback.
Full documentation:
| Metric | Value | Notes |
|---|---|---|
| Max files analyzed | 978 files in single query | ~280k LOC processed successfully |
| Latency (simple) | 10-15 seconds | Single directory analysis |
| Latency (complex) | 58-73 seconds | Full codebase analysis |
| Cache efficiency | 94k tokens cached | Significant cost savings |
| Tool calls/session | Up to 20 | File reads auto-executed |
| Model routing | flash-lite → pro | Two-model approach for optimization |
| Condition | Threshold/Criteria | Reason |
|---|---|---|
| Context size | > 100K tokens | Gemini: 1M context window |
| Large codebase analysis | Multiple files, > 50 files | Fast bulk processing |
| Image/screenshot analysis | Any visual content | Native multimodal support |
| Video/audio processing | Any A/V content | Native multimodal support |
| Speed-critical tasks | Latency sensitive | Flash models optimized |
| Cost-sensitive operations | Budget constraints | Generous free tier (1K/day) |
| Google Cloud integration | BigQuery, Cloud Functions | Native integration |
Use the nexus-agents MCP tool for intelligent routing:
# The tool analyzes task and recommends optimal model
nexus-agents delegate_to_model --task "Analyze this 500K token codebase"
# Basic delegation (human-readable output)
gemini -p "Analyze this codebase"
# JSON output for parsing (note: response may contain markdown fences)
gemini -p "Analyze this codebase" --output-format json
# With auto-approve for autonomous operation
gemini --yolo -p "Review all files in src/" --output-format json
# Specify model
gemini -m gemini-2.5-flash -p "Quick analysis task"
gemini -m gemini-3-pro-preview -p "Complex reasoning task"
JSON Output Parsing Note: The response field in JSON output may contain markdown code fences. Parse accordingly:
const result = JSON.parse(output);
const response = result.response.replace(/```\w*\n?/g, '').trim();
# Analyze screenshot
gemini -p "Describe this UI and identify usability issues" < screenshot.png
# Analyze architecture diagram
gemini -p "Extract components and relationships from this diagram" < diagram.png
# Code screenshot OCR
gemini -p "Extract the code from this screenshot" < code-image.png
# Analyze video content (uses File API for > 1 minute)
gemini -p "Summarize the key points from this demo video" < demo.mp4
# Process multiple images
for img in screenshots/*.png; do
gemini -p "Analyze this UI screenshot" < "$img" --output-format json >> results.json
done
| Model | Context Window | Best For |
|---|---|---|
| Claude | ~200K tokens | Quality reasoning |
| Gemini Pro | 1M tokens | Large context, multimodal |
| Gemini Flash | 200K-1M tokens | Speed, high volume |
The 1M token context window enables:
# Human readable (default)
gemini -p "task"
# JSON for parsing
gemini -p "task" --output-format json
# Streaming JSON for real-time
gemini -p "task" --output-format stream-json
Evaluate task requirements:
Choose delegation method:
delegate_to_model for intelligent routingConfigure execution:
--yolo for autonomous tasksProcess results:
# Large context analysis
gemini -p "Analyze this entire codebase structure" --yolo
# Screenshot analysis
gemini -p "What does this UI show?" < screenshot.png
# Fast iteration
gemini -m gemini-2.5-flash -p "Quick review" --output-format json
# Cost-sensitive batch
for f in *.ts; do gemini -p "Review: $(cat $f)" >> reviews.txt; done
| Excuse | Counter |
|---|---|
| "Gemini for everything, it has a big context" | Big context isn't free — output quality varies by task. Use Gemini for >100k context, multimodal, or research-shaped tasks. |
| "Skip the multimodal check" | If the task includes images, Gemini is the canonical CLI. Other CLIs may text-summarize via OCR but lose information. |
| "I'll use Gemini even for short code-gen" | Codex is faster on code. Use Gemini when context size or multimodal forces the choice. |