Sandbox
@NEWBIE0413/gemini-gpt-hybrid

Claude Code subagents for Gemini and GPT routing

This repo packages model choice as a Claude Code subagent. It reads the task scope, sends large jobs to Gemini and tight jobs to GPT, then routes the result back through Claude review.

152 stars14 forksUpdated 1mo ago
Who it's for

Builders who want Claude Code to pick the right model for broad analysis or focused fixes.

What it delivers

You can delegate work to the model that fits the task while keeping Claude as the review gate.

What it does

Scope-based routing

Routes whole-repo audits and sweeping refactors to Gemini, and narrow bug fixes or small features to GPT.

Claude review pass

Sends anything that produces code back through Claude before it reaches your files.

Soft and hard modes

Soft mode keeps external models out of direct writes; hard mode lets them modify the codebase directly.

Installation for Claude Code

Provides copy commands for macOS, Linux, and Windows to install the agent files into `~/.claude/agents/`.

How to get it

  1. 1Setup
    git clone https://github.com/NEWBIE0413/gemini-gpt-hybrid.git
    cd gemini-gpt-hybrid
    
    # macOS / Linux
    cp -r agents ~/.claude/
    
    # Windows
    xcopy agents %USERPROFILE%\.claude\agents\ /E /I
  2. 2Mention the agent in a Claude Code conversation
    @gemini-gpt-hybrid perform a security audit on the entire codebase
  3. 3Large scope — delegates to Gemini.
    @gemini-gpt-hybrid debug the authentication issue in login.js
  4. 4Narrow scope — delegates to GPT.
    @gemini-gpt-hybrid analyze the architecture and implement improvements

README

Gemini-GPT Hybrid

Multi-model orchestration subagents for Claude Code.

License: MIT Stars

One model is rarely the right model for every task. Whole-codebase analysis wants a huge context window; a tight bug fix wants fast iteration. This repo packages that decision as a Claude Code subagent: it reads the scope of your request, delegates to Gemini or GPT accordingly, and routes the result back through Claude before anything reaches your codebase.

How routing works

graph TD
    A[User Request] --> B{Task Analysis}
    B -->|Large Scale| C[Gemini Engine]
    B -->|Focused Work| D[GPT Engine]
    C --> E[Claude Review]
    D --> E
    E -->|Approved| F[User Output]
    E -->|Needs Revision| G[Refinement Loop]
SignalRouted toWhy
Whole-repo audits, architecture reviews, sweeping refactorsGemini1M+ token context holds the entire codebase at once
Single-file debugging, focused features, tight loopsGPTFaster turnaround on narrow, well-scoped work
Anything that produces codeClaude review passSecurity and quality gate before output

Installation

Prerequisites

  • Claude Code
  • Gemini CLI — npm install -g @google/gemini-cli
  • Cursor Agent (for GPT integration)
  • WSL, if you're on Windows

Setup

git clone https://github.com/NEWBIE0413/gemini-gpt-hybrid.git
cd gemini-gpt-hybrid

# macOS / Linux
cp -r agents ~/.claude/

# Windows
xcopy agents %USERPROFILE%\.claude\agents\ /E /I

Verify with ls ~/.claude/agents/ — you should see both agent files.

Usage

Mention the agent in a Claude Code conversation:

@gemini-gpt-hybrid perform a security audit on the entire codebase

Large scope — delegates to Gemini.

@gemini-gpt-hybrid debug the authentication issue in login.js

Narrow scope — delegates to GPT.

@gemini-gpt-hybrid analyze the architecture and implement improvements

Mixed scope — uses both, in sequence.

The two agents

Both live in agents/. They differ in one thing: who is allowed to write to your files.

Soft — gemini-gpt-hybrid-soft.md

External models analyze; Claude writes all code. Gemini and GPT never touch your files directly, so their output can't break anything on its own, and every change goes through Claude's review and your existing coding standards.

Use for production code, critical systems, and anywhere a bad write is expensive.

Hard — gemini-gpt-hybrid-hard.md

External models modify your codebase directly. Much faster, and correspondingly riskier — autonomous generation and sweeping refactors happen without a Claude gate in front of the write.

Use for prototypes, experiments, and throwaway code. Commit first:

git add -A && git commit -m "Backup before hard mode"
git checkout -b experimental

Hard mode can overwrite work. A clean commit beforehand is the only reliable rollback.

Choosing between them

SoftHard
Writes codeClaudeExternal model
Review before writeYesNo
SpeedModerateFast
RollbackStraightforwardGit only
BackupRecommendedRequired
Best forProductionExperiments

A longer decision walkthrough lives in AGENT_SELECTION_GUIDE.md.

Review pass

In soft mode, everything an external model produces goes through Claude before it lands:

External model output
        ↓
Security audit
├─→ Injection surfaces
├─→ Authentication paths
├─→ Data exposure
└─→ Input validation
        ↓
Quality pass
├─→ Structure and cohesion
├─→ Error handling
└─→ Performance characteristics
        ↓
Approved → written to disk

This is a review layer, not a guarantee. It catches common classes of problem; it does not replace your own reading of the diff.

Contributing

Issues and pull requests are welcome — see CONTRIBUTING.md.

If you're adding an agent, follow the structure of the existing two: document the routing logic explicitly, and state which model is permitted to write.

Star history

Star History Chart

License

MIT — see LICENSE.

Built by Seol Seunghyeon. Runs on Claude, Gemini, and GPT.

Files in the repo

Repository payload7 top-level entries
  • agents
  • .gitignore
  • AGENT_SELECTION_GUIDE.md
  • CONTRIBUTING.md
  • LICENSE
  • package.json
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More agents

Hmbown/
Codewhale

Open-source coding agent for your terminal, built in Rust and on a journey of continuous community improvement. Issues and PRs welcome.

41k

A lightweight alternative to OpenClaw that runs in containers for security. Connects to WhatsApp, Telegram, Slack, Discord, Gmail and other messaging apps,, has memory, scheduled jobs, and runs directly on Anthropic's Agents SDK

31k
TokenRhythm/
opensquilla

OpenSquilla — Token-Efficient AI Agent with same budget, higher intelligence density

7k

An open-source AI coding agent that lives in your terminal.

28k
Untrivial-ai/
agent-orchestrator

Run and supervise teams of coding agents from planning to merge. Any harness (Claude code, codex, +25 more). Desktop, web, mobile, and cloud agents.

11k