gemini
The gemini skill invokes the Gemini CLI tool for comprehensive code reviews, architectural plan analysis, and large-context processing tasks exceeding 200k tokens. Use this skill when analyzing multiple files, understanding codebase relationships, or reviewing technical specifications where Gemini's advanced reasoning capabilities provide superior software engineering analysis compared to standard models. Critical: always use approval-mode yolo in non-interactive environments to prevent process hangs.
git clone --depth 1 https://github.com/jdrhyne/agent-skills /tmp/gemini && cp -r /tmp/gemini/codex/gemini ~/.claude/skills/geminiSKILL.md
# 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." ## Safety Boundaries - Do not run Gemini unless the user explicitly asked for Gemini or for a second-opinion review that justifies it. - Do not use `--approval-mode yolo` unless the task is non-interactive and the user approved high-autonomy execution. - Do not save reports or write files unless the user asked for an artifact. - Do not pass secrets, private keys, or unrelated workspace data into prompts. ### 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 | | --- | --- | --- | --- | | `gemini-3-pro-preview` ⭐ | **Flagship model**: Complex reasoning, coding, agentic tasks | 1M input / 64k output | Vibe coding, 76.2% SWE-bench | | `gemini-3-flash` | Sub-second latency, speed-critical applications | 1M input / 64k output | Distilled from 3 Pro, TPU-optimized | | `gemini-2.5-pro` | Legacy: Strong all-around performance | 1M input / 65k output | Thinking mode, mature stability | | `gemini-2.5-flash` | Legacy: Cost-efficient, high-volume tasks | 1M input / 65k output | Thinking mode | | `gemini-2.5-flash-lite` | Legacy: Fastest processing, high throughput | 1M input / 65k output | Maximum 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-
Automatically update OpenClaw and selected skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed.
Check for new OpenClaw releases and notify once per new version.
OpenClaw documentation expert with decision tree navigation, search scripts, doc fetching, version tracking, and config snippets for all OpenClaw features
Bulk download images from login-protected gallery websites using an attached browser session. Use when asked to scrape, download, or save images from authenticated gallery pages, extract full-size images from thumbnails, or batch download from multi-page galleries.
Three-Layer Memory System — automatic fact extraction, entity-based knowledge graph, and weekly synthesis. Manages life/areas/ entities with atomic facts and living summaries.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.
Sync skills between local installation and the GitHub source-of-truth repository. Use when asked to install, update, list, or push skills.
Persistent TODO scratch pad for tracking tasks across sessions. Use when user says "add to TODO", "what's on the TODO", "mark X done", "show TODO list", "remove from TODO", or asks about pending tasks. Also triggers on heartbeat to remind about stale items.