Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
alinaqi avatar

Gemini Review

  • 4 installs
  • 706 repo stars
  • Updated July 14, 2026
  • alinaqi/maggy

gemini-review is a Claude Code skill that runs Google Gemini CLI code reviews with Gemini 2.5 Pro and a 1M token context window.

About

This skill runs code reviews with Google's Gemini CLI using Gemini 2.5 Pro and its 1M token context window, letting it analyze large codebases without chunking. It covers installing the CLI and code-review extension, authentication options, interactive and headless review, and GitHub integration. A developer uses it when they want a Gemini-powered or large-context review.

  • Reviews code with Google Gemini CLI and Gemini 2.5 Pro
  • 1M token context can analyze entire repositories at once
  • Headless mode plus GitHub PR integration via Code Assist

Gemini Review by the numbers

  • 4 all-time installs (skills.sh)
  • Ranked #901 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

gemini-review capabilities & compatibility

Free tier of 1,000 requests/day with a Google account; a Gemini API key or Vertex AI can also be used.

Capabilities
code review · security audit
Works with
github · gcp
Use cases
code review · security audit · ci cd
Pricing
Freemium
From the docs

What gemini-review says it does

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.
SKILL.md
Free tier: 1,000 requests/day, 60 requests/min
SKILL.md
npx skills add https://github.com/alinaqi/maggy --skill gemini-review

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs4
repo stars706
Last updatedJuly 14, 2026
Repositoryalinaqi/maggy

What it does

Review a branch or large codebase with the Gemini CLI and its 1M token context for bugs, security, and quality issues.

Who is it for?

Reviewing large codebases or PRs where a 1M token context avoids chunking, with a free daily tier.

Skip if: Users without Node.js 20+ or a Google account/API key to authenticate the Gemini CLI.

When should I use this skill?

When a developer requests a Gemini-powered code review or needs a large-context review.

What you get

Entire repositories are reviewed in one pass using Gemini's 1M token context.

By the numbers

  • 1M token context window
  • 1,000 requests/day free tier

Files

SKILL.mdMarkdownGitHub ↗

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 | Code Review Extension | Gemini Code Assist | GitHub Action

---

Why Gemini for Code Review?

FeatureBenefit
Gemini 2.5 ProState-of-the-art reasoning for code
1M token contextEntire repositories fit - no chunking needed
Free tier1,000 requests/day with Google account
Consistent outputClean formatting, predictable structure
GitHub nativeGemini Code Assist app for auto PR reviews

Benchmark Performance

BenchmarkScoreNotes
SWE-Bench Verified63.8%Agentic coding benchmark
Qodo PR Benchmark56.3%PR review quality
LiveCodeBench v570.4%Code generation
WebDev Arena#1Web 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:

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.issues.createComment({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: context.issue.number,
              body: `## 🤖 Gemini Code Review\n\n${review}`
            });

Option 3: Official GitHub Action

# .github/workflows/gemini-review.yml
name: Gemini Code Review

on:
  pull_request:
    types: [opened, synchronize]
  issue_comment:
    types: [created]

jobs:
  review:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
      issues: write

    steps:
      - uses: actions/checkout@v4

      - name: Run Gemini CLI
        uses: google-github-actions/run-gemini-cli@v1
        with:
          gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
          prompt: "Review this pull request for code quality, security issues, and potential bugs."

On-demand commands in comments:

@gemini-cli /review
@gemini-cli explain this code change
@gemini-cli write unit tests for this component

---

GitLab CI/CD

# .gitlab-ci.yml
gemini-review:
  image: node:20
  stage: review
  script:
    - npm install -g @google/gemini-cli
    - |
      gemini -p "Review the merge request changes for bugs, security issues, and code quality" > review.md
    - cat review.md
  artifacts:
    paths:
      - review.md
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  variables:
    GEMINI_API_KEY: $GEMINI_API_KEY

---

Configuration

Global Config

# ~/.gemini/settings.json
{
  "model": "gemini-2.5-pro",
  "theme": "dark",
  "sandbox": true
}

Project Config (GEMINI.md)

Create a GEMINI.md file in your project root for project-specific context:

# Project Context for Gemini

## Tech Stack
- TypeScript with strict mode
- React 18 with hooks
- FastAPI backend
- PostgreSQL database

## Code Review Focus Areas
1. Type safety - ensure proper TypeScript types
2. React hooks rules - check for dependency array issues
3. SQL injection - verify parameterized queries
4. Authentication - check all endpoints have proper auth

## Conventions
- Use camelCase for variables
- Use PascalCase for components
- All API errors should use AppError class

---

CLI Quick Reference

# Interactive
gemini                          # Start interactive mode
/code-review                    # Run code review extension

# Headless
gemini -p "prompt"              # Single prompt, exit
gemini -p "prompt" --output-format json   # JSON output
gemini -m gemini-2.5-flash -p "prompt"    # Use faster model

# Extensions
gemini extensions list          # List installed
gemini extensions install URL   # Install extension
gemini extensions update        # Update all

# Key Flags
--output-format json            # Structured output
--output-format stream-json     # Real-time events
--session-summary FILE          # Track metrics
-m MODEL                        # Select model

---

Comparison: Claude vs Codex vs Gemini

AspectClaudeCodex CLIGemini CLI
SetupNone (built-in)npm + OpenAI APInpm + Google Account
ModelClaudeGPT-5.2-CodexGemini 2.5 Pro
ContextConversationFresh per review1M tokens (huge!)
Free TierN/ALimited1,000/day
Best ForQuick reviewsHigh accuracyLarge codebases
GitHub NativeNo@codexGemini Code Assist

When to Use Each

ScenarioRecommended Engine
Quick in-flow reviewClaude
Critical security reviewCodex (88% detection)
Large codebase (100+ files)Gemini (1M context)
Free automated reviewsGemini
Multiple perspectivesAll three (dual/triple engine)

---

Troubleshooting

IssueSolution
gemini: command not foundnpm install -g @google/gemini-cli
Node.js version errorUpgrade to Node.js 20+
Authentication failedRe-run gemini and login again
Extension not foundgemini extensions install https://github.com/gemini-cli-extensions/code-review
Rate limitedWait or upgrade to Vertex AI
Hangs in CIEnsure DEBUG env var is not set

---

Anti-Patterns

  • Skipping authentication setup - Always configure before CI/CD
  • Using API key in logs - Use secrets management
  • Ignoring context limits - Even 1M tokens has limits for huge monorepos
  • Running on every commit - Use on PRs only to save quota
  • Not setting project context - Add GEMINI.md for better reviews

Related skills

FAQ

What is the free tier?

Signing in with a Google account gives 1,000 requests/day at 60 requests/min with Gemini 2.5 Pro and the full 1M token context.

What are the prerequisites?

Node.js 20+ and the Gemini CLI, plus the code-review extension for the /code-review command.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.