https://github.com/rsecss/gemini-plugin-cc
Use Gemini from Claude Code to review code or delegate tasks.
https://github.com/rsecss/gemini-plugin-cc
claude-code claude-code-plugin code-review developer-tools gemini gemini-cli google-gemini
Last synced: 1 day ago
JSON representation
Use Gemini from Claude Code to review code or delegate tasks.
- Host: GitHub
- URL: https://github.com/rsecss/gemini-plugin-cc
- Owner: rsecss
- License: apache-2.0
- Created: 2026-04-05T17:30:53.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-06T11:04:37.000Z (2 months ago)
- Last Synced: 2026-04-06T11:17:20.100Z (2 months ago)
- Topics: claude-code, claude-code-plugin, code-review, developer-tools, gemini, gemini-cli, google-gemini
- Language: JavaScript
- Homepage:
- Size: 110 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Notice: NOTICE
Awesome Lists containing this project
README
# Gemini Plugin for Claude Code
Bring Google Gemini into your Claude Code workflow — code review, adversarial review, and task delegation, all from slash commands.
[](LICENSE) [](https://nodejs.org/) [](https://docs.anthropic.com/en/docs/claude-code) [](https://github.com/google-gemini/gemini-cli)
[English](README.md) | [简体中文](README.zh-CN.md)
---
## Why This Plugin?
Claude Code is great. Gemini is great. This plugin lets you use both without leaving your terminal.
- Get a **second opinion** on your code from Gemini before shipping
- **Challenge your design** with adversarial review — pressure-test assumptions, tradeoffs, and failure modes
- **Delegate tasks** to Gemini and keep working in Claude Code while it runs in the background
## Quick Start
### Prerequisites
- [Gemini CLI](https://github.com/google-gemini/gemini-cli) — `npm install -g @google/gemini-cli`
- Node.js 18.18+
### Install
```shell
/plugin marketplace add rsecss/gemini-plugin-cc
/plugin install gemini@gemini-plugin
/reload-plugins
/gemini:setup
```
### First Run
```shell
/gemini:review # review uncommitted changes
/gemini:review --base main # review branch diff against main
/gemini:adversarial-review # challenge your design decisions
/gemini:rescue investigate the bug # hand a task to Gemini
```
## Commands
| Command | Description |
|---------|-------------|
| `/gemini:review` | Structured code review (read-only) |
| `/gemini:adversarial-review` | Steerable challenge review targeting design and tradeoffs |
| `/gemini:rescue` | Delegate a task to Gemini via subagent |
| `/gemini:setup` | Check readiness, manage review gate |
| `/gemini:status` | Show running and recent jobs |
| `/gemini:result` | Show output of a finished job |
| `/gemini:cancel` | Cancel an active background job |
All commands support `--background`, `--wait`, and `-m ` (aliases: `auto`, `pro`, `flash`, `flash-lite`).
### Code Review
```shell
/gemini:review # working tree changes
/gemini:review --base main # branch diff
/gemini:review --background # run in background
```
### Adversarial Review
Goes beyond code correctness — challenges design choices, hidden assumptions, and alternative approaches.
```shell
/gemini:adversarial-review
/gemini:adversarial-review --base main challenge the caching design
/gemini:adversarial-review --background look for race conditions
```
### Task Delegation
```shell
/gemini:rescue investigate why tests are failing
/gemini:rescue -m flash fix the flaky integration test
/gemini:rescue --background redesign the connection pool
```
Check progress with `/gemini:status`, get results with `/gemini:result`, cancel with `/gemini:cancel`.
## Review Gate (Optional)
When enabled, a `Stop` hook triggers a targeted Gemini review on each Claude response. If issues are found, the stop is blocked so Claude can address them first.
```shell
/gemini:setup --enable-review-gate
/gemini:setup --disable-review-gate
```
> **Warning:** This can create a long-running Claude/Gemini loop and may drain usage limits quickly. Only enable when actively monitoring.
## Architecture
Thin-forwarder pattern — no broker, no daemon:
```
Slash command → gemini-companion.mjs → lib/gemini.mjs → gemini -o stream-json (stdin)
```
- **File-lock concurrency** instead of a broker process
- **Three-layer JSON extraction**: prompt engineering → JSON block → plain-text fallback
- **Activity-based timeout**: resets on each stream event, 30min hard ceiling
- **Full Windows support**: shell spawning, UNC paths, taskkill, EAGAIN-safe reads
## FAQ
**Do I need a separate account?**
No. The plugin uses your local Gemini CLI authentication. Run `gemini` interactively to sign in, or set `GEMINI_API_KEY`.
**Can I choose a different model?**
Yes. Pass `-m ` to any command. If a model is unavailable, the plugin suggests alternatives.
## Community
This project is shared with the [LINUX DO](https://linux.do/) community.
## Acknowledgments
Built on the architecture of [openai/codex-plugin-cc](https://github.com/openai/codex-plugin-cc). Key adaptations: direct Gemini CLI invocation via file-lock concurrency, three-layer JSON extraction for free-form output, and comprehensive Windows compatibility fixes.
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, code style, and pull request guidelines.
## License
[Apache License 2.0](LICENSE)