Back to Skills

gemini-peer-review

verified

This skill should be invoked BEFORE presenting implementation plans, architecture recommendations, code review findings, or answers to broad technical questions. Use proactively when about to "recommend", "suggest", "propose", "design", "plan", or answer "how should", "what's the best way", "which approach". MANDATORY for multi-file changes, refactoring proposals, and security-sensitive recommendations.

View on GitHub

Marketplace

gemini-peer-review

slb350/gemini-peer-review

Plugin

gemini-peer-review

code-quality

Repository

slb350/gemini-peer-review
1stars

plugins/gemini-peer-review/skills/gemini-peer-review/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/slb350/gemini-peer-review/blob/main/plugins/gemini-peer-review/skills/gemini-peer-review/SKILL.md -a claude-code --skill gemini-peer-review

Installation paths:

Claude
.claude/skills/gemini-peer-review/
Powered by add-skill CLI

Instructions

# Gemini Peer Review

Peer validation system using Google Gemini CLI. Validates Claude's designs and code reviews through structured discussion before presenting to user.

**Core principle:** Two AI perspectives catch more issues than one. When they disagree, structured discussion resolves most issues. External research (Perplexity if available, otherwise WebSearch) arbitrates persistent disagreements.

## CRITICAL: Gemini CLI Differences from Codex

| Aspect | Codex CLI | Gemini CLI |
|--------|-----------|------------|
| JSON output | `--json` | `-o json` |
| Model selection | `--model X` | `-m X` |
| Review command | `codex review --base X` | **NONE** - use prompts with git diff |
| Session resume | `resume $SESSION_ID` | **UNRELIABLE** - re-inject context instead |
| Tool prevention | Not needed | **MANDATORY** prompt suffix |
| Sandbox mode | Not needed | `-s` flag required |

### MANDATORY: Tool Prevention

**EVERY Gemini prompt MUST end with:**
```
CRITICAL: Do not use any tools. Output text only.
```

Without this, Gemini may attempt to use tools and produce unexpected results.

### Session Continuity Strategy

Gemini's `--resume latest` is index-based (not ID-based) and unreliable. For multi-round discussions:
- **DO NOT** use `--resume`
- **DO** re-inject the full context from previous rounds into each new prompt

### Robust JSON Parsing (IMPORTANT)

Gemini's `-o json` output is sometimes wrapped in Markdown code blocks. **Always parse output** to extract clean JSON:

```bash
# Function to extract JSON from potentially wrapped output
parse_gemini_output() {
  local input="$1"
  # Strip markdown code fences if present
  echo "$input" | sed 's/^```json//; s/^```//; s/```$//' | \
    # Remove CLI status messages
    grep -v '^Loaded cached' | \
    # Extract response field, or return raw if not JSON
    jq -r '.response // .' 2>/dev/null || echo "$input"
}

# Usage:
RAW_OUTPUT=$(gemini -s -m gemini-3-pro-preview -o json "$(cat "$PROMPT_FILE")" 2>&1)
RESPONSE=

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
12440 chars