content/skills/ai-llm-skills/gemini/SKILL.md
Execute Gemini CLI for code generation, review, analysis, and web research. Use when tasks need a second AI perspective, Google Search grounding, codebase architecture analysis, or current web information. Trigger whenever the user mentions gemini, asks for Google Search results, needs real-time web data, wants codebase investigation, or requests a different AI's opinion on code.
npx skillsauth add bahayonghang/my-claude-code-settings geminiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run Gemini CLI for $ARGUMENTS.
geminiGEMINI_MODELgemini-3.1-pro-previewGEMINI_FAST_MODELgemini-3.1-flash-preview-m <model>GEMINI_MODEL in the shell or model.name in Gemini CLI settings.jsonauto or gemini-2.5-procommand -v geminiGet-Command gemininpm install -g @google/gemini-cligemini --versiongemini setup or switch GEMINI_MODEL to auto or gemini-2.5-pro.Default command examples in this skill use explicit model literals so the planned run header and the CLI invocation stay in sync.
Use shell variables or config only when you intentionally want to honor an override outside the default skill path.
GEMINI_MODEL="${GEMINI_MODEL:-gemini-3.1-pro-preview}"
GEMINI_FAST_MODEL="${GEMINI_FAST_MODEL:-gemini-3.1-flash-preview}"
if (-not $env:GEMINI_MODEL) { $env:GEMINI_MODEL = "gemini-3.1-pro-preview" }
if (-not $env:GEMINI_FAST_MODEL) { $env:GEMINI_FAST_MODEL = "gemini-3.1-flash-preview" }
Official override order for the effective model:
--modelGEMINI_MODELsettings.json value at model.nameautoBefore any gemini invocation, emit this text block exactly once:
Planned AI Run
- Tool: Gemini CLI
- Mode: <generate | analyze | review | fast-path | compatibility-fallback | structured-output>
- Model: <literal model id>
- Runtime: <approval=yolo, output=text | approval=yolo, output=json>
- Search: <grounded when requested | off>
- Access: <yolo | review-safe>
- Workdir: <path or current>
Rules:
-m flag.grounded when requested only when the task depends on Gemini's web or
Google-grounded capabilities; otherwise use off.compatibility-fallback when dropping to gemini-2.5-pro or auto, and
say so in the header.When a task depends on Google Search or web_fetch, keep the first pass
read-only by default.
$ARGUMENTS is empty, ask the user for the task description.gemini-3.1-pro-preview.gemini-3.1-flash-preview for fast or lower-priority tasks.gemini-2.5-pro or auto only as explicit compatibility fallbacks.Planned AI Run
- Tool: Gemini CLI
- Mode: <generate | analyze | review | fast-path | compatibility-fallback | structured-output>
- Model: <literal model id>
- Runtime: <approval=yolo, output=text | approval=yolo, output=json>
- Search: <grounded when requested | off>
- Access: <yolo | review-safe>
- Workdir: <path or current>
web_fetch, start with a
research-only pass and keep the prompt read-only:
gemini "$ARGUMENTS. Use grounded search when needed. Collect sources and facts only. Do not modify files." -m gemini-3.1-pro-preview --approval-mode yolo -o text 2>&1
gemini "$ARGUMENTS" -m gemini-3.1-pro-preview --approval-mode yolo -o text 2>&1
gemini "$ARGUMENTS" -m gemini-3.1-flash-preview --approval-mode yolo -o text 2>&1
gemini "$ARGUMENTS" -m gemini-2.5-pro --approval-mode yolo -o text 2>&1
Mode: structured-output, set Runtime: approval=yolo, output=json, and run:gemini "$ARGUMENTS" -m gemini-3.1-pro-preview --approval-mode yolo -o json 2>&1
gemini-2.5-pro or auto and mark the header as Mode: compatibility-fallback.# 1. Generate
gemini "Create [description]" -m gemini-3.1-pro-preview --approval-mode yolo -o text
# 2. Review
gemini "Review [file] for bugs and security issues" -m gemini-3.1-pro-preview -o text
# 3. Fix
gemini "Fix these issues in [file]: [list]. Apply now." -m gemini-3.1-pro-preview --approval-mode yolo -o text
Use a shell-appropriate background command.
gemini "[long task]" -m gemini-3.1-pro-preview --approval-mode yolo -o text > gemini.log 2>&1 &
echo $!
Start-Process gemini -ArgumentList @("[long task]", "-m", "gemini-3.1-pro-preview", "--approval-mode", "yolo", "-o", "text") -RedirectStandardOutput "gemini.log" -RedirectStandardError "gemini.err"
Use both AIs for highest quality. Claude can generate while Gemini reviews, or the reverse, to catch different classes of issues.
references/reference.md - CLI flags, configuration, model precedence, session managementreferences/templates.md - prompt templates for common operationsreferences/patterns.md - integration patterns and workflows using the shared model variablesreferences/tools.md - Gemini built-in tools such as google_web_search, codebase_investigator, and save_memorydevelopment
Turn vague or complex Codex tasks into strong `/goal` commands with outcome, verification, constraints, boundaries, iteration policy, completion evidence, and pause/block conditions. Use when the user asks for Codex goal instructions, Goal 指令, 目标指令, `/goal` prompts, 中文 Goal 模板, plan-to-goal interviews, success criteria, verification commands, or bounded agent work definitions.
tools
Write, debug, and validate ast-grep structural code search rules. Use this skill when the user needs syntax-aware code search, AST pattern matching, structural refactor discovery, language-construct queries, or searches that plain text tools like rg can miss, such as finding functions with particular descendants, calls inside specific contexts, missing error handling, React hook shapes, decorators, or other Tree-sitter-backed code structures.
development
Use when the user asks to ground an ambitious proposal, avoid over-grand designs, make a bold direction executable, pressure-test feasibility, prevent "too much vision and too little landing", or turn a strategy/refactor/product idea into the smallest verifiable first move with stop rules. Trigger for requests such as 落地, 先落地, 别太飘, 收一收, 可执行, 可验证, 止损, and for follow-ups after geju-style big-picture thinking. Do not trigger for ordinary code review or implementation unless the user explicitly asks to ground or shrink the plan first.
development
Use when the user explicitly asks to think bigger, open up the design space, challenge conservative design, avoid over-indexing on backward compatibility, escape local-detail fixation, or make a bold high-level product or architecture direction call. Use for strategic reframing, not for ordinary code review, PRD writing, implementation planning, or adversarial risk review.