惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
H
Help Net Security
雷峰网
雷峰网
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
美团技术团队
GbyAI
GbyAI
博客园_首页
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
I
InfoQ
小众软件
小众软件
Google DeepMind News
Google DeepMind News
D
Docker
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Stop Choosing One AI Coding Assistant: How I Pair Gemini ...
Onur Cinar · 2026-05-03 · via DEV Community
Cover image for Stop Choosing One AI Coding Assistant: How I Pair Gemini CLI and OpenCode for Better Code

Onur Cinar

If you’re like me, you’ve toggled between AI coding assistants trying to find the "best" one. Gemini generates features fast, while OpenCode’s models are good for catching edge cases. But why choose?

I built a custom workflow using Gemini CLI to orchestrate three specialized agents that bridge these two worlds. Here’s how I get the best of both: Gemini's speed for implementation and OpenCode's rigor for review.

The Three-Agent Setup

My .agents directory contains three distinct roles. The magic of Gemini CLI is its ability to not only write code but also manage other CLIs and agents:

  1. code-writer (Gemini-powered): The primary builder. It handles the heavy lifting of implementation and iterates on feedback.
  2. opencode-code-reviewer (Gemini-powered): The "Bridge Agent." This Gemini agent knows how to run the opencode CLI, capture its feedback, and hand it back to the writer.
  3. code-reviewer (OpenCode-powered): The "Expert Reviewer." This is the native agent inside OpenCode that provides the actual technical critique.

The Workflow (Step by Step)

This setup allows me to move from an issue to a verified PR with just two main commands:

Step 1: Implementation

I start by asking Gemini to implement the feature:

Use the code-writer to implement ISSUE-1

Enter fullscreen mode Exit fullscreen mode

The code-writer generates the initial code, runs local tests, and ensures everything is idiomatic.

Step 2: The Cross-Model Bridge

Next, I trigger the review. This is where it gets interesting:

Use the opencode-code-reviewer to review the 
changes and ask code-writer to address them.

Enter fullscreen mode Exit fullscreen mode

Under the hood, the Bridge Agent does the following:

  1. Executes opencode run --agent code-reviewer to get a deep-dive analysis.
  2. Captures the feedback (Status, Summary, Action Items).
  3. Invokes the code-writer again, passing the OpenCode feedback as the new instructions.

Step 3: Iterate until Approved

The loop repeats automatically or manually until the OpenCode reviewer returns an "APPROVED" status.

Why This Works

  • Model Diversity: Different models have different blind spots. Having a Gemini agent write code and an OpenCode agent review it catches bugs that a single model might miss during self-review.
  • Automated Orchestration: Gemini CLI handles the tool-calling and context-passing. You don't have to copy-paste code into different web UIs.
  • Specialization: You use the best tool for each job.

The Source Code

Here is the core of the setup. You can drop these into your .agents/ folder and customize them for your own models.

1. .agents/code-writer.md

---
name: code-writer
tools: ["write", "edit", "bash"]
---
# Code Writer Agent
You are an expert Google engineer. Implement features, write tests, and address feedback from the reviewer agents.

Enter fullscreen mode Exit fullscreen mode

2. .agents/opencode-code-reviewer.md

---
name: opencode-code-reviewer
tools: ["run_shell_command", "invoke_agent"]
---
# Bridge Agent
1. Run: `opencode run --agent code-reviewer "Review changes..."`
2. Capture output.
3. Call `code-writer` with that output to fix any issues.

Enter fullscreen mode Exit fullscreen mode

3. .agents/code-reviewer.md

---
name: code-reviewer
---
# Expert Reviewer
You are an expert Google engineer. Provide a structured review with Status (APPROVED/CHANGES_REQUESTED), Summary, and Action Items.

Enter fullscreen mode Exit fullscreen mode


Leveraging multiple AI tools via a single CLI changed how I build. It’s not about finding the "one" assistant; it's about building the right team.