gemini
@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.
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.
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.
More from alpoxdev/hypercore
bug-fix
[Hyper] Analyze bugs, present repair options, then implement and verify the user-selected fix path. Routes simple bugs directly; tracks complex multi-phase investigations via .hypercore/bug-fix/ JSON flow.
47tanstack-start-architecture
[Hyper] Enforce TanStack Start architecture in existing Start projects, especially route structure, server functions, loader/client-server boundaries, importProtection, hooks, SSR/hydration, and hypercore conventions. Use before structural code changes, route work, server function work, or architecture audits in TanStack Start codebases.
45crawler
[Hyper] Investigate websites with Playwriter plus CDP to choose a crawl strategy, capture API/auth evidence, document findings under `.hypercore/crawler/[site]/`, and generate crawler code only after discovery is grounded.
45research
[Hyper] Produce a multi-source, source-backed markdown research report for fact-finding, comparisons, market/trend analysis, or evidence-backed recommendations across live web, official docs, GitHub, and local repo sources. Use when synthesis and citations are needed, not for one-source lookups.
45genius-thinking
[Hyper] Generate and prioritize differentiated ideas for stuck product, strategy, or innovation problems when ordinary brainstorming is too shallow. Saves structured multi-file analysis under .hypercore/genius-thinking/[topic-slug]/ with phase tracking.
44pre-deploy
[Hyper] Run deploy-readiness validation and fix reproduced lint/typecheck/build blockers for Node.js, Rust, and Python repos. Use for pre-deploy checks, deploy-ready requests, or final quality/build gates before deployment.
44