← All writing

Stop Using a Ferrari to Deliver Pizza

How I Hybridized Claude and Gemini to Save My Runway

How I Hybridized Claude and Gemini to Save My Runway

When you are bootstrapping a platform as complex as an AI-powered memoir engine, you become hyper-aware of two resources: Time and Compute.

I have been living inside the terminal, pairing with Claude Opus. As an architectural partner, Opus is unrivaled. It reasons through complex state management and database schemas like a senior staff engineer. But last week, I looked at my API usage and realized something horrifying.

I was paying “Staff Engineer” rates for “Intern” work.

I was burning Opus tokens (at $15/million inputs) just to search my file tree, summarize documentation, or find where a specific variable was defined. I was using a Ferrari to deliver pizza.

If I wanted to survive until the launch without vaporizing my runway, I needed a change. I didn’t fire Claude; I gave him a team of scouts.

The “General and The Scout” Architecture

In the military (and in effective engineering organizations) you don’t send the General to recon the hill. You send a Scout. The General waits for the report, then makes the strategic decision.

I realized I could architect the same hierarchy inside my IDE using the Model Context Protocol (MCP).

I built a “Sidecar” integration that forces my environment to delegate tasks based on cost and complexity:

  1. The Scout (Gemini 3 Flash): Costs ~$0.50/1M tokens (50x cheaper than Claude). It handles the grunt work: “Find all files with auth logic,” “Summarize this directory,” or “Locate this function.” It is fast, cheap, and disposable.
  2. The Captain (Claude Sonnet): The execution arm. It writes the code, manages git operations, and implements the features.
  3. The General (Claude Opus): The strategist. It steps in only for high-level planning (“OpusPlan”) and architectural disputes.

The Circuit Breaker

The risk of multi-model orchestration is fragility. What happens if the Gemini API throttles or hallucinations creep in?

I didn’t just script a hand-off; I built a Circuit Breaker.

If Gemini hits a rate limit or fails to return a structured JSON response, the system doesn’t crash. It silently “trips” the breaker and falls back to Claude Haiku or Sonnet. The developer experience is seamless : I ask for a file search, and the system just gets it done, using the cheapest available route automatically.

The Result: 80% Cost Reduction

The impact on my workflow was immediate.

  • Before: I ask Claude to “Refactor the auth service.” Claude burns 50k tokens reading the entire directory structure just to find three files. Cost: High. Speed: Slow.
  • Now: The system automatically dispatches Gemini Flash to map the directory. It returns a concise summary to Claude. Claude executes the refactor. Cost: Pennies. Speed: Instant.

This isn’t just about saving money. It’s about flow. Gemini Flash is so fast that the “scouting” phase feels instantaneous.

The “God Prompt” (One-Shot Setup)

I considered pasting the 200 lines of Node.js and JSON configuration required to set this up, but that defeats the purpose of being an AI engineer. You shouldn’t be copy-pasting code; you should be generating it.

Below is the One-Shot Prompt I wrote.

Paste this directly into Claude Code (or your cursor/editor of choice). It will:

  1. Scaffold the entire MCP server structure.
  2. Install the Google Generative AI SDKs.
  3. Write the logic for the “Scout” delegation and the “Circuit Breaker” safety net.
  4. Configure the Slash Commands (/explore, /research) so you can manually trigger the Scout.

Copy/Paste this into your terminal agent:


I want to set up an efficient multi-model development environment with Claude Code that includes:

Gemini 3 Integration via MCP for context-efficient operations:

Create *.claude/mcp-servers/gemini-helper/* directory structure

Implement an MCP server that provides three tools:

*gemini_explore_codebase* - Uses Gemini 3 Flash for codebase exploration (file searches, pattern matching)

*gemini_summarize_code* - Uses Gemini 3 Flash to read and summarize code files

*gemini_research* - Uses Gemini 3 Pro for research tasks with web access

Implement circuit breaker pattern for graceful fallback to Claude when Gemini hits rate limits

Configure model selection*:* *gemini-3-flash-preview* for lightweight tasks, *gemini-3-pro-preview* for complex tasks

Add retry logic with exponential backoff (max 2 retries)

MCP Configuration (*.claude/mcp.json*):

Configure the gemini-helper MCP server

Use environment variables: *GEMINI_LIGHT_MODEL*, *GEMINI_COMPLEX_MODEL*, *GEMINI_API_KEY*

Set PROJECT_ROOT to workspace folder

OpusPlan Configuration (*.claude/settings.json*):

Set *"model": "opusplan"* to automatically use Opus for plan mode and Sonnet for execution

Slash Commands*:*

*/explore-with-gemini [query]* - Delegate exploration to Gemini Flash

*/research-with-gemini [question]* - Delegate research to Gemini Pro

Package Configuration*:*

Create *package.json* in the gemini-helper directory with *@modelcontextprotocol/sdk* dependency

Key Requirements:

- The MCP server should execute Gemini CLI commands using *child_process.execSync*

- Implement proper error handling for rate limits (429, quota errors, RESOURCE_EXHAUSTED)

- Return fallback instructions to Claude when Gemini is unavailable

- Use 30-second timeout for Gemini CLI calls

- Include clear success/failure indicators in responses (✓ for success, ⚠️ for fallback)

Please implement this complete system now, creating all necessary files and configurations.


Why This Matters

As I move toward the PureTome launch, every efficiency compound. This setup allows me to stay in the “General” mindset (focusing on the vision and the architecture ) while the AI handles the logistics.

If you are building something massive, stop letting your smartest model do the dumbest work.