You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`/codex:review` for a normal read-only Codex review
13
17
-`/codex:adversarial-review` for a steerable challenge review
14
18
-`/codex:rescue`, `/codex:status`, `/codex:result`, and `/codex:cancel` to delegate work and manage background jobs
15
19
20
+
### Gemini commands
21
+
22
+
-`/gemini:review` for a read-only Gemini code review
23
+
-`/gemini:adversarial-review` for a steerable adversarial review powered by Gemini
24
+
-`/gemini:setup` to check Gemini CLI availability and authentication
25
+
16
26
## Requirements
17
27
18
-
-**ChatGPT subscription (incl. Free) or OpenAI API key.**
19
-
- Usage will contribute to your Codex usage limits. [Learn more](https://developers.openai.com/codex/pricing).
20
28
-**Node.js 18.18 or later**
29
+
-**For Codex commands:** ChatGPT subscription (incl. Free) or OpenAI API key. Usage will contribute to your Codex usage limits. [Learn more](https://developers.openai.com/codex/pricing).
30
+
-**For Gemini commands:** Google account with Gemini access.
21
31
22
32
## Install
23
33
24
-
Add the marketplace in Claude Code:
34
+
### Option A: Install from this fork via marketplace (includes both Codex and Gemini)
claude --plugin-dir ./plugins/codex --plugin-dir ./plugins/gemini
64
+
```
65
+
66
+
Or load only the plugin you need:
67
+
68
+
```bash
69
+
claude --plugin-dir ./plugins/codex # Codex only
70
+
claude --plugin-dir ./plugins/gemini # Gemini only
71
+
```
72
+
73
+
### Option C: Install Codex plugin from official marketplace (Codex only)
74
+
75
+
If you only need the original Codex plugin, install from the official marketplace:
76
+
77
+
```bash
78
+
/plugin marketplace add openai/codex-plugin-cc
79
+
/plugin install codex@openai-codex
80
+
/reload-plugins
81
+
```
82
+
83
+
> [!NOTE]
84
+
> The official marketplace only includes the Codex plugin. The Gemini plugin is available through this fork (Option A or B).
85
+
86
+
### Post-install setup
87
+
88
+
For Codex, run:
43
89
44
90
```bash
45
91
/codex:setup
@@ -59,10 +105,28 @@ If Codex is installed but not logged in yet, run:
59
105
!codex login
60
106
```
61
107
108
+
For Gemini, run:
109
+
110
+
```bash
111
+
/gemini:setup
112
+
```
113
+
114
+
If Gemini CLI is not installed:
115
+
116
+
```bash
117
+
npm install -g @google/gemini-cli
118
+
```
119
+
120
+
If Gemini CLI is installed but not authenticated, start the login flow:
121
+
122
+
```bash
123
+
!gemini
124
+
```
125
+
62
126
After install, you should see:
63
127
64
-
- the slash commands listed below
65
-
- the `codex:codex-rescue` subagent in `/agents`
128
+
- the Codex slash commands (`/codex:*`) and the `codex:codex-rescue` subagent in `/agents`
129
+
- the Gemini slash commands (`/gemini:*`)
66
130
67
131
One simple first run is:
68
132
@@ -303,3 +367,128 @@ Yes. If you already use Codex, the plugin picks up the same [configuration](#com
303
367
Yes. Because the plugin uses your local Codex CLI, your existing sign-in method and config still apply.
304
368
305
369
If you need to point the built-in OpenAI provider at a different endpoint, set `openai_base_url` in your [Codex config](https://developers.openai.com/codex/config-advanced/#config-and-state-locations).
370
+
371
+
---
372
+
373
+
# Gemini plugin for Claude Code
374
+
375
+
Use Google Gemini CLI from inside Claude Code for code reviews.
376
+
377
+
This plugin is for Claude Code users who want to use Gemini as an additional review tool alongside or instead of Codex.
378
+
379
+
See the [Install](#install) section above for setup instructions.
380
+
381
+
## Usage
382
+
383
+
### `/gemini:review`
384
+
385
+
Runs a standard Gemini code review on your current work. The review runs in read-only mode (`--approval-mode plan`) and will not modify any files.
386
+
387
+
> [!NOTE]
388
+
> Code review for multi-file changes might take a while. It's generally recommended to run it in the background.
389
+
390
+
Use it when you want:
391
+
392
+
- a review of your current uncommitted changes
393
+
- a review of your branch compared to a base branch like `main`
394
+
395
+
Use `--base <ref>` for branch review. It also supports `--wait` and `--background`.
396
+
397
+
Examples:
398
+
399
+
```bash
400
+
/gemini:review
401
+
/gemini:review --base main
402
+
/gemini:review --background
403
+
/gemini:review --model gemini-2.5-pro --wait
404
+
```
405
+
406
+
This command is read-only and will not perform any changes.
407
+
408
+
### `/gemini:adversarial-review`
409
+
410
+
Runs a **steerable** adversarial review that questions the chosen implementation and design.
411
+
412
+
It can be used to pressure-test assumptions, tradeoffs, failure modes, and whether a different approach would have been safer or simpler.
413
+
414
+
It uses the same review target selection as `/gemini:review`, including `--base <ref>` for branch review.
415
+
It also supports `--wait`, `--background`, and `--model <model>`. Unlike `/gemini:review`, it can take extra focus text after the flags.
416
+
417
+
Use it when you want:
418
+
419
+
- a review before shipping that challenges the direction, not just the code details
420
+
- review focused on design choices, tradeoffs, hidden assumptions, and alternative approaches
421
+
- pressure-testing around specific risk areas like auth, data loss, rollback, race conditions, or reliability
422
+
423
+
Examples:
424
+
425
+
```bash
426
+
/gemini:adversarial-review
427
+
/gemini:adversarial-review --base main challenge whether this was the right caching design
428
+
/gemini:adversarial-review --model gemini-2.5-pro --wait look for race conditions
429
+
/gemini:adversarial-review --background
430
+
```
431
+
432
+
This command is read-only. It does not fix code.
433
+
434
+
### `/gemini:setup`
435
+
436
+
Checks whether Gemini CLI is installed and authenticated.
The Gemini plugin invokes the [Gemini CLI](https://github.com/google-gemini/gemini-cli) in headless mode (`gemini -p <prompt> --approval-mode plan`). Each review spawns a single `gemini` process that runs to completion.
471
+
472
+
Review context (git diff, file contents) is piped via stdin with randomized boundary tags to prevent prompt injection. The instruction prompt is passed via the `-p` flag.
473
+
474
+
The plugin reuses shared infrastructure from the Codex plugin for git context collection, argument parsing, and workspace resolution.
475
+
476
+
## Gemini FAQ
477
+
478
+
### Do I need a Google Cloud account?
479
+
480
+
No. Gemini CLI authenticates with a standard Google account. Run `gemini` interactively once to complete the login flow.
481
+
482
+
### What model does it use by default?
483
+
484
+
Gemini CLI uses its own default model (currently `gemini-2.0-pro-exp-02-05` as of CLI version 0.36.0). You can override it with `--model <model-name>` on any review command.
485
+
486
+
### Can I use both Codex and Gemini plugins together?
487
+
488
+
Yes. Load both plugins with:
489
+
490
+
```bash
491
+
claude --plugin-dir ./plugins/codex --plugin-dir ./plugins/gemini
492
+
```
493
+
494
+
The commands use different prefixes (`/codex:*` and `/gemini:*`) so they do not conflict.
description: Use proactively when the user asks to review code with Gemini, run a Gemini code review, run a Gemini adversarial review, or mentions "gemini review", "gemini adversarial-review", or "use gemini to review". This agent handles all Gemini CLI review operations.
4
+
tools: Bash
5
+
---
6
+
7
+
You are a forwarding wrapper around the Gemini companion review runtime.
8
+
9
+
Your job is to invoke the correct Gemini review command based on the user's request. Do not do anything else.
10
+
11
+
Selection guidance:
12
+
13
+
- Use this subagent when the user mentions Gemini and review in the same request.
14
+
- This includes: "use gemini to review", "gemini review", "gemini adversarial review", "use gemini:review", "use gemini:adversarial-review", or any natural language request to perform a code review using Gemini.
15
+
- Do not use this agent for non-review tasks. Gemini plugin only supports review operations.
16
+
17
+
Review type detection:
18
+
19
+
- If the user mentions "adversarial", "challenge", "question the design", "pressure test", or provides focus text describing what to challenge, use `adversarial-review`.
20
+
- Otherwise, use `review`.
21
+
22
+
Argument handling:
23
+
24
+
-`--model <model>`: Pass through if the user specifies a model name (e.g., `--model gemini-2.5-pro`, `--model gemini-3.1-pro-preview`).
25
+
-`--base <ref>`: Pass through if the user specifies a base branch (e.g., `--base main`).
26
+
-`--scope <scope>`: Pass through if specified. Valid values: `auto`, `working-tree`, `branch`.
27
+
-`--wait` / `--background`: If the user does not specify, prefer `--wait` for small reviews, omit for larger ones to let the script decide.
28
+
- Focus text: For adversarial reviews, any extra descriptive text from the user (e.g., "look for race conditions") should be passed as positional arguments after the flags.
29
+
- IMPORTANT: When inserting arguments into the shell command, always wrap them in single quotes to prevent bash command substitution.
30
+
31
+
Forwarding rules:
32
+
33
+
- Use exactly one `Bash` call to invoke the companion script.
0 commit comments