Skip to content
omega-gemini-cli logo

Gemini CLI Skill

omega-gemini-cli

Use when the user wants to use Google Gemini for analysis, large files or codebases, sandbox execution, or brainstorming. Uses headless Gemini CLI scripts (no MCP). Triggers on "use Gemini", "analyze with Gemini", "large file", "sandbox", "brainstorm with Gemini".

oimiragieo/agent-studio0installs43stars

SKILL.md

Full skill instructions

Gemini CLI Skill

Headless wrapper for Google Gemini CLI. Sends prompts via stdin to gemini -p "" --yolo. Free tier available — no API key required (Google OAuth only).

When to Use

  • Get a Google Gemini perspective on any question
  • Free-tier AI consultation (no API key costs)
  • Code review from Gemini's model
  • Brainstorming and analysis tasks
  • Cross-validation of Claude's own responses
  • Large files or codebases that benefit from Gemini's context window
  • Sandbox execution (run/​test code via Gemini)

Response Times

Gemini CLI runs as a subprocess and includes model startup time:

  • Simple Q&A / news query: ~2 minutes
  • Codebase or large-file review: ~5–10 minutes

Set expectations with the user before running long tasks.

Usage

Ask a question

node .claude/​skills/​omega-gemini-cli/​scripts/​ask-gemini.mjs "What is the best caching strategy for a Node.js API?"

Specify model (short or long flag)

node .claude/​skills/​omega-gemini-cli/​scripts/​ask-gemini.mjs "Explain async/​await" --model gemini-2.5-flash
node .claude/​skills/​omega-gemini-cli/​scripts/​ask-gemini.mjs "Explain async/​await" -m gemini-2.5-flash

JSON output

node .claude/​skills/​omega-gemini-cli/​scripts/​ask-gemini.mjs "List 5 design patterns" --json
# Returns: {"response":"..."} on success, {"error":"...","raw":"..."} on parse failure

Code sandbox (short or long flag)

node .claude/​skills/​omega-gemini-cli/​scripts/​ask-gemini.mjs "Write and run a fibonacci function" --sandbox
node .claude/​skills/​omega-gemini-cli/​scripts/​ask-gemini.mjs "Write and run a fibonacci function" -s

Stdin usage

echo "Explain recursion" | node .claude/​skills/​omega-gemini-cli/​scripts/​ask-gemini.mjs

File review (embed content in prompt)

node .claude/​skills/​omega-gemini-cli/​scripts/​ask-gemini.mjs "Review this code: $(cat src/​auth.ts)"

Availability Check

node .claude/​skills/​omega-gemini-cli/​scripts/​verify-setup.mjs
# Exit 0 = available (Node 18+ and Gemini CLI found)
# Exit 1 = not installed or too old

Scripts

ScriptPurpose
ask-gemini.mjsCore headless wrapper — sends prompt via stdin
parse-args.mjsArgument parser (--model/​-m, --json, --sandbox/​-s)
verify-setup.mjsAvailability check (Node 18+, Gemini CLI via PATH or npx)
format-output.mjsOutput normalization (JSON envelope handling)

Flags

FlagShortDescription
--model MODEL-mGemini model (e.g., gemini-2.5-flash, gemini-2.5-pro)
--jsonMachine-readable JSON output: {"response":"..."} envelope
--sandbox-sCode execution sandbox mode

Models (2026)

Model IDNotes
gemini-3-pro-previewLatest (2026), highest capability
gemini-3-flash-previewLatest (2026), faster
gemini-2.5-proStable, high capability
gemini-2.5-flashRecommended: lower quota/​latency
gemini-2.5-flash-liteLightest, fastest, lowest quota usage

Exit Codes

CodeMeaning
0Success
1Error (CLI failure, auth issue, JSON parse failure with --json)
9009Windows: command not found (falls back to npx automatically)

Slash Commands (when installed in a project with .claude/​commands/)

CommandPurpose
/​analyzeRun headless script with user's prompt (and any @ file refs)
/​sandboxRun with --sandbox; execute or test code
/​omega-geminiAlias: run headless for analysis, sandbox, or brainstorm as appropriate
/​brainstormBrainstorm mode (build prompt with challenge + optional methodology)
/​omega-gemini-setupVerify Node and Gemini CLI; guide user to install and auth. No MCP.

Anti-Patterns & Iron Laws

  1. ALWAYS use verify-setup.mjs before first use
  2. NEVER pass prompt as positional arg to raw gemini CLI — use ask-gemini.mjs wrapper
  3. ALWAYS validate model parameter (wrapper validates via regex ^[a-zA-Z0-9._-]+$ on Windows)
  4. NEVER assume gemini is on PATH — wrapper handles npx @google/​gemini-cli fallback automatically
  5. ALWAYS handle exit code 1 and 9009 gracefully
  6. ALWAYS set user expectations about response time before running (2–10 minutes typical)

Integration Notes

  • Auth: One-time Google OAuth via gemini interactive session (run gemini once to sign in)
  • Rate limits: Governed by Gemini API quotas (generous for personal use on free tier)
  • Platform: Full cross-platform; Windows uses shell: true with model validation; non-Windows uses array args (no shell)
  • npx fallback: On PATH miss, automatically retries with npx -y @google/​gemini-cli
  • No timeout flag: Unlike other omega wrappers, gemini wrapper has no --timeout-ms
  • Stdin delivery: Prompt always sent via stdin to avoid shell argument length limits (8191-char cmd.exe limit on Windows, ARG_MAX on Linux/​macOS)
  • JSON envelope: --json wraps output as {"response":"..."} on success or {"error":"...","raw":"..."} on failure

Requirements

  • Node.js 18+ to run the scripts
  • Google Gemini CLI (npm install -g @google/​gemini-cli) with one-time Google sign-in

Memory Protocol

Before work: Read .claude/​context/​memory/​learnings.md After work: Append findings to learnings or issues as needed.

Note: Use pnpm search:code to discover references to this skill codebase-wide.

More skills from oimiragieo

cloud-devops-expert logo
oimiragieo/agent-studio

cloud-devops-expert

Cloud and DevOps expert including AWS, GCP, Azure, and Terraform

43 0
View
xlsx logo
oimiragieo/agent-studio

xlsx

Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.

43 0
View
project-analyzer logo
oimiragieo/agent-studio

project-analyzer

Automated brownfield codebase analysis with weighted keyword scoring, three-stream analysis, and design pattern recognition. Detects project type, frameworks, dependencies, architecture patterns, and generates comprehensive project profile.

43 0
View
readme logo
oimiragieo/agent-studio

readme

Use when creating, updating, or generating README and documentation files for projects and libraries

43 0
View
scientific-writing logo
oimiragieo/agent-studio

scientific-writing

Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA/AMA/Vancouver), figure...

43 0
View
android-expert logo
oimiragieo/agent-studio

android-expert

Comprehensive Android development expert covering Jetpack Compose, Kotlin coroutines/Flow, Architecture Components, Hilt DI, Navigation, testing, performance, Material Design 3, and modern Android patterns (MVI, Clean Architecture).

43 0
View
biorxiv-database logo
oimiragieo/agent-studio

biorxiv-database

Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.

43 0
View
gtars logo
oimiragieo/agent-studio

gtars

High-performance toolkit for genomic interval analysis in Rust with Python bindings. Use when working with genomic regions, BED files, coverage tracks, overlap detection, tokenization for ML models, or fragment analysis in computational genomics and machine learning applications.

43 0
View
service-class-conventions logo
oimiragieo/agent-studio

service-class-conventions

Defines the structure and implementation of service classes, enforcing the use of interfaces, ServiceImpl classes, DTOs for data transfer, and transactional management.

43 0
View
diffdock logo
oimiragieo/agent-studio

diffdock

Diffusion-based molecular docking. Predict protein-ligand binding poses from PDB/SMILES, confidence scores, virtual screening, for structure-based drug design. Not for affinity prediction.

43 0
View
skill-discovery logo
oimiragieo/agent-studio

skill-discovery

How agents discover and use skills. Use to understand skill invocation protocol.

43 0
View
yara-authoring logo
oimiragieo/agent-studio

yara-authoring

YARA-X detection rule authoring with expert judgment, linting, atom analysis, and best practices. Teaches how to think like an expert YARA author for malware detection, threat hunting, and indicator-of-compromise identification using YARA-X (the Rust-based successor to legacy YARA).

43 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View