gemini
[Hyper] Use when the user wants to invoke Google Gemini CLI (`gemini`) for reasoning, research, or AI assistance. Trigger phrases: "use gemini", "ask gemini", "run gemini", "call gemini", "gemini cli", "Google AI", "Gemini reasoning", or when users request Google's Gemini models, research with web search, plan-mode review, or want to resume a previous Gemini session. Do not use for generic writing, runbook cleanup, or local edits that do not require the Gemini CLI.
How do I install this agent skill?
npx skills add https://github.com/alpoxdev/hypercore --skill geminiIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides a secure interface for interacting with the official Google Gemini CLI. It incorporates preflight installation checks, enforces non-interactive headless mode for automation, and strictly defines approval modes to ensure user oversight. All external dependencies and tool references point to official Google resources.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerwarn
5/7 files flagged
What does this agent skill do?
@rules/routing.md
Gemini Skill
<output_language>
Default all user-facing deliverables, saved artifacts, reports, plans, generated docs, summaries, handoff notes, commit/message drafts, and validation notes to Korean, even when this canonical skill file is written in English.
Preserve source code identifiers, CLI commands, file paths, schema keys, JSON/YAML field names, API names, package names, proper nouns, and quoted source excerpts in their required or original language.
Use a different language only when the user explicitly requests it, an existing target artifact must stay in another language for consistency, or a machine-readable contract requires exact English tokens. If a localized template or reference exists (for example *.ko.md or *.ko.json), prefer it for user-facing artifacts.
</output_language>
Wrap the official Google Gemini CLI for reasoning, research, plan-mode review, and session continuation. The CLI must be invoked headlessly with -p / --prompt — positional prompts open the interactive REPL.
<instruction_contract>
| Field | Contract |
|---|---|
| Intent | Build, run, or explain a safe gemini CLI invocation when the user explicitly asks for Gemini CLI or Gemini models. |
| Scope | Owns Gemini CLI command shape, headless prompt usage, approval mode choice, model selection only when requested, resume flows, preflight checks, and result summarization. |
| Authority | User intent and local project rules come first; installed CLI help and official Gemini CLI docs govern flags when current behavior matters. |
| Evidence | Ground the answer in preflight checks, command shape, CLI output, approval mode, and observed warnings/errors. |
| Tools | Use shell execution only when the user wants the CLI run; otherwise provide the command or route away. |
| Output | Return the exact command used or recommended, summarize output/warnings, and preserve CLI/model tokens verbatim. |
| Verification | Check gemini is installed before command construction, non-interactive runs use -p, edit/yolo modes are explicit, and model overrides are user-requested. |
| Stop condition | Stop after the requested Gemini command is constructed or run and its result, warnings, or blocker are reported. |
</instruction_contract>
Defaults
| Parameter | Default |
|---|---|
| Model selection | Use the Gemini CLI default (-m auto) unless the user explicitly asks for -m pro, -m flash, -m flash-lite, or a specific id |
| Approval mode | --approval-mode default (prompts on every tool call) |
| Headless mode | -p / --prompt |
| Resume target | gemini --resume latest (or gemini -r for the most recent) |
| Output format | text (use --output-format json only when the caller needs structured output) |
Do NOT specify -m unless the user explicitly requested a model. Auto routing picks Pro for reasoning and Flash for execution.
Routing
Use this skill only when the request actually needs the Gemini CLI or a Gemini session.
- Read rules/routing.md before building a command when the request might be out of scope.
- Route away to direct editing or another skill when the user wants generic writing, runbook cleanup, or local edits without needing the Gemini CLI.
Examples
Positive examples:
- "Use Gemini to review this architecture and list risks."
- "Run
gemini -pand research the current API behavior." - "Ask Gemini Pro to reason about this design tradeoff."
- "Resume the latest Gemini session and continue the analysis."
Negative examples:
- "Rewrite this runbook for readability."
- "Make this local code edit directly."
- "Create a new skill for this repo."
Boundary examples:
- "Research Gemini CLI approval modes and explain them."
Use this skill only if the user wants the
geminiCLI involved; otherwise route to research or direct documentation work.
CRITICAL: Headless Mode
Always use -p / --prompt for non-interactive Gemini runs. A positional prompt drops into the interactive REPL and blocks automation.
# Correct — non-interactive
gemini --approval-mode default -p "your prompt here"
# Interactive (do not use for automation)
gemini "your prompt here"
If you need to seed the prompt and then keep talking interactively, use -i / --prompt-interactive instead. -p is for one-shot, automated runs.
Running a Task
Read references/recipes.md for concrete command recipes before changing approval modes, adding sandboxing, picking a model, or resuming a session.
Approval Mode Selection
| Flag | When to use |
|---|---|
--approval-mode default | General research, reasoning, and standard Gemini usage |
--approval-mode auto_edit | Only when the user explicitly asks Gemini to edit files |
--approval-mode plan | Read-only planning or analysis with no code modifications (write is restricted to Markdown in the plans directory) |
--approval-mode yolo | Only after the user explicitly approves a full-auto run. Prefer this spelling — the bare --yolo flag is deprecated. |
Command Discipline
- Start from
gemini --approval-mode default -p "your prompt here". - Add
-m <pro|flash|flash-lite|auto|model-id>only when the user explicitly asks for a specific Gemini model. - Use
--approval-mode auto_editfor normal edits instead of full auto-approve. - Ask before using
--approval-mode yolo. Prefer--approval-mode auto_editor--sandboxfirst. - Add
--sandbox(-s) when the task is higher-risk or you want tighter local constraints. - Pass extra workspaces with
--include-directories /path/a,/path/bwhen Gemini needs context outside the current folder. - Use
--output-format jsononly when the caller will parse the response programmatically.
Resuming a Session
gemini --resume latest -p "your follow-up prompt"
gemini --list-sessions
gemini --delete-session 2
--resume accepts latest, an index from --list-sessions, or a full session UUID. Inside an interactive session, use /resume to open the Session Browser and /rewind to step backward.
When resuming, keep the existing session behavior and do not change model or approval mode unless the user asks.
After Completion
- Summarize the result, including any warnings or partial output.
- Tell the user they can resume with
gemini --resume latest(orgemini -r). - Ask whether to continue, adjust the prompt, or switch back to direct work.
Critical Evaluation
Treat Gemini as a colleague, not an authority.
- Trust your knowledge when confident. Push back on incorrect claims directly.
- Research disagreements using current sources or docs before accepting Gemini's claims.
- Remember knowledge cutoffs — Gemini may not know about recent releases or API changes.
- When freshness matters, ask Gemini for current sources and verify important claims against docs or primary sources.
- Let the user decide when there is genuine ambiguity.
Preflight Check
Before building any command, verify the CLI is installed and on PATH:
command -v gemini >/dev/null 2>&1 || { echo "gemini CLI not found"; exit 1; }
If the check fails, route to the install handler in Error Handling below instead of constructing a gemini ... command.
Error Handling
command not found: gemini: tell the user to install withnpm install -g @google/gemini-cli(orbrew install gemini-cli).- Auth errors: run
geminiand complete the sign-in flow, or setGEMINI_API_KEY. For Vertex AI, setGOOGLE_API_KEYandGOOGLE_GENAI_USE_VERTEXAI=true. - 429 / rate limit: free tier is 60 req/min, 1000 req/day on Gemini 3 — wait or upgrade.
- 404 / model not found: retry without
-m, or pickpro/flash/flash-litefromgemini --helpand the official docs. - 403 / access denied: check the active auth path and retry with a supported model or account configuration.
- Session not found: run
gemini --list-sessions. - Exit code
42means input error (bad flag/prompt);53means turn limit exceeded.
Version Notes
- Targets Gemini CLI v0.40.0 behavior; minimum supported v0.21.1 (Gemini 3 routing).
--yolois deprecated; the canonical form is--approval-mode yolo.- Plan Mode is enabled by default; trigger explicitly with
--approval-mode planor/planin-session. - Headless mode auto-activates in non-TTY environments and whenever
-pis supplied.
<validation_checklist>
- The request explicitly needs Gemini CLI, Gemini models, or a Gemini session.
-
command -v geminior equivalent preflight is checked before constructing a runnable command. - Non-interactive runs use
-p/--prompt; positional prompts are not used for automation. - Model flags are omitted unless the user explicitly requested a model.
-
auto_editandyoloapproval modes are used only under their documented gates. - Final output includes the command shape, observed result, warnings, and any install/auth/rate/model blocker.
</validation_checklist>
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/alpoxdev/hypercore/gemini">View gemini on skillZs</a>