| name | gemini-bridge |
| description | Call Google Gemini 3.1 Pro or Gemini 3 Flash via OpenRouter for tasks where Gemini outperforms Claude. Use for: multimodal analysis (video, audio, images), abstract/logic reasoning cross-validation, or any task where a second opinion from a different model adds value. Do NOT use for UI/frontend code generation — Gemini produces code with invalid imports and unsupported APIs that fails to render. Trigger on: 'ask gemini', 'gemini bridge', 'cross-check with gemini', 'analyze this video/audio', 'get gemini opinion', 'use gemini for this', or when Claude recognizes a task falls in Gemini's strength areas (abstract reasoning benchmarks, native multimodal). |
Gemini Bridge Skill
Call Gemini 3.1 Pro / 3 Flash via OpenRouter API for tasks where Gemini has an edge.
When to Use
| Scenario | Why Gemini |
|---|
| Video/audio analysis | Claude can't process video/audio natively |
| Abstract logic puzzles | Gemini 3.1 Pro leads ARC-AGI-2 (77.1%) |
| Cross-validation | Second opinion on reasoning/code review |
When NOT to Use
| Scenario | Why Not |
|---|
| UI/frontend code generation | Gemini hallucinates non-existent library APIs, icon names, and CSS syntax — produces code that won't render in sandbox environments |
Setup
Requires the OPENROUTER_API_KEY environment variable to be set. Configure it in your shell profile or Claude Code settings.
Usage
Script location: ~/.claude/skills/gemini-bridge/scripts/gemini.py
Text Reasoning
python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py "Solve: if all A are B, and some B are C, what can we conclude about A and C?"
With System Prompt
python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py "Review this function for edge cases" \
--system "You are a senior engineer. Be thorough and specific."
Image Analysis
python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py "What's in this image?" \
--file /path/to/photo.jpg
Audio Analysis
python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py "Transcribe and summarize this audio" \
--file /path/to/lecture.mp3
Video Analysis
python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py "Describe what happens in this video" \
--file /path/to/clip.mp4
Multiple Files
python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py "Compare these two designs" \
--file design_a.png --file design_b.png
JSON Output
python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py "List the top 5 issues as JSON" --json
Use Flash Model (faster, cheaper)
python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py "Quick factual question" --model flash
Pipe Long Prompts via stdin
cat analysis_prompt.txt | python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py --stdin --file data.png
CLI Reference
| Flag | Short | Default | Description |
|---|
prompt | (positional) | — | Text prompt |
--file | -f | — | File path (repeatable) |
--model | -m | pro | pro or flash |
--system | -s | — | System prompt |
--json | -j | off | Request JSON output |
--temperature | -t | — | Sampling temperature |
--max-tokens | — | 8192 | Max output tokens |
--stdin | — | off | Read prompt from stdin |
Output
- Response text prints to stdout (pipe-friendly)
- Token usage and model info prints to stderr
- Exit code 0 on success, 1 on error
Integration Patterns
Cross-validation (Claude asks Gemini, then synthesizes)
GEMINI_ANSWER=$(python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py \
"Solve this step by step: [problem]" --model pro)
Multimodal preprocessing
python3 ~/.claude/skills/gemini-bridge/scripts/gemini.py \
"Extract all text, timestamps, and key visual events from this video as structured JSON" \
--file video.mp4 --json > /tmp/video_analysis.json
Notes
- Max file size: 50MB per file
- Supported: image/, audio/, video/*
- Video analysis is Gemini-exclusive — Claude cannot do this natively
- Token usage is logged to stderr for cost tracking
- The 300s timeout accommodates large multimodal payloads