gemini-review
ABOUTME: Local code review skill using Gemini CLI for pre-commit reviews
ABOUTME: Supports staged, uncommitted, or branch diff with configurable prompts
Gemini Review - Local Code Review
MANDATORY: Always use --model gemini-3.1-pro-preview. No other model. No fallback. No substitution.
Trigger
Activate when user says: "gemini review", "review with gemini", "local review", or /gemini-review.
Options
| Option | Description | Default |
|---|---|---|
--all |
Review all uncommitted changes | staged only |
--branch [base] |
Review current branch vs base | main |
--prompt <name> |
Use specific prompt template | default |
--extension |
Use Gemini's built-in /code-review |
custom prompt |
Execution Flow
Step 1: Determine diff scope
# Default: staged changes
git diff --cached
# With --all: all uncommitted
git diff HEAD
# With --branch [base]: branch vs base (default base: main)
git diff main...HEAD
Step 2: Check if there are changes to review
# Check if diff is empty
git diff --cached --quiet && echo "No staged changes" || echo "Has changes"
If no changes, inform user and suggest:
git add <files>to stage changes--allflag for uncommitted changes--branchflag for branch review
Step 3: Load prompt template
Prompt templates are in ~/.claude/skills/gemini-review/prompts/:
default.md- Concise review focused on bugs/security/performanceci-style.md- Detailed review matching CI pipeline style
Step 4: Execute review
Option A - Using built-in extension (with --extension flag):
cd <project_root>
gemini --model gemini-3.1-pro-preview --yolo "/code-review"
Option B - Using custom prompt (default):
cd <project_root>
# Generate diff
DIFF=$(git diff --cached)
# Read prompt template
PROMPT=$(cat ~/.claude/skills/gemini-review/prompts/default.md)
# Invoke Gemini with prompt and diff
gemini --model gemini-3.1-pro-preview --yolo <<EOF
$PROMPT
## Code Changes to Review
\`\`\`diff
$DIFF
\`\`\`
EOF
Step 5: Present results
Gemini's output will appear in the terminal. Summarize key findings for the user.
Quality Notes
- Review the full diff carefully before sending to Gemini
- Summarize findings thoughtfully; do not just relay raw output
- Flag false positives rather than forwarding everything
Important Notes
- Always run from project root - Gemini needs project context
- Check for CLAUDE.md/GEMINI.md - Include project guidelines in prompt if present
- Large diffs - For very large diffs (>10000 lines), suggest
--branchwith specific files - Exit codes - Gemini CLI returns 0 on success, non-zero on error
Troubleshooting
| Issue | Solution |
|---|---|
| "No staged changes" | Run git add <files> or use --all |
| "gemini: command not found" | Install Gemini CLI: see https://github.com/google-gemini/gemini-cli |
| API errors | Check GEMINI_API_KEY is set |
| Timeout on large diffs | Split into smaller reviews or use --extension |
More from maroffo/claude-forge
email-cleanup
Clean up Gmail - archive old emails, delete promotions, manage storage. Use when user wants to clean inbox, archive emails, or free up space.
25newsletter-digest
Process newsletters into Second Brain digest. Use when user wants to process newsletters, create digest, or catch up on subscriptions. Not for web clippings (use process-clippings) or email bookmarks (use process-email-bookmarks).
22table-image
Render markdown tables as hand-drawn sketch images. Use when user wants a table rendered as an image, visual table, or diagram illustration.
21apple-swift
Apple platform development with Swift, SwiftUI, async/await, and performance. Use when working with .swift files, Package.swift, Xcode projects, or building for iOS/macOS/watchOS/visionOS.
20react-nextjs
React + Next.js App Router development. Use when working with .tsx/.jsx files, next.config, or user asks about Server Components, data fetching, state management, forms, or React testing.
20inbox-triage
Review and prioritize Gmail inbox. Use when user wants to check email, review inbox, or see what needs attention.
19