agentleFS
choughtonchoughton/feature-design-prompt-templates/skills/gemini/SKILL.md

gemini

Skill1 starsChanged 6 months agoMITView on GitHub

Invoke Google's Gemini CLI from inside a Claude session to get an independent response from a non-Claude model. Trigger when the user asks to "ask Gemini", "get Gemini's take", "have Gemini review", "second opinion from Gemini", "run this past Gemini", or when running a multi-model crossfire that needs an independent Google-side perspective. Sends a prompt to Gemini via `gemini -p` and returns the plain-text response. Used by the feature-design plugin's crossfire stages but also independently useful for any second-opinion task.

  • Reads credentials
  • Deletes or force-pushes
  • Installs packages

63 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use voice-call, BlueBubbles and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • seedprodSkill

    voice-call

    Start voice calls via the OpenClaw voice-call plugin.

    Also in 14 projects that use this

  • jiulingyunSkill

    BlueBubbles

    为Clawdbot构建或更新BlueBubbles外部通道插件(扩展包,REST发送/探测,webhook入站)。

    Also in 14 projects that use this

  • AlekseiULSkill

    TubeScribe

    YouTube video summarizer with speaker detection, formatted documents, and audio output. Works out of the box with macOS built-in TTS. Optional recommended tools (pandoc, ffmpeg, mlx-audio) enhance quality. Requires internet for YouTube access. No paid APIs or subscriptions. Use when user sends a YouTube URL or asks to summarize/transcribe a YouTube video.

    Also in 3 projects that use this

  • seedprodSkill

    imsg

    iMessage/SMS CLI for listing chats, history, watch, and sending.

    Also in 15 projects that use this

  • AtomicBot-aiSkill

    taskflow-inbox-triage

    Also in 4 projects that use this

  • jiulingyunSkill

    SAG

    具有mac风格say用户体验的ElevenLabs文本转语音。

    Also in 15 projects that use this

  • +6 more from seedprod
  • Other versions63 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 63

    1. moltbot/clawdbot★ 394ksame name
    2. steipete/warelay★ 394ksame name
    3. steipete/clawdis★ 394ksame name
    4. moltbot/moltbot★ 394ksame name
    5. clawdbot/clawdbot★ 394ksame name
    6. openclaw/openclaw★ 394ksame name
    7. molt-bot/clawdbot★ 391ksame name
    8. spinabot/brigade★ 11ksame name
    9. the-open-agent/openagent★ 5.7ksame name
    10. casibase/casibase★ 5.7ksame name

    53 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 58 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT trigger when:

    line 16
  2. Distinctive:

    Before this skill works, the user must have:

    line 23
  3. Very specific:

    If none is set, gemini -p will either drop into an OAuth flow (which won't work in non-interactive context) or error.

    line 31
  4. Distinctive:

    If unavailable, tell the user:

    line 41
  5. Distinctive:

    Stop. Do not attempt the call.

    line 45
  6. Distinctive:

    Run from the project's working directory so Gemini can read files referenced in the prompt.

    line 57
  7. Distinctive:

    If you want a guaranteed-clean Gemini call:

    line 100

“Common” is measured: kept by at least 6 in 10 of the 58 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Gemini CLI Runner

Invokes Google's Gemini CLI in non-interactive mode to get an independent response from a non-Claude model. The skill shells out via the Bash tool, captures stdout, and returns the response cleanly.

When to use

  • The user explicitly asks to consult Gemini ("ask Gemini", "what does Gemini think", "second opinion from Gemini")
  • A crossfire-style multi-model review needs an independent Google-side perspective
  • The user wants an external check on a design, code change, or argument and Gemini is the chosen reviewer

Do NOT trigger when:

  • The user is asking about Gemini CLI itself (use docs, not this skill)
  • The task can be answered from your own knowledge — don't pay the latency for nothing
  • Gemini CLI isn't installed (see "Setup check" below)

Setup the user needs

Before this skill works, the user must have:

  1. Gemini CLI installed and on PATH. Install with npm install -g @google/gemini-cli (Node 20+).
  2. Auth configured — pick one:
    • API key (headless-friendly): GEMINI_API_KEY env var, obtained from https://aistudio.google.com/app/apikey. This is the path of least friction for shell-out.
    • OAuth ("Sign in with Google"): First run gemini interactively, complete the browser flow, then cached credentials live in ~/.gemini/. Free-tier OAuth has stricter quotas than API key.
    • Workspace / Vertex: Set GOOGLE_APPLICATION_CREDENTIALS + GOOGLE_CLOUD_PROJECT (+ GOOGLE_CLOUD_LOCATION for Vertex).

If none is set, gemini -p will either drop into an OAuth flow (which won't work in non-interactive context) or error. Detect and tell the user.

How to invoke

Step 1 — Check that Gemini is available

command -v gemini && gemini --version

If unavailable, tell the user:

Gemini CLI doesn't appear to be installed or on PATH. Install with npm install -g @google/gemini-cli (Node 20+ required), then either set GEMINI_API_KEY or run gemini once interactively to complete OAuth, then retry.

Stop. Do not attempt the call.

Step 2 — Construct the prompt

Same as the Codex skill — assemble the prompt from the user's request, file contents, or a parent-flow-supplied template. For long prompts, use a file rather than inline shell-arg quoting.

Step 3 — Run Gemini from the project directory

gemini -p "$PROMPT" --output-format text -m flash 2>/dev/null

Run from the project's working directory so Gemini can read files referenced in the prompt. Crossfire reviewers read the project's docs and code via the CLI's filesystem tools — they don't just respond to inlined text.

Flag rationale:

  • -p — mandatory for non-interactive use. Without it, Gemini drops into the REPL when stdin is a TTY.
  • --output-format text — plain text on stdout. Use --output-format json for {response, stats, error} if the parent flow needs structured output.
  • -m flash — pick the fast/cheap model. For higher-quality reviews use -m pro (or whatever the current top-tier model is). Defer to user preference if specified.
  • 2>/dev/null — suppresses Gemini's progress/spinner output.

Note: Gemini auto-loads GEMINI.md from the cwd as additional context, similar to Claude's CLAUDE.md. For crossfire this is fine — it's project-scoped context the reviewer should see. If you specifically need a clean run with no project context, run from a temp directory (but you'll lose file-access to the very docs the prompt references — almost never what you want for crossfire).

For long prompts:

gemini -p "$(cat /path/to/prompt.md)" --output-format text -m flash 2>/dev/null

Or pipe stdin:

cat /path/to/prompt.md | gemini -p "Review the following:" --output-format text -m flash 2>/dev/null

Step 4 — Capture and return

Capture stdout. Present back with framing:

Gemini says:

<response>

Optional flags worth knowing

  • --approval-mode yolo (or --yolo) — auto-approves any tool calls Gemini wants to make. Only relevant if the prompt encourages tool use; for pure text-in/text-out reviews, prompt phrasing keeps things clean and you don't need this.
  • -m <model> — pin a specific model when the user requests one.
  • --output-format stream-json — for streaming JSON events. Use only if the parent flow consumes streamed structured output.

Context-leak gotchas

Gemini auto-loads two things from the working directory that can contaminate output:

  1. GEMINI.md — analogous to CLAUDE.md. If the cwd has one, it gets loaded as context. For deterministic crossfire, run from a clean directory or a temp dir.
  2. .gemini/.env — environment overrides. Loaded from cwd up the directory tree, then ~/.gemini/.env. Variables can leak from project-specific configs.

If you want a guaranteed-clean Gemini call:

TEMP_DIR=$(mktemp -d)
cd "$TEMP_DIR"
gemini -p "$PROMPT" --output-format text -m flash 2>/dev/null
cd - >/dev/null
rm -rf "$TEMP_DIR"

Error handling

SymptomLikely causeAction
command not foundGemini CLI not installedInstall per Setup section
Hangs / browser opensOAuth flow triggered in non-interactive contextSet GEMINI_API_KEY instead of relying on OAuth
Exit code 42Input error (malformed prompt, empty stdin where one was expected)Check prompt construction
Exit code 53Turn limit reachedShouldn't happen on single-turn -p calls; if it does, the prompt may have triggered tool-use loops
Quota exceededFree-tier OAuth quota hitSwitch to GEMINI_API_KEY (paid tier) or wait for reset

Windows / Cowork sandbox note

Same caveat as the Codex skill: the user's Gemini CLI is likely installed on Windows; Cowork's Bash runs in a Linux sandbox. If the sandbox can't reach the host binary, install Gemini CLI inside the sandbox (npm install -g @google/gemini-cli) and pass GEMINI_API_KEY as an env var so auth survives the ephemeral sandbox.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.