gemini-gpt-hybrid
NEWBIE0413 · NEWBIE0413/gemini-gpt-hybrid
Subagent này điều phối các nhiệm vụ giữa Claude, Gemini và GPT dựa trên phạm vi công việc, chuyển phân tích quy mô lớn cho Gemini và công việc tập trung cho GPT, với Claude xem xét.
Multi-model orchestration subagents for Claude Code — delegates by task scope to Gemini's 1M-token context or GPT's fast iteration, then routes every result back through Claude review.
Xem trước
Bạn có thể làm gì với nó
- Thực hiện kiểm tra bảo mật trên toàn bộ codebase bằng cửa sổ ngữ cảnh lớn của Gemini.
- Gỡ lỗi nhanh các hàm hoặc tệp cụ thể bằng khả năng lặp lại nhanh hơn của GPT.
- Đảm bảo tất cả code do AI tạo ra được Claude xem xét về bảo mật và chất lượng trước khi xuất ra.
Kiểm tra an toàn
Không thấy dấu hiệu rủi ro trong các file đã quét.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
Gemini-GPT Hybrid
Multi-model orchestration subagents for Claude Code.
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]
| Signal | Routed to | Why |
|---|---|---|
| Whole-repo audits, architecture reviews, sweeping refactors | Gemini | 1M+ token context holds the entire codebase at once |
| Single-file debugging, focused features, tight loops | GPT | Faster turnaround on narrow, well-scoped work |
| Anything that produces code | Claude review pass | Security 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
| Soft | Hard | |
|---|---|---|
| Writes code | Claude | External model |
| Review before write | Yes | No |
| Speed | Moderate | Fast |
| Rollback | Straightforward | Git only |
| Backup | Recommended | Required |
| Best for | Production | Experiments |
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
License
MIT — see LICENSE.
Built by Seol Seunghyeon. Runs on Claude, Gemini, and GPT.