gemini-cli

Execute Gemini CLI commands for AI-powered coding assistance, file analysis, and complex development tasks. Use when user wants to run gemini commands, query Gemini models, or leverage Gemini's agentic capabilities.

allowed_tools: Bash, Read, Write

$ Installieren

git clone https://github.com/CursiveCrow/Cantrip /tmp/Cantrip && cp -r /tmp/Cantrip/.claude/skills/gemini-cli ~/.claude/skills/Cantrip

// tip: Run this command in your terminal to install the skill


name: gemini-cli description: Execute Gemini CLI commands for AI-powered coding assistance, file analysis, and complex development tasks. Use when user wants to run gemini commands, query Gemini models, or leverage Gemini's agentic capabilities. allowed-tools:

  • Bash
  • Read
  • Write

Gemini CLI Skill

Purpose

Execute Google's Gemini CLI - an open-source AI agent that brings Gemini directly into the terminal. Gemini CLI uses a ReAct loop with built-in tools and MCP servers to complete complex tasks like fixing bugs, creating features, and improving test coverage.

Activation Triggers

Use this skill when the user:

  • Asks to "run gemini" or "use gemini cli"
  • Wants to query Gemini models from the terminal
  • Needs Gemini's agentic file/code operations
  • Wants to leverage Gemini's 1M token context window
  • Requests MCP server interactions via Gemini

Invocation Modes

Interactive Mode (REPL)

gemini -m gemini-3-pro-preview            # Default: use Gemini 3 Pro
gemini -m gemini-3-pro-preview --yolo     # Auto-approve all tool calls
gemini -m gemini-3-pro-preview --sandbox  # Run tools in isolated environment
gemini -m gemini-3-pro-preview --checkpointing  # Enable project snapshots

Important: Always use -m gemini-3-pro-preview for best results.

Non-Interactive Mode

gemini -m gemini-3-pro-preview -p "Explain this codebase architecture"
gemini -m gemini-3-pro-preview -p "Fix the bug in auth.ts" --yolo
gemini -m gemini-3-pro-preview -p "prompt" --output-format json
echo "code" | gemini -m gemini-3-pro-preview

Slash Commands (Interactive Mode)

CommandFunction
/helpDisplay help
/toolsList available tools
/mcpList MCP servers and tools
/statsShow token usage
/compressSummarize context to save tokens
/copyCopy last response to clipboard
/clearClear screen and context
/memory showDisplay GEMINI.md context
/memory refreshReload GEMINI.md files
/chat save <tag>Save conversation
/chat resume <tag>Resume saved conversation
/chat listList saved conversations
/restoreList/restore project checkpoints
/initGenerate GEMINI.md context file
/settingsOpen settings.json editor
/vimToggle Vim mode
/themeChange visual theme
/ide installSet up VS Code integration
/ide enableConnect to VS Code
/bugFile bug report
/quitExit CLI

Context References (@)

Reference files/directories in prompts:

@./src/main.ts           # Single file
@./screenshot.png        # Image
@./src/                  # Directory (recursive)

Shell Commands (!)

!git status              # Execute single command
!                        # Toggle persistent shell mode

Keyboard Shortcuts

ShortcutAction
Ctrl+LClear screen
Ctrl+VPaste text/image
Ctrl+YToggle YOLO mode
Ctrl+XOpen in external editor

Built-in Tools

File Operations:

  • read_file, write_file, replace
  • list_directory, glob
  • search_file_content

Web:

  • google_web_search
  • web_fetch

Shell:

  • Execute shell commands

Memory:

  • save_memory for persistent facts

Command-Line Flags

FlagPurpose
-m, --model <model>Specify model (always use gemini-3-pro-preview)
-p <prompt>Non-interactive single prompt
-i <prompt>Interactive with initial prompt
-d, --debugEnable debug output
--yoloAuto-approve tool calls
--sandboxIsolated tool execution
--checkpointingEnable restore points
--include-directoriesMulti-directory workspace

Configuration

Settings file: ~/.gemini/settings.json or .gemini/settings.json

Key settings:

  • autoAccept - Auto-approve safe tool calls
  • sandbox - Tool isolation mode
  • vimMode - Vim-style editing
  • checkpointing - Enable /restore
  • mcpServers - MCP server definitions

Context file: GEMINI.md (project root or ~/.gemini/)

Custom Commands

Create .gemini/commands/<category>/<name>.toml:

description = "Generate unit test"
prompt = """
Write a comprehensive test for: {{args}}
"""

Invoke as: /<category>:<name> "arguments"

Rate Limits (Free Tier)

  • Google Login: 60 req/min, 1000 req/day
  • API Key: 100 req/day