Agent skill

Gemini

by davila7 in davila7/claude-code-templates

A skill your agent uses when the user asks to run Gemini CLI for code review, plan review, or big context (200k) processing.

MITAuto-check passedDevelopment

Install Gemini

skills CLI
$ npx skills add davila7/claude-code-templates --skill gemini -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates gemini --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/ai-research/gemini .claude/skills/gemini && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gemini
GitHub stars
32k
Used in
4 other repos
Token cost
~2.5k tokens
SKILL.md length
839 words
Files
2
Skills in repo
477
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user asks to run Gemini CLI for code review, plan review, or big context (200k) processing.

  • Works in 7 steps: Ask the user (via AskUserQuestion) which… → Select the approval mode based on the task → Assemble the command with appropriate… → …
  • The user asks to run Gemini CLI for code review
  • SKILL.md covers When to Use Gemini, ⚠️ Critical:…, Running a Task and Common Use Cases, plus 5 more sections
  • Calls gemini

What it does

Gemini is an agent skill from davila7/claude-code-templates. 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.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `README.md`).

It sits in Development, covering Code review, Context engineering and Literature review. It works with Google Gemini. The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • The user asks to run Gemini CLI for code review
  • Big context (200k) processing

Example prompts

  • “/gemini”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Ask the user (via AskUserQuestion) which model to use in a single prompt. Available models
  2. Select the approval mode based on the task
  3. Assemble the command with appropriate options
  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
  6. For interactive sessions with an initial prompt
  7. After Gemini completes, inform the user: "The Gemini analysis is complete. You can start a new Gemini session for follow-up analysis or…

What it can do on your machine

Read from SKILL.md and the folder at commit 14680ec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gemini

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gemini loads about 2.5k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 839 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 14680ec, republished under its MIT licence (© davila7). 839 words, ~2,454 tokens.

Download SKILL.mdSave it as .claude/skills/gemini/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
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)

Fix hung process:

bash
# Check if hung
ps aux | grep gemini | grep -v grep

# Kill if necessary
pkill -9 -f "gemini.*gemini-3-pro-preview"

Running a Task

  1. 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)
  2. 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)
  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."

Quick Reference
Use caseApproval modeKey flags
Background code reviewyolo ✅-m gemini-3-pro-preview --approval-mode yolo
Background analysisyolo ✅-m gemini-3-pro-preview --approval-mode yolo
Background with timeoutyolo ✅timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo
Interactive code reviewdefault-m gemini-3-pro-preview --approval-mode default (interactive terminal only)
Code review with auto-editsauto_edit-m gemini-3-pro-preview --approval-mode auto_edit
Automated refactoringyolo-m gemini-3-pro-preview --approval-mode yolo
Speed-critical backgroundyolo ✅-m gemini-3-flash --approval-mode yolo
Cost-optimized backgroundyolo ✅-m gemini-2.5-flash --approval-mode yolo
Multi-directory analysisyolo (if background)--include-directories <DIR1> --include-directories <DIR2>
Interactive with promptauto_edit or default-i "prompt" --approval-mode <mode>
Show full SKILL.md (405 more words)Show less
Model Selection Guide
ModelBest forContext windowKey features
gemini-3-pro-preview ⭐Flagship model: Complex reasoning, coding, agentic tasks1M input / 64k outputVibe coding, 76.2% SWE-bench, $2-4/M input
gemini-3-flashSub-second latency, speed-critical applications1M input / 64k outputDistilled from 3 Pro, TPU-optimized
gemini-2.5-proLegacy: Strong all-around performance1M input / 65k outputThinking mode, mature stability
gemini-2.5-flashLegacy: Cost-efficient, high-volume tasks1M input / 65k outputBest price ($0.15/M), thinking mode
gemini-2.5-flash-liteLegacy: Fastest processing, high throughput1M input / 65k outputMaximum speed, minimal latency

Gemini 3 Advantages: 35% higher accuracy in software engineering, state-of-the-art on SWE-bench (76.2%), GPQA Diamond (91.9%), and WebDev Arena (1487 Elo). Knowledge cutoff: January 2025.

Coming Soon: gemini-3-deep-think for ultra-complex reasoning with enhanced thinking capabilities.

Common Use Cases

Code Review (Background/Automated)
bash
# For background execution (Claude Code, CI/CD, etc.)
gemini -m gemini-3-pro-preview --approval-mode yolo \
  "Perform a comprehensive code review focusing on:
   1. Security vulnerabilities
   2. Performance issues
   3. Code quality and maintainability
   4. Best practices violations"

# With timeout safety (5 minutes)
timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo \
  "Perform a comprehensive code review..."
Plan Review (Background/Automated)
bash
# For background execution
gemini -m gemini-3-pro-preview --approval-mode yolo \
  "Review this architectural plan for:
   1. Scalability concerns
   2. Missing components
   3. Integration challenges
   4. Alternative approaches"
Big Context Analysis (Background/Automated)
bash
# For background execution
gemini -m gemini-3-pro-preview --approval-mode yolo \
  "Analyze the entire codebase to understand:
   1. Overall architecture
   2. Key patterns and conventions
   3. Potential technical debt
   4. Refactoring opportunities"
Interactive Code Review (Terminal Only)
bash
# ONLY use default mode in interactive terminal
gemini -m gemini-3-pro-preview --approval-mode default \
  "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

