Use when the user asks to run Gemini CLI for code review, plan review, or big context (>200k) processing. Ideal for comprehensive analysis requiring large context windows. Uses Gemini 3 Pro by default for state-of-the-art reasoning and coding.
Installs just this skill. Get the whole plugin for auto-invocation.
โก How it fires
How this skill gets triggered: by you, by Claude, or both.
Fires itselfClaude auto-loads it when your prompt matches the work.
You can call itInvoke it directly when you want it.
Slash command/gemini
๐๏ธ Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user asks to run Gemini CLI for code review, plan review, or big context (>200k) processing. Ideal for comprehensive analysis requiring large context windows. Uses Gemini 3 Pro by default for state-of-the-art reasoning and coding.
๐ Stats
Stars29,856
Forks3,189
LanguagePython
LicenseMIT
๐ฆ Ships with claude-code-templates
</> SKILL.md
gemini.SKILL.md
---name: gemini
description: Use when the user asks to run Gemini CLI for code review, plan review, or big context (>200k) processing. Ideal for comprehensive analysis requiring large context windows. Uses Gemini 3 Pro by default for state-of-the-art reasoning and coding.
---# Gemini Skill Guide
## When to Use Gemini
- WHEN ASKED TO BE ACTIVATED
- **Code Review**: Comprehensive code reviews across multiple files
- **Plan Review**: Analyzing architectural plans, technical specifications, or project roadmaps
- **Big Context Processing**: Tasks requiring >200k tokens of context (entire codebases, documentation sets)
- **Multi-file Analysis**: Understanding relationships and patterns across many files
## โ ๏ธ Critical: Background/Non-Interactive Mode Warning
**NEVER use `--approval-mode default` in background or non-interactive shells** (like Claude Code tool calls). It will hang indefinitely waiting for approval prompts that cannot be provided.
**For automated/background reviews:**
- โ Use `--approval-mode yolo` for fully automated execution
- โ OR wrap with timeout: `timeout 300 gemini ...`
- โ NEVER use `--approval-mode default` without interactive terminal
**Symptoms of hung Gemini:**
- Process running 20+ minutes with 0% CPU usage
- No network activity
- Process state shows 'S' (sleeping)
- `default`: Prompt for approval (โ ๏ธ ONLY for interactive terminal sessions)
- `auto_edit`: Auto-approve edit tools only (for code reviews with suggestions)
- `yolo`: Auto-approve all tools (โ REQUIRED for background/automated tasks)
3. Assemble the command with appropriate options:
- `-m, --model <MODEL>` - Model selection
- `--approval-mode <default|auto_edit|yolo>` - Control tool approval
- `-y, --yolo` - Alternative to `--approval-mode yolo`
- `-i, --prompt-interactive "prompt"` - Execute prompt and continue interactively
- `--include-directories <DIR>` - Additional directories to include in workspace
- `-s, --sandbox` - Run in sandbox mode for isolation
4. **For background/automated tasks, ALWAYS use `--approval-mode yolo`** or add timeout wrapper. NEVER use `default` in non-interactive shells.
5. Run the command and capture the output. For background/automated mode:
```bash
# Recommended: Use yolo for background tasks
gemini -m gemini-3-pro-preview --approval-mode yolo "Review this codebase for security issues"
# Or with timeout (5 min limit)
timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo "Review this codebase"
```
6. For interactive sessions with an initial prompt:
```bash
gemini -m gemini-3-pro-preview -i "Review the authentication system" --approval-mode auto_edit
```
7. **After Gemini completes**, inform the user: "The Gemini analysis is complete. You can start a new Gemini session for follow-up analysis or continue exploring the findings."
"Review the authentication flow for security issues"
```
## Following Up
- Gemini CLI sessions are typically one-shot or interactive. Unlike Codex, there's no built-in resume functionality.
- For follow-up analysis, start a new Gemini session with context from previous findings.
- When proposing follow-up actions, restate the chosen model and approval mode.
- Use `AskUserQuestion` after each Gemini command to confirm next steps or gather clarifications.
## Error Handling
- Stop and report failures whenever `gemini --version` or a Gemini command exits non-zero.
- Request direction before retrying failed commands.
- Before using high-impact flags (`--approval-mode yolo`, `-y`, `--sandbox`), ask the user for permission using `AskUserQuestion` unless already granted.
- When output includes warnings or partial results, summarize them and ask how to adjust using `AskUserQuestion`.
## Troubleshooting Hung Gemini Processes
### Detection
```bash
# Check for hung processes
ps aux | grep -E "gemini.*gemini-3" | grep -v grep