gemini-cli
Gemini CLI
Interact w/ Google's Gemini CLI locally. Run queries, get responses, compare outputs.
Prerequisites
Gemini CLI must be installed & configured:
- Install: https://github.com/google-gemini/gemini-cli
- Auth: Run
gemini& sign in w/ Google account - Verify:
gemini --version
When to Use
- User asks to "run/ask/use gemini"
- Compare Claude vs Gemini responses
- Get second AI opinion
- Delegate task to Gemini
Usage
IMPORTANT: Use -p flag for non-interactive (headless) one-shot queries. Without -p, gemini opens interactive mode which hangs in automation.
# One-shot query (MUST use -p for non-interactive)
gemini -p "Your prompt"
# Specific model
gemini -p "prompt" -m gemini-3-pro
# JSON output
gemini -p "prompt" -o json
# YOLO mode (auto-approve tool use)
gemini -y -p "prompt"
# File analysis
cat file.txt | gemini -p "Analyze this"
Models (Gemini 3+ only)
| Model | Use case |
|---|---|
gemini-3-pro |
Default, best all-round |
gemini-3-flash |
Fast, lightweight tasks |
Omit -m to use the CLI default (latest stable).
CLI Options
| Flag | Desc |
|---|---|
-p |
Required for headless. Non-interactive prompt |
-m |
Model selection |
-o |
Output: text/json/stream-json |
-y |
Auto-approve all actions (YOLO) |
-d |
Debug mode |
-s |
Sandbox mode |
-r |
Resume session |
-i |
Execute prompt then continue interactive |
Comparison Workflow
- Provide Claude's response first
- Run same query via
gemini -p "prompt" - Present both for comparison
Best Practices
- Always use
-pfor automation/one-shot queries - Quote prompts w/ double quotes
- Use
-o jsonfor parsing - Pipe files for context
More from georgekhananaev/claude-skills-vault
system-architect
System architecture skill for designing scalable, maintainable software systems. Covers microservices/monolith decisions, API design, DB selection, caching, security, and scalability planning.
21skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
12code-quality
Multi-language code quality standards and review for TypeScript, Python, Go, and Rust. Enforces type safety, security, performance, and maintainability. Use when writing, reviewing, or refactoring code. Includes review process, checklist, and Python PEP 8 deep-dive.
12token-optimizer
Reduce token count in prompts, docs, and prose. Covers prompt compression (40-60% savings), doc formatting, TOON data serialization, and Strunk's prose clarity rules. Use when compressing prompts, optimizing docs for LLM context, or writing clear technical prose.
12file-converter
Convert & transform files - images (resize, format, HEIC), markdown (PDF/HTML), data (CSV/JSON/YAML/TOML/XML), SVG, base64, text encoding. Cross-platform, single & batch mode. This skill should be used when converting file formats, resizing images, generating PDFs from markdown, or transforming data between formats.
12brainstorm
Transform ideas into fully-formed designs through collaborative dialogue. This skill should be used when brainstorming features, exploring implementation approaches, designing system architecture, or when the user has a vague idea that needs refinement. Uses incremental validation with 200-300 word sections.
11