Agent skill

gemini-cli

Google Gemini CLI orchestration for AI-assisted development. Capabilities: second opinion/cross-validation, real-time web search (Google Search), codebase architecture analysis, parallel code generation, code review from different perspective. Actions: query, search, analyze, generate, review with Gemini. Keywords: Gemini CLI, second opinion, cross-validation, Google Search, web research, current information, parallel AI, code review, architecture analysis, gemini prompt, AI comparison, real-time search, alternative perspective, code generation. Use when: needing second AI opinion, searching current web information, analyzing codebase architecture, generating code in parallel, getting alternative code review, researching current events/docs.

Stars 10
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/samhvw8/dot-claude/tree/main/skills/gemini-cli

SKILL.md

Gemini CLI Integration Skill

This skill enables Claude Code to effectively orchestrate Gemini CLI (v0.16.0+) with Gemini 3 Pro for code generation, review, analysis, and specialized tasks.

When to Use This Skill

Ideal Use Cases

  1. Second Opinion / Cross-Validation

    • Code review after writing code (different AI perspective)
    • Security audit with alternative analysis
    • Finding bugs Claude might have missed
  2. Google Search Grounding

    • Questions requiring current internet information
    • Latest library versions, API changes, documentation updates
    • Current events or recent releases
  3. Codebase Architecture Analysis

    • Use Gemini's codebase_investigator tool
    • Understanding unfamiliar codebases
    • Mapping cross-file dependencies
  4. Parallel Processing

    • Offload tasks while continuing other work
    • Run multiple code generations simultaneously
    • Background documentation generation
  5. Specialized Generation

    • Test suite generation
    • JSDoc/documentation generation
    • Code translation between languages

When NOT to Use

  • Simple, quick tasks (overhead not worth it)
  • Tasks requiring immediate response (rate limits cause delays)
  • When context is already loaded and understood
  • Interactive refinement requiring conversation

Core Instructions

1. Verify Installation

bash
command -v gemini || which gemini

2. Basic Command Pattern

bash
gemini "[prompt]" --yolo -o text 2>&1

Key flags:

  • --yolo or -y: Auto-approve all tool calls
  • -o text: Human-readable output
  • -o json: Structured output with stats
  • -m gemini-2.5-flash: Use faster model for simple tasks

3. Critical Behavioral Notes

YOLO Mode Behavior: Auto-approves tool calls but does NOT prevent planning prompts. Gemini may still present plans and ask "Does this plan look good?" Use forceful language:

  • "Apply now"
  • "Start immediately"
  • "Do this without asking for confirmation"

Rate Limits: Free tier has 60 requests/min, 1000/day. CLI auto-retries with backoff. Expect messages like "quota will reset after Xs".

4. Output Processing

For JSON output (-o json), parse:

json
{
  "response": "actual content",
  "stats": {
    "models": { "tokens": {...} },
    "tools": { "byName": {...} }
  }
}

Quick Reference Commands

Code Generation

bash
gemini "Create [description] with [features]. Output complete file content." --yolo -o text

Code Review

bash
gemini "Review [file] for: 1) features, 2) bugs/security issues, 3) improvements" -o text

Bug Fixing

bash
gemini "Fix these bugs in [file]: [list]. Apply fixes now." --yolo -o text

Test Generation

bash
gemini "Generate [Jest/pytest] tests for [file]. Focus on [areas]." --yolo -o text

Documentation

bash
gemini "Generate JSDoc for all functions in [file]. Output as markdown." --yolo -o text

Architecture Analysis

bash
gemini "Use codebase_investigator to analyze this project" -o text

Web Research

bash
gemini "What are the latest [topic]? Use Google Search." -o text

Faster Model (Simple Tasks)

bash
gemini "[prompt]" -m gemini-2.5-flash -o text

Error Handling

Rate Limit Exceeded

  • CLI auto-retries with backoff
  • Use -m gemini-2.5-flash for lower priority tasks
  • Run in background for long operations

Command Failures

  • Check JSON output for detailed error stats
  • Verify Gemini is authenticated: gemini --version
  • Check ~/.gemini/settings.json for config issues

Validation After Generation

Always verify Gemini's output:

  • Check for security vulnerabilities (XSS, injection)
  • Test functionality matches requirements
  • Review code style consistency
  • Verify dependencies are appropriate

Integration Workflow

Standard Generate-Review-Fix Cycle

bash
# 1. Generate
gemini "Create [code]" --yolo -o text

# 2. Review (Gemini reviews its own work)
gemini "Review [file] for bugs and security issues" -o text

# 3. Fix identified issues
gemini "Fix [issues] in [file]. Apply now." --yolo -o text

Background Execution

For long tasks, run in background and monitor:

bash
gemini "[long task]" --yolo -o text 2>&1 &
# Monitor with BashOutput tool

Gemini's Unique Capabilities

These tools are available only through Gemini:

  1. google_web_search - Real-time internet search via Google
  2. codebase_investigator - Deep architectural analysis
  3. save_memory - Cross-session persistent memory