# Look for these symptoms:
# - Process running 20+ minutes
# - CPU usage at 0%
# - Process state 'S' (sleeping)
# - No network connections
Diagnosis
bash
# Get detailed process info
ps -o pid,etime,pcpu,stat,command -p <PID>

# Check network activity
lsof -p <PID> 2>/dev/null | grep -E "(TCP|ESTABLISHED)" | wc -l
# If result is 0, process is hung
Resolution
bash
# Kill hung Gemini processes
pkill -9 -f "gemini.*gemini-3-pro-preview"

# Or kill specific PID
kill -9 <PID>

# Verify cleanup
ps aux | grep gemini | grep -v grep
Prevention
  • ALWAYS use --approval-mode yolo for background/automated tasks
  • Add timeout wrapper for safety: timeout 300 gemini ...
  • Never use --approval-mode default in non-interactive shells
  • Monitor first run with ps to ensure process completes

Tips for Large Context Processing

  1. Be specific: Provide clear, structured prompts for what to analyze
  2. Use include-directories: Explicitly specify all relevant directories
  3. Choose the right model:
    • Use gemini-3-pro-preview for complex reasoning, coding tasks, and maximum analysis quality (recommended default)
    • Use gemini-3-flash for speed-critical tasks requiring sub-second response times
    • Use gemini-2.5-flash for cost-optimized high-volume processing
  4. Leverage Gemini 3's strengths: 35% better at software engineering tasks, exceptional at agentic workflows and vibe coding
  5. Break down complex tasks: Even with large context, structured analysis is more effective
  6. Save findings: Ask Gemini to output structured reports that can be saved for reference

CLI Version

Requires Gemini CLI v0.16.0 or later for Gemini 3 model support. Check version: gemini --version

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in cli-tool/components/skills/ai-research/gemini of davila7/claude-code-templates.

  • SKILL.md
  • README.md

Open the folder on GitHubat commit 14680ec

Used in 4 other repositories

We found 13 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in davila7/claude-code-templates, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Gemini next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gemini compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gemini this skilldavila7/claude-code-templates32k4 repos~2.5kAutomated safety check: PassMIT
Deep Reviewdyad-sh/dyad22k—~1.4kAutomated safety check: PassCustom licence
Code Reviewtimwuhaotian/the-pair378—~250Automated safety check: PassMIT
Requesting Code Reviewt1mmen/srtd105—~807Automated safety check: PassMIT
Gemini CLIsecondsky/claude-skills2271 repos~2.8kAutomated safety check: PassMIT
Requesting Code ReviewRedWoodOG/Hermes-Desktop177—~1.5kAutomated safety check: PassMIT

Similar skills

  • Deep Review

    dyad-sh/dyad

    Deep multi-agent code review run locally — a fleet of parallel finder agents reviews the diff from independent angles, then adversarial verifier agents reproduce each finding before it is reported.

    22k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Review

    timwuhaotian/the-pair

    Comprehensive code review with security and performance checks

    378 GitHub stars~250 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Structured code review workflow for SRTD development. An agent skill from t1mmen/srtd.

    105 GitHub stars~807 tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Gemini CLI

    secondsky/claude-skills

    Google Gemini CLI for second opinions, architectural advice, code reviews, security audits.

    227 GitHub starsUsed in 1 repo~2.8k tokens
    DevelopmentAuto-check passed
  • Requesting Code Review

    RedWoodOG/Hermes-Desktop

    A skill your agent uses when completing tasks, implementing major features, or before merging.

    177 GitHub stars~1.5k tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Planning with Files

    OthmanAdi/planning-with-files

    Keeps a task plan, findings and progress log in markdown files on disk so long agent tasks survive context resets, with Gemini hooks and helper scripts.

    27k GitHub stars~2.9k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed

More from davila7/claude-code-templates

All 477 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 10 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Works with

Questions about Gemini

What does Gemini do?

A skill your agent uses when the user asks to run Gemini CLI for code review, plan review, or big context (200k) processing. Gemini is an agent skill from davila7/claude-code-templates. Use when the user asks to run Gemini CLI for code review, plan review, or big context (200k) processing.

When should I use Gemini?

Gemini fits situations like: the user asks to run Gemini CLI for code review; big context (200k) processing.

How do I install Gemini in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill gemini -a claude-code`. Or copy the skill folder (cli-tool/components/skills/ai-research/gemini in davila7/claude-code-templates) into .claude/skills/gemini in your project. Claude Code loads it when a task matches its description.

How do I install Gemini in Codex?

Run `npx skills add davila7/claude-code-templates --skill gemini -a codex`. Or copy the skill folder (cli-tool/components/skills/ai-research/gemini in davila7/claude-code-templates) into .agents/skills/gemini in your project. Codex loads it when a task matches its description.

Can I use Gemini in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill gemini -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gemini, .gemini/skills/gemini, .github/skills/gemini and .opencode/skills/gemini in your project.

What does Gemini need to run?

Going by SKILL.md and its folder, Gemini needs the command-line tools its instructions call (gemini).

Does Gemini access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gemini safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gemini use?

Gemini is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gemini use?

About 2.5k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gemini?

Skills that share tags, products or a category with Gemini: Deep Review (dyad-sh/dyad, 22k stars), Code Review (timwuhaotian/the-pair, 378 stars), Requesting Code Review (t1mmen/srtd, 105 stars) and Gemini CLI (secondsky/claude-skills, 227 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gemini?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,463 GitHub stars. The repository holds 477 skills in this directory. The repository was last updated on October 8, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.