gemini
What it does
This skill runs the Gemini command-line tool to review code, plans or large sets of files. It is for developers who want a second model to review work or analyze inputs too large for a normal chat.
When to use it
- ✓When someone asks for a code review across many files using Gemini.
- ✓When an architecture plan or specification needs a second review.
- ✓When a task involves more than 200,000 tokens of context, such as a whole documentation set.
Skill link
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/gemini/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Use Gemini to review the changes across these files and point out any risky logic.”
5 new skills a week. 1 minute to read.
How it works
The skill asks which Gemini model to use, then runs the command-line tool on the chosen files or prompt. It warns that interactive approval prompts can hang background runs, so automated runs need a non-interactive setting or a timeout.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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 yolofor fully automated execution - ✅ OR wrap with timeout:
timeout 300 gemini ... - ❌ NEVER use
--approval-mode defaultwithout interactive terminal
Symptoms of hung Gemini:
- Process running 20+ minutes with 0% CPU usage
- No network activity
- Process state shows 'S' (sleeping)
Fix hung process:
# Check if hung
ps aux | grep gemini | grep -v grep
# Kill if necessary
pkill -9 -f "gemini.*gemini-3-pro-preview"
Running a Task
Ask the user (via
AskUserQuestion) which model to use in a single prompt. Available models:gemini-3-pro-preview⭐ (flagship model, best for coding & complex reasoning, 35% better at software engineering than 2.5 Pro)gemini-3-flash(sub-second latency, distilled from 3 Pro, best for speed-critical tasks)gemini-2.5-pro(legacy option, strong all-around performance)gemini-2.5-flash(legacy option, cost-efficient with thinking capabilities)gemini-2.5-flash-lite(legacy option, fastest processing)
Select the approval mode based on the task:
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)
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
For background/automated tasks, ALWAYS use
--approval-mode yoloor add timeout wrapper. NEVER usedefaultin non-interactive shells.Run the command and capture the output. For background/automated mode:
# 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"For interactive sessions with an initial prompt:
gemini -m gemini-3-pro-preview -i "Review the authentication system" --approval-mode auto_editAfter 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."
Quick Reference
| Use case | Approval mode | Key flags |
|---|---|---|
| Background code review | yolo ✅ |
-m gemini-3-pro-preview --approval-mode yolo |
| Background analysis | yolo ✅ |
-m gemini-3-pro-preview --approval-mode yolo |
| Background with timeout | yolo ✅ |
timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo |
| Interactive code review | default |
-m gemini-3-pro-preview --approval-mode default (interactive terminal only) |
| Code review with auto-edits | auto_edit |
-m gemini-3-pro-preview --approval-mode auto_edit |
| Automated refactoring | yolo |
-m gemini-3-pro-preview --approval-mode yolo |
| Speed-critical background | yolo ✅ |
-m gemini-3-flash --approval-mode yolo |
| Cost-optimized background | yolo ✅ |
-m gemini-2.5-flash --approval-mode yolo |
| Multi-directory analysis | yolo (if background) |
--include-directories <DIR1> --include-directories <DIR2> |
| Interactive with prompt | auto_edit or default |
-i "prompt" --approval-mode <mode> |
Model Selection Guide
| Model | Best for | Context window | Key features | | --- | --- | ---
FAQ
Why can a run hang?
The skill warns that default approval mode waits for input, so background runs can stall without a timeout or auto-approve setting.
What is big context used for?
It is for analysis of very large inputs, such as entire codebases or many documents.
Does it need the Gemini CLI installed?
Yes. The skill runs the Gemini command-line tool, which must be set up first.
Details
Original description by the author
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.
Popularity
- GitHub stars
- 33k
- Ranking position
- #8561
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
owasp-security
33kTeaches your agent OWASP security guidance for web apps, APIs, mobile, containers and AI agents, so it can spot common weaknesses and suggest fixes.
agent-management
33kLets your agent create, list, hibernate, wake, rename and delete AI agents using the AI Maestro command line, managing each agent's lifecycle.
agent-messaging
33kLets your agent send, receive and reply to signed messages between AI agents, using the Agent Messaging Protocol, mostly on your own machine.
docs-search
33kLets your agent search auto-generated code documentation for function signatures, class definitions and comments, so it checks the real API before changing code.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.