Gemini CLI
AI and machine learning skill, available on Zeplik
Gemini CLI is a ready-to-run AI and machine learning skill on Zeplik. Run Gemini CLI (Gemini 3 Pro) for code/plan review and huge >200k-token context analysis in the terminal. Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.
The Gemini CLI skill loads automatically when your request matches it, or you can invoke it directly by typing /gemini-cli in any chat. It works with attachments, connectors, and any model that supports the task, so you get the same expert method every time without setting anything up.
What the Gemini CLI skill can do
- Run Gemini CLI for comprehensive multi-file code reviews
- Analyze architectural plans and technical specifications for issues
- Process huge codebases exceeding 200k tokens of context in one pass
- Select model and approval mode automatically for background or interactive runs
Try these prompts on Zeplik
Pick a prompt to open it in the Zeplik app. If you are not signed in yet, your prompt is waiting for you the moment you do.
How the Gemini CLI skill works
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_edit -
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 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, $2-4/M input |
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 | Best price ($0.15/M), 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)
# 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)
# 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)
# 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)
# 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
AskUserQuestionafter each Gemini command to confirm next steps or gather clarifications.
Error Handling
- Stop and report failures whenever
gemini --versionor 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 usingAskUserQuestionunless already granted. - When output includes warnings or partial results, summarize them and ask how to adjust using
AskUserQuestion.
Troubleshooting Hung Gemini Processes
Detection
# 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
# 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
# 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 yolofor background/automated tasks - Add timeout wrapper for safety:
timeout 300 gemini ... - Never use
--approval-mode defaultin non-interactive shells - Monitor first run with
psto ensure process completes
Tips for Large Context Processing
- Be specific: Provide clear, structured prompts for what to analyze
- Use include-directories: Explicitly specify all relevant directories
- Choose the right model:
- Use
gemini-3-pro-previewfor complex reasoning, coding tasks, and maximum analysis quality (recommended default) - Use
gemini-3-flashfor speed-critical tasks requiring sub-second response times - Use
gemini-2.5-flashfor cost-optimized high-volume processing
- Use
- Leverage Gemini 3's strengths: 35% better at software engineering tasks, exceptional at agentic workflows and vibe coding
- Break down complex tasks: Even with large context, structured analysis is more effective
- 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
How to use the Gemini CLI skill
Sign in to Zeplik
Create a free Zeplik account or sign in. New accounts start with free credits, so you can try the Gemini CLI skill right away.
Describe your AI and machine learning task
Ask in plain language, or type /gemini-cli to invoke the skill directly. Zeplik recognizes the Gemini CLI skill and applies its method.
Review and refine the result
Zeplik returns a clear, structured answer. Ask follow-ups in the same chat to refine it or take the next step.
Source and credit
- Author
- davila7 (D7 Class-A standalone)
- License
- MIT
Adapted from the open-source davila7/claude-code-templates project and tuned to run natively on Zeplik. View source on GitHub.
Frequently asked questions
- What is the Gemini CLI skill?
- Gemini CLI is a ready-to-run AI and machine learning skill on Zeplik. Run Gemini CLI (Gemini 3 Pro) for code/plan review and huge >200k-token context analysis in the terminal. Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.
- How do I use Gemini CLI on Zeplik?
- Sign in to Zeplik and ask in plain language, or type /gemini-cli in any chat to invoke it directly. The skill applies its method and returns a result you can refine in the same conversation.
- Which AI model does the Gemini CLI skill use?
- Any model you choose. Zeplik works across every model in one chat, so the Gemini CLI skill runs on your preferred model for the task.
- Where does the Gemini CLI skill come from?
- The Gemini CLI skill is adapted from the open-source davila7/claude-code-templates project (MIT) and tuned to run natively on Zeplik. The original source is linked on this page.
- How much does the Gemini CLI skill cost?
- Using the skill is free to start. You only spend Zeplik credits when the assistant runs, and new accounts begin with free credits.
Related ai and machine learning skills
- Agent MemoryMemory and context management for LLM agents — short/long-term memory stores, conversation persistence, context-window strategies (summarization, trimming, retrieval) and prompt caching. Use for "give my agent memory / manage context"; for vector stores see vector-databases.
- AI Safety GuardrailsSafety and moderation for LLM apps — Constitutional AI, Llama Guard input/output moderation, and NeMo Guardrails runtime rails. Use for "add safety/moderation/guardrails to my LLM app"; for evaluating safety see llm-evaluation-harnesses.
- Autonomous Agent PatternsFramework-agnostic design patterns for autonomous coding agents — goal decomposition, planning, parallel/multi-agent orchestration and operational modes. Use for "how should I architect an autonomous agent"; for concrete frameworks see ai-agent-frameworks.
- InterpretabilityMechanistic interpretability of neural networks — TransformerLens, NNsight remote access, sparse autoencoders (SAELens), and causal interventions (pyvene). Use for "probe/intervene on model internals" or "train an SAE"; for architecture basics see llm-architectures.
- LLM App PatternsProduction patterns for LLM applications — RAG architecture, embeddings, LLMOps, and end-to-end app design. Use for "architect a production LLM/RAG app"; for the vector store see vector-databases, for agents see ai-agent-frameworks.
- LLM ArchitecturesTransformer and alternative model architectures — attention/transformers, long-context (RoPE, YaRN, ALiBi), Mamba/state-space, RWKV, and nanoGPT-scale implementations. Use for "understand/implement a model architecture"; for training it see llm-training-frameworks.
More on Zeplik
Try Gemini CLI on Zeplik
Every model, one chat. Bring the Gemini CLI skill into your next conversation and let the assistant do the work.