gemini-review
Gemini Code Review
Overview
Use the Gemini CLI to perform AI-powered code reviews with gemini-3.1-pro-preview — Google's most capable reasoning model. Supports reviewing branches, uncommitted changes, specific commits, remote PRs, and custom-scoped reviews. Reviews are read-only and never modify the working tree.
Prerequisites
- Gemini CLI installed and authenticated
geminicommand available in PATH
Workflow
Step 1: Determine Review Scope
Ask the user what they want reviewed if not already clear:
| Scope | When to use |
|---|---|
| Branch diff | Before opening or merging a PR |
| Uncommitted changes | During active development |
| Specific commit | Auditing a single changeset |
| Remote PR | Reviewing a GitHub Pull Request by number or URL |
| Custom | User provides specific review instructions |
Step 2: Run the Review
Branch review (compare current branch against base):
scripts/gemini-review.sh branch --base main
Uncommitted changes:
scripts/gemini-review.sh uncommitted
Specific commit:
scripts/gemini-review.sh commit <SHA>
Remote PR (checks out and reviews a GitHub PR):
scripts/gemini-review.sh pr <PR_NUMBER>
Custom review with focused instructions:
scripts/gemini-review.sh branch --base main --focus "Review for accessibility regressions and WCAG compliance"
Structured output for LLM consumption (used by council-review):
scripts/gemini-review.sh branch --base main --format structured
Step 3: Present Results
The script outputs a review in one of two formats depending on --format:
Markdown format (default)
Human-readable output with:
- Verdict: Approved / Approved with suggestions / Request Changes
- Summary: 2-3 sentence high-level overview
- Changes Walkthrough: Table summarizing what changed in each file
- Findings: All issues with explicit severity emoji (🔴🟠🟡🟢🔵), category, file:line reference, explanation, and suggested fix — sorted by severity
- Highlights: Positive patterns worth calling out
- Verdict: Final recommendation restated with justification
Structured format (--format structured)
YAML output optimized for LLM parsing and synthesis (e.g., by the council-review skill):
verdict: approved | approved_with_suggestions | request_changes
summary: |
2-3 sentence overview.
changes:
- file: path/to/file.ts
description: Brief description of changes
findings:
- severity: critical | high | medium | low | info
category: bug | security | performance | maintainability | edge_case | testing | style
file: path/to/file.ts
line: 42
title: Short title
description: |
Explanation of the issue.
suggestion: |
code fix here
highlights:
- Short description of a positive pattern
Step 4: Cleanup (Remote PRs only)
After reviewing a remote PR, ask the user if they want to switch back to the original branch.
Severity Levels
| Emoji | Level | Criteria |
|---|---|---|
| 🔴 | Critical | Exploitable vulnerability, data loss, or crash in production |
| 🟠 | High | Likely bug or incident under realistic conditions |
| 🟡 | Medium | Incorrect behavior under edge cases or degraded performance |
| 🟢 | Low | Code quality issue that could escalate over time |
| 🔵 | Info | Observation or suggestion, no action required |
Common Options
| Option | Description |
|---|---|
--base <BRANCH> |
Base branch for comparison (default: main) |
--focus <TEXT> |
Narrow the review to specific concerns |
--format <FORMAT> |
Output format: markdown (default) or structured (YAML for LLM consumption) |
--context-file <PATH> |
Add extra context file (repeatable) |
--dry-run |
Print the prompt without calling Gemini |
--interactive |
Keep Gemini chat open for follow-up questions |
Rules
- Default to reviewing the current branch diff against
mainunless the user specifies otherwise - Always use the wrapper script — it enforces
gemini-3.1-pro-previewmodel and read-only mode - Sort findings by severity: Critical/High first, then Medium, then Low/Info
- Every finding must include an explicit severity level — never rely on implicit ordering alone
- If Gemini CLI is not installed, instruct the user to install and authenticate it
- When called from
council-review, always use--format structuredfor reliable LLM parsing
More from trancong12102/agentskills
deps-dev
Look up the latest stable version of any open-source package across npm, PyPI, Go, Cargo, Maven, and NuGet. Use when the user asks 'what's the latest version of X', 'what version should I use', 'is X deprecated', 'how outdated is my package.json/requirements.txt/Cargo.toml', or needs version numbers for adding or updating dependencies. Also covers pinning versions, checking if packages are maintained, or comparing installed vs latest versions. Do NOT use for private/internal packages or for looking up documentation (use context7).
151council-review
Multi-perspective code review that synthesizes findings from multiple reviewers into a unified report. Use when the user asks to review code changes, audit a diff, check code quality, review a PR, review commits, or review uncommitted changes. Also covers 'code review', 'review my changes', 'check this before I merge', or wanting multiple perspectives on code. Do not use for documentation/markdown review or trivial single-line changes.
95oracle
Deep analysis and expert reasoning. Use when the user asks for 'oracle', 'second opinion', architecture analysis, elusive bug debugging, impact assessment, security reasoning, refactoring strategy, or trade-off evaluation — problems that benefit from deep, independent reasoning. Do not use for simple factual questions, code generation, code review (use council-review), or tasks needing file modifications.
93context7
Fetch up-to-date documentation for any open-source library or framework. Use when the user asks to look up docs, check an API, find code examples, or verify how a feature works — especially with a specific library name, version migration, or phrases like 'what's the current way to...' or 'the API might have changed'. Also covers setup and configuration docs. Do NOT use for general programming concepts, internal project code, or version lookups (use deps-dev).
86conventional-commit
Generates git commit messages following Conventional Commits 1.0.0 specification with semantic types (feat, fix, etc.), optional scope, and breaking change annotations. Use when committing code changes or creating commit messages.
58react-web-advanced
Web-specific React patterns for type-safe file-based routing, route-level data loading, server-side rendering, search param validation, code splitting, and list virtualization. Use when building React web apps with route loaders, SSR streaming, validated search params, lazy route splitting, or virtualizing large DOM lists. Do not use for React Native apps — use react-native-advanced instead.
45