/gemini-review
Google Gemini CLI code review with Gemini 2.5 Pro, 1M token context, CI/CD integration
$ npx -y skills add alinaqi/claude-bootstrap --skill gemini-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/gemini-review
Context preview
The summary Claude sees to decide when to auto-load this skill.
Google Gemini CLI code review with Gemini 2.5 Pro, 1M token context, CI/CD integration
SKILL.md
gemini-review.SKILL.mdname: gemini-review
description: Google Gemini CLI code review with Gemini 2.5 Pro, 1M token context, CI/CD integration
when-to-use: When user requests Gemini-powered code review or needs large-context review
user-invocable: true
effort: medium
Google Gemini Code Review Skill
Use Google's Gemini CLI for code review with Gemini 2.5 Pro - featuring a massive 1M token context window that can analyze entire repositories at once.
**Sources:** [Gemini CLI](https://github.com/google-gemini/gemini-cli) | [Code Review Extension](https://github.com/gemini-cli-extensions/code-review) | [Gemini Code Assist](https://codeassist.google/) | [GitHub Action](https://github.com/google-github-actions/run-gemini-cli)
---
Why Gemini for Code Review?
| Feature | Benefit | |---------|---------| | **Gemini 2.5 Pro** | State-of-the-art reasoning for code | | **1M token context** | Entire repositories fit - no chunking needed | | **Free tier** | 1,000 requests/day with Google account | | **Consistent output** | Clean formatting, predictable structure | | **GitHub native** | Gemini Code Assist app for auto PR reviews |
Benchmark Performance
| Benchmark | Score | Notes | |-----------|-------|-------| | SWE-Bench Verified | 63.8% | Agentic coding benchmark | | Qodo PR Benchmark | 56.3% | PR review quality | | LiveCodeBench v5 | 70.4% | Code generation | | WebDev Arena | #1 | Web development |
---
Installation
Prerequisites
# Check Node.js version (requires 20+)
node --version
# Install Node.js 20 if needed
# macOS
brew install node@20
# Or via nvm
nvm install 20
nvm use 20
Install Gemini CLI
# Via npm (recommended)
npm install -g @google/gemini-cli
# Via Homebrew (macOS)
brew install gemini-cli
# Or run without installing
npx @google/gemini-cli
# Verify installation
gemini --version
Install Code Review Extension
# Requires Gemini CLI v0.4.0+
gemini extensions install https://github.com/gemini-cli-extensions/code-review
# Verify extension
gemini extensions list
---
Authentication
Option 1: Google Account (Recommended)
**Free tier: 1,000 requests/day, 60 requests/min**
# Run gemini and follow browser login
gemini
# Select: "Login with Google Account"
# Opens browser for OAuth
This gives you access to Gemini 2.5 Pro with the full 1M token context window.
Option 2: Gemini API Key
**Free tier: 100 requests/day**
# Get API key from https://aistudio.google.com/apikey
# Set environment variable
export GEMINI_API_KEY="your-api-key"
# Or add to shell profile
echo 'export GEMINI_API_KEY="your-api-key"' >> ~/.zshrc
# Run Gemini
gemini
Option 3: Vertex AI (Enterprise)
# For Google Cloud projects
export GOOGLE_API_KEY="your-api-key"
export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT="your-project-id"
gemini
---
Interactive Code Review
Using the Code Review Extension
# Start Gemini CLI
gemini
# Run code review on current branch
/code-review
The extension analyzes:
- Code changes on your current branch
- Identifies quality issues
- Suggests fixes
Manual Review Prompts
# In interactive mode
gemini
# Then ask:
> Review the changes in this branch for bugs and security issues
> Analyze src/api/users.ts for potential vulnerabilities
> What are the code quality issues in the last 3 commits?
---
Headless Mode (Automation)
Basic Usage
# Simple prompt execution
gemini -p "Review the code changes for bugs and security issues"
# With JSON output (for parsing)
gemini -p "Review the changes" --output-format json
# Stream JSON events (real-time)
gemini -p "Review and fix issues" --output-format stream-json
# Specify model
gemini -m gemini-2.5-pro -p "Deep code review of this PR"
Full CI/CD Example
# Get diff and review
git diff origin/main...HEAD > diff.txt
gemini -p "Review this code diff for:
1. Security vulnerabilities
2. Performance issues
3. Code quality problems
4. Missing error handling
Diff:
$(cat diff.txt)
" --output-format json > review.json
Session Tracking
# Track token usage and costs
gemini -p "Review changes" --session-summary metrics.json
# View metrics
cat metrics.json
---
GitHub Integration
Option 1: Gemini Code Assist App (Easiest)
Install from [GitHub Marketplace](https://github.com/marketplace/gemini-code-assist):
1. Go to GitHub Marketplace → Gemini Code Assist 2. Click "Install" and select repositories 3. PRs automatically get reviewed when opened
**Commands in PR comments:**
/gemini review # Request code review
/gemini summary # Get PR summary
/gemini help # Show available commands
**Quota:**
- Free: 33 PRs/day
- Enterprise: 100+ PRs/day
Option 2: GitHub Action
# .github/workflows/gemini-review.yml
name: Gemini Code Review
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Gemini CLI
run: npm install -g @google/gemini-cli
- name: Run Review
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
# Get diff
git diff origin/${{ github.base_ref }}...HEAD > diff.txt
# Run Gemini review
gemini -p "Review this pull request diff for bugs, security issues, and code quality problems. Be specific about file names and line numbers.
$(cat diff.txt)" > review.md
- name: Post Review Comment
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const review = fs.readFileSync('review.md', 'utf8');
github.rest.issRead more
name: gemini-review description: Google Gemini CLI code review with Gemini 2.5 Pro, 1M token context, CI/CD integration when-to-use: When user requests Gemini-powered code review or needs large-context review user-invocable: true effort: medium
Google Gemini Code Review Skill
Use Google's Gemini CLI for code review with Gemini 2.5 Pro - featuring a massive 1M token context window that can analyze entire repositories at once.
**Sources:** [Gemini CLI](https://github.com/google-gemini/gemini-cli) | [Code Review Extension](https://github.com/gemini-cli-extensions/code-review) | [Gemini Code Assist](https://codeassist.google/) | [GitHub Action](https://github.com/google-github-actions/run-gemini-cli)
---
Why Gemini for Code Review?
| Feature | Benefit | |---------|---------| | **Gemini 2.5 Pro** | State-of-the-art reasoning for code | | **1M token context** | Entire repositories fit - no chunking needed | | **Free tier** | 1,000 requests/day with Google account | | **Consistent output** | Clean formatting, predictable structure | | **GitHub native** | Gemini Code Assist app for auto PR reviews |
Benchmark Performance
| Benchmark | Score | Notes | |-----------|-------|-------| | SWE-Bench Verified | 63.8% | Agentic coding benchmark | | Qodo PR Benchmark | 56.3% | PR review quality | | LiveCodeBench v5 | 70.4% | Code generation | | WebDev Arena | #1 | Web development |
---
Installation
Prerequisites
# Check Node.js version (requires 20+) node --version # Install Node.js 20 if needed # macOS brew install node@20 # Or via nvm nvm install 20 nvm use 20
Install Gemini CLI
# Via npm (recommended) npm install -g @google/gemini-cli # Via Homebrew (macOS) brew install gemini-cli # Or run without installing npx @google/gemini-cli # Verify installation gemini --version
Install Code Review Extension
# Requires Gemini CLI v0.4.0+ gemini extensions install https://github.com/gemini-cli-extensions/code-review # Verify extension gemini extensions list
---
Authentication
Option 1: Google Account (Recommended)
**Free tier: 1,000 requests/day, 60 requests/min**
# Run gemini and follow browser login gemini # Select: "Login with Google Account" # Opens browser for OAuth
This gives you access to Gemini 2.5 Pro with the full 1M token context window.
Option 2: Gemini API Key
**Free tier: 100 requests/day**
# Get API key from https://aistudio.google.com/apikey # Set environment variable export GEMINI_API_KEY="your-api-key" # Or add to shell profile echo 'export GEMINI_API_KEY="your-api-key"' >> ~/.zshrc # Run Gemini gemini
Option 3: Vertex AI (Enterprise)
# For Google Cloud projects export GOOGLE_API_KEY="your-api-key" export GOOGLE_GENAI_USE_VERTEXAI=true export GOOGLE_CLOUD_PROJECT="your-project-id" gemini
---
Interactive Code Review
Using the Code Review Extension
# Start Gemini CLI gemini # Run code review on current branch /code-review
The extension analyzes:
- Code changes on your current branch
- Identifies quality issues
- Suggests fixes
Manual Review Prompts
# In interactive mode gemini # Then ask: > Review the changes in this branch for bugs and security issues > Analyze src/api/users.ts for potential vulnerabilities > What are the code quality issues in the last 3 commits?
---
Headless Mode (Automation)
Basic Usage
# Simple prompt execution gemini -p "Review the code changes for bugs and security issues" # With JSON output (for parsing) gemini -p "Review the changes" --output-format json # Stream JSON events (real-time) gemini -p "Review and fix issues" --output-format stream-json # Specify model gemini -m gemini-2.5-pro -p "Deep code review of this PR"
Full CI/CD Example
# Get diff and review git diff origin/main...HEAD > diff.txt gemini -p "Review this code diff for: 1. Security vulnerabilities 2. Performance issues 3. Code quality problems 4. Missing error handling Diff: $(cat diff.txt) " --output-format json > review.json
Session Tracking
# Track token usage and costs gemini -p "Review changes" --session-summary metrics.json # View metrics cat metrics.json
---
GitHub Integration
Option 1: Gemini Code Assist App (Easiest)
Install from [GitHub Marketplace](https://github.com/marketplace/gemini-code-assist):
1. Go to GitHub Marketplace → Gemini Code Assist 2. Click "Install" and select repositories 3. PRs automatically get reviewed when opened
**Commands in PR comments:**
/gemini review # Request code review /gemini summary # Get PR summary /gemini help # Show available commands
**Quota:**
- Free: 33 PRs/day
- Enterprise: 100+ PRs/day
Option 2: GitHub Action
# .github/workflows/gemini-review.yml
name: Gemini Code Review
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Gemini CLI
run: npm install -g @google/gemini-cli
- name: Run Review
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
# Get diff
git diff origin/${{ github.base_ref }}...HEAD > diff.txt
# Run Gemini review
gemini -p "Review this pull request diff for bugs, security issues, and code quality problems. Be specific about file names and line numbers.
$(cat diff.txt)" > review.md
- name: Post Review Comment
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const review = fs.readFileSync('review.md', 'utf8');
github.rest.issTurn Claude Code into a self-reviewing, test-enforced engineering system that remembers context across sessions — then route work across 13 models from a single dashboard.
Repo: alinaqi/claude-bootstrap
Other skills on maggy.
- /aeo-optimization
AI Engine Optimization - semantic triples, page templates, content clusters for AI citations
Open skill - /agent-teams
Claude Code Agent Teams - default team-based development with strict TDD pipeline enforcement
Open skill - /agentic-development
Build AI agents with Pydantic AI (Python) and Claude SDK (Node.js)
Open skill - /ai-models
Latest AI models reference - Claude, OpenAI, Gemini, Eleven Labs, Replicate
Open skill - /android-java
Android Java development with MVVM, ViewBinding, and Espresso testing
Open skill - /android-kotlin
Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing
Open skill