Configuration

Project Context (Optional)

Create .gemini/GEMINI.md in project root for persistent context that Gemini will automatically read.

Session Management

List sessions: gemini --list-sessions Resume session: echo "follow-up" | gemini -r [index] -o text

See Also

  • reference.md - Complete command and flag reference
  • templates.md - Prompt templates for common operations
  • patterns.md - Advanced integration patterns
  • tools.md - Gemini's built-in tools documentation

Expand your agent's capabilities with these related and highly-rated skills.

samhvw8/dot-claude

debugging

Systematic debugging methodology with root cause analysis. Phases: investigate, hypothesize, validate, verify. Capabilities: backward call stack tracing, multi-layer validation, verification protocols, symptom analysis, regression prevention. Actions: debug, investigate, trace, analyze, validate, verify bugs. Keywords: debugging, root cause, bug fix, stack trace, error investigation, test failure, exception handling, breakpoint, logging, reproduce, isolate, regression, call stack, symptom vs cause, hypothesis testing, validation, verification protocol. Use when: encountering bugs, analyzing test failures, tracing unexpected behavior, investigating performance issues, preventing regressions, validating fixes before completion claims.

10 0
Explore
samhvw8/dot-claude

prompt-enhancer

Prompt engineering and optimization for AI/LLMs. Capabilities: transform unclear prompts, reduce token usage, improve structure, add constraints, optimize for specific models, backward-compatible rewrites. Actions: improve, enhance, optimize, refactor, compress prompts. Keywords: prompt engineering, prompt optimization, token efficiency, LLM prompt, AI prompt, clarity, structure, system prompt, user prompt, few-shot, chain-of-thought, instruction tuning, prompt compression, token reduction, prompt rewrite, semantic preservation. Use when: improving unclear prompts, reducing token consumption, optimizing LLM outputs, restructuring verbose requests, creating system prompts, enhancing prompt clarity.

10 0
Explore
samhvw8/dot-claude

refactoring-expert

Systematic code refactoring following Martin Fowler's catalog. Methodologies: characterization tests, Red-Green-Refactor, incremental transformation. Capabilities: SOLID compliance, DRY cleanup, code smell detection, complexity reduction, legacy modernization, design patterns, functional programming patterns. Actions: refactor, extract, inline, rename, move, simplify code. Keywords: refactor, SOLID, DRY, code smell, complexity, extract method, inline, rename, move, clean code, technical debt, legacy code, design pattern, characterization test, Red-Green-Refactor, functional programming, higher-order function, immutability, pure function, composition, currying, side effects. Use when: improving code quality, reducing technical debt, applying SOLID principles, fixing DRY violations, removing code smells, modernizing legacy code, applying design patterns.

10 0
Explore
samhvw8/dot-claude

infra-engineer

Comprehensive infrastructure engineering covering DevOps, cloud platforms, FinOps, and DevSecOps. Platforms: AWS (EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation), Azure basics, Cloudflare (Workers, R2, D1, Pages), GCP (GKE, Cloud Run, Cloud Storage), Docker, Kubernetes. Capabilities: CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins), GitOps, infrastructure as code (Terraform, CloudFormation), container orchestration, cost optimization, security scanning, vulnerability management, secrets management, compliance (SOC2, HIPAA). Actions: deploy, configure, manage, scale, monitor, secure, optimize cloud infrastructure. Keywords: AWS, EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation, Azure, Kubernetes, k8s, Docker, Terraform, CI/CD, GitHub Actions, GitLab CI, Jenkins, ArgoCD, Flux, cost optimization, FinOps, reserved instances, spot instances, security scanning, SAST, DAST, vulnerability management, secrets management, Vault, compliance, monitoring, observability. Use when: deploying to AWS/Azure/GCP/Cloudflare, setting up CI/CD pipelines, implementing GitOps workflows, managing Kubernetes clusters, optimizing cloud costs, implementing security best practices, managing infrastructure as code, container orchestration, compliance requirements, cost analysis and optimization.

10 0
Explore
samhvw8/dot-claude

aesthetic

Visual design intelligence and UI aesthetics. Integrates: chrome-devtools, ai-multimodal, media-processing. Capabilities: design analysis, visual hierarchy, color theory, typography, micro-interactions, animation, design systems, accessibility. Actions: analyze, design, create, capture, evaluate, implement UI aesthetics. Keywords: Dribbble, Behance, Mobbin, design inspiration, visual hierarchy, color palette, typography, spacing, animation, micro-interaction, design system, style guide, accessibility, WCAG, contrast ratio, golden ratio, whitespace, visual rhythm. Use when: building beautiful UIs, analyzing design inspiration, implementing visual hierarchy, adding animations/micro-interactions, creating design systems, evaluating aesthetic quality, capturing design screenshots.

10 0
Explore
samhvw8/dot-claude

ui-ux-design

UI/UX design reference database. 50+ styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

10 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results