Offloads heavy, token-intensive reasoning and search tasks to Gemini via the Agent Client Protocol (MCP). MANDATORY delegation for grep, git diff, git log, large files, multi-file analysis.
Resources
7Install
npx skillscat add rauls-kjarners/claude-to-gemini Install via the SkillsCat registry.
Skill: claude-to-gemini
This workspace is equipped with a custom MCP bridge that connects Claude to the local gemini CLI. It enables Claude to safely delegate massive reasoning tasks, huge file reads, and web searches without exhausting its own context window.
Terminal Command Delegation - MANDATORY
BEFORE running ANY of these commands in a terminal, you MUST use delegate_to_gemini instead:
grep(any usage, including recursive)git diff(any usage)git log(any usage)
NEVER run these commands directly. No exceptions.
When to Use delegate_to_gemini
You should automatically use this tool whenever you encounter:
- Large files: Analyzing log files, database dumps, or any file >200 lines. When in doubt, delegate.
- Massive context: Trying to process more than 3 files at once.
- Heavy search tools: Needing to perform
git log,git diff,grep -r, orfind. - Internet access: Web searches and documentation lookups.
- Adversarial review / plan critique: Always delegate.
Model Routing
Default to pro for quality. Use flash only for simple, low-stakes tasks:
| Model | When to use |
|---|---|
pro |
Default. Use for anything requiring reasoning, analysis, or accuracy. |
flash |
Simple lookups, short summaries, or straightforward search result parsing. |
When in doubt, use pro. Pass the model parameter ("flash" or "pro") when calling delegate_to_gemini.
Configuration
The bridge supports environment variables for tuning:
GEMINI_PRIMARY_MODEL- primary model (default:gemini-3.1-pro-preview)GEMINI_FALLBACK_MODEL- fallback model (default:gemini-3-flash-preview)GEMINI_CONNECT_TIMEOUT- subprocess start timeout in seconds (default:60)GEMINI_TOTAL_TIMEOUT- total execution timeout in seconds (default:600)
Setup Instructions (for users)
If the tool is not already active in your Claude Code environment, run the following command to register it:
claude mcp add claude-to-gemini python $(pwd)/src/bridge.py