Agent skill

Second Opinion Gemini

by peterkrueck in peterkrueck/Claude-Code-Development-Kit

Get a second opinion from Google's Gemini Pro via the locally installed Gemini CLI (defaults to gemini-3.1-pro-preview; override with the CLAUDESECONDOPINIONMODEL env var).

MITAuto-check: warnings

Install Second Opinion Gemini

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add peterkrueck/Claude-Code-Development-Kit --skill second-opinion-gemini -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install peterkrueck/Claude-Code-Development-Kit second-opinion-gemini --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/peterkrueck/Claude-Code-Development-Kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/second-opinion-gemini .claude/skills/second-opinion-gemini && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
second-opinion-gemini
GitHub stars
1.4k
Token cost
~2.3k tokens
SKILL.md length
1,141 words
Files
2
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Get a second opinion from Google's Gemini Pro via the locally installed Gemini CLI (defaults to gemini-3.1-pro-preview; override with the CLAUDESECONDOPINIONMODEL env var).

  • Works in 3 steps: Prepare the Prompt → Invoke Gemini → Present the Result
  • Explicitly says ask Gemini
  • SKILL.md covers Model selection, Process and Important Rules
  • Calls gemini

What it does

Second Opinion Gemini is an agent skill from peterkrueck/Claude-Code-Development-Kit. Get a second opinion from Google's Gemini Pro via the locally installed Gemini CLI (defaults to gemini-3.1-pro-preview; override with the CLAUDESECONDOPINIONMODEL env var). This is the explicit / fallback engine — invoke ONLY when the user explicitly says "ask Gemini", "Gemini's take", "what does Gemini think", or "ask both" (run alongside the default engine and synthesize). Do NOT trigger on a generic "second opinion", "another perspective", or "cross-check this" — those route to the default second-opinion…

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `SKILL.default.md`).

It works with Google Gemini. The repository describes itself as: Claude Code Workflow for beginners & intermediate users. Tutorial and Installer included. The licence is MIT.

When your agent uses it

  • Explicitly says ask Gemini
  • What does Gemini think
  • Ask both (run alongside the default engine and synthesize)
  • A generic second opinion

Example prompts

  • “ask Gemini”
  • “Gemini”
  • “what does Gemini think”
  • “/second-opinion-gemini”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Prepare the Prompt
  2. Invoke Gemini
  3. Present the Result

What it can do on your machine

Read from SKILL.md and the folder at commit ba85375. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gemini

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Second Opinion Gemini loads about 2.3k tokens when it runs. Until then it costs about 182 tokens; SKILL.md has 1,141 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~182
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningTells the agent its actions are pre-authorized / not to stop for confirmationSKILL.md:87
    ulti-turn conversation autonomously** — do NOT ask the user for permission between rounds. Push back on Gemini's points,

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from peterkrueck/Claude-Code-Development-Kit at commit ba85375, republished under its MIT licence (© peterkrueck). 1,141 words, ~2,342 tokens.

Download SKILL.mdSave it as .claude/skills/second-opinion-gemini/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
second-opinion-gemini
description
Get a second opinion from Google's Gemini Pro via the locally installed Gemini CLI (defaults to gemini-3.1-pro-preview; override with the CLAUDE_SECOND_OPINION_MODEL env var). This is the explicit / fallback engine — invoke ONLY when the user explicitly says "ask Gemini", "Gemini's take", "what does Gemini think", or "ask both" (run alongside the default engine and synthesize). Do NOT trigger on a generic "second opinion", "another perspective", or "cross-check this" — those route to the default `second-opinion` skill. Reserve this for when the user specifically wants Gemini, or as a fallback when the default engine is unavailable. Reports unavailability rather than falling back to a weaker model.
user_invocable
false

Second Opinion — Gemini (explicit / fallback engine)

Get an independent second opinion from Google's Gemini Pro. This model has a completely different architecture and training from Claude, making it genuinely useful for catching blind spots, validating reasoning on edge cases, or surfacing trade-offs you might miss.

This is NOT the default second-opinion engine. Generic second-opinion requests route to the default second-opinion skill. Use this Gemini skill only when:

  • The user explicitly asks for Gemini ("ask Gemini", "Gemini's take", "what does Gemini think").
  • The user says "ask both" — run this and the default second-opinion skill, then synthesize all three views (yours + the default engine's + Gemini's).
  • The default engine was reported unavailable and the user wants the alternate independent voice.

Gemini has full read access to the project — it can read files, grep code, and explore the codebase. Its project instructions (GEMINI.md) tell it to prime itself on the key docs before answering. You provide the specific question and any focused context; Gemini handles the rest.

Model selection

Pinned to gemini-3.1-pro-preview by default for quality (smaller models give weaker second opinions; not worth the false confidence they create).

When Google deprecates the preview pin — preview models rotate fast — override per-session or globally:

bash
export CLAUDE_SECOND_OPINION_MODEL=gemini-3.2-pro   # or whatever the current Pro-tier model is

Every invocation below uses the bash pattern ${CLAUDE_SECOND_OPINION_MODEL:-gemini-3.1-pro-preview} — the env var wins if set, otherwise the pinned default.

Do not fall back to a smaller/older model when the pin breaks. Report unavailability and continue with Claude-only analysis.

Process

Step 1: Prepare the Prompt

Gemini has NO access to your conversation history, but it CAN read project files. Structure your prompt as:

  1. Scope (optional) — by default Gemini primes on the whole project. If the question is about one module or component, name it so Gemini reads the right files first (e.g., "This is about the auth module" — detect the relevant module from the file paths you've been working in).
  2. The question — what exactly you want Gemini to weigh in on
  3. Your current thinking (recommended) — share your position so Gemini can challenge it
  4. Specific context (if needed) — pipe code snippets or diffs via stdin when the relevant code is scattered or you want to focus attention on specific sections

For questions about existing project code, you can simply reference file paths — Gemini will read them itself.

Step 2: Invoke Gemini

CRITICAL: Permission-free invocation pattern. The command MUST start with gemini (matches the Bash(gemini:*) allow rule) and MUST NOT use $() command substitution or /tmp/ file redirects — both trigger permission prompts.

Standard call (Gemini reads project files itself — preferred):

bash
gemini -m "${CLAUDE_SECOND_OPINION_MODEL:-gemini-3.1-pro-preview}" -p '<your question here>' -o text

With context piped via stdin (for code snippets, diffs, or focused excerpts — use when context is scattered or you want to focus attention on specific sections):

bash
gemini -m "${CLAUDE_SECOND_OPINION_MODEL:-gemini-3.1-pro-preview}" -p '<your question here>' -o text <<'CONTEXT_EOF'
<relevant code, diff, or context here>
CONTEXT_EOF

The Bash tool captures all output (stdout + stderr) directly — no file redirects needed. Gemini's stderr noise (Loading, Registering, Scheduling, etc.) appears in the output but is easily identified and ignored.

Output markers that mean Gemini did NOT answer:

  • Capacity exhausted (transient): MODEL_CAPACITY_EXHAUSTED, No capacity available, code.*429. Retry later or proceed without second opinion.
  • Model deprecated (permanent): model not found, MODEL_NOT_FOUND, unknown model, model_id_invalid, or 404 paired with the model name. The pinned model is dead — see the unavailable-block below.

Required flags — no exceptions:

FlagWhy
-m "${CLAUDE_SECOND_OPINION_MODEL:-gemini-3.1-pro-preview}"Pro-tier model required; env var lets users self-rescue when the pin breaks
-pNon-interactive headless mode. Tool calls are auto-approved in this mode (-y is not needed)
-o textClean text output, no JSON wrapper noise

DO NOT use:

  • $() command substitution (e.g., GEMINI_RESPONSE=$(gemini ...)) — triggers "Command contains $() command substitution" permission prompt
  • /tmp/ file redirects (e.g., 2>/tmp/gemini-stderr.txt) — triggers "allow access to tmp/" permission prompt
  • Nested heredocs inside $() — same issue

Set a 600-second timeout on the Bash tool call (Gemini may need time to read files and reason through complex questions).

Show full SKILL.md (522 more words)Show less
Step 2b: Multi-Turn Discussion (Autonomous)

When the topic warrants debate (architecture, design reviews, trade-off analysis), run the full multi-turn conversation autonomously — do NOT ask the user for permission between rounds. Push back on Gemini's points, let Gemini push back on yours, iterate until you reach consensus or clearly identify the disagreements. Typically 2-4 rounds.

Resume the session instead of starting fresh to preserve conversation history:

bash
gemini -m "${CLAUDE_SECOND_OPINION_MODEL:-gemini-3.1-pro-preview}" -r latest -p '<your follow-up question>' -o text

You can also resume by session index (-r 6) or session ID (-r <uuid>). Use gemini --list-sessions to see available sessions.

When to use multi-turn:

  • Design reviews or architecture discussions — run the full debate autonomously
  • Gemini's answer is vague — ask it to be specific about the part that matters
  • You want to challenge Gemini's reasoning — push back and see if it holds
  • The question naturally has layers — e.g., "which approach?" then "what are the migration risks of that one?"

When NOT to use multi-turn:

  • The first answer was clear and complete — just present it
  • You're asking an unrelated question — start a fresh session
Step 3: Present the Result

If multi-turn: Present a consolidated synthesis — the key agreements, remaining disagreements, and your joint recommendation. Don't dump each round's raw output; the user wants the conclusion, not the transcript.

If single-turn: Present Gemini's response, then add your own brief synthesis: where you agree, where you disagree, and what the user should take away from both perspectives. The value is in the synthesis, not just the raw second opinion.

If "ask both": Present the default engine's view and Gemini's view side by side, then your synthesis across all three perspectives (yours + both outside models) — flag where the two outside models agree (high confidence) vs. where they diverge (the real decision point).

If Gemini is unavailable — capacity exhausted / 429:

Gemini Pro is currently at capacity. No fallback to a weaker model — only Pro-tier is capable enough for meaningful second opinions, and the value is an independent architecture. Proceeding with my own analysis (or the default engine, if requested).

Do NOT retry with a different model. Do NOT silently fall back. Report unavailability and continue.

If the model is deprecated / not found (the pinned gemini-3.1-pro-preview was rotated out by Google):

The pinned model gemini-3.1-pro-preview is no longer available. Set CLAUDE_SECOND_OPINION_MODEL to a current Gemini Pro-tier model and re-run (check gemini --list-models for current options). Proceeding without a Gemini second opinion for this turn.

Tell the user clearly — this isn't a transient failure; the skill needs an env var update or an upstream patch to keep working.

If there's another error, show the filtered stderr and continue with your own reasoning.

Important Rules

  1. Never fall back to a lesser model. Gemini Pro-tier (gemini-3.1-pro-preview by default, or whatever CLAUDE_SECOND_OPINION_MODEL is set to) or nothing. A weaker model's opinion isn't worth the false confidence it creates.
  2. This is the explicit/fallback engine, not the default. Generic second-opinion requests go to the default second-opinion skill.
  3. Shell quoting matters. For prompts containing single quotes, escape with '\''. For very complex prompts, use stdin heredoc (see Step 2).
  4. Command must start with gemini to match the Bash(gemini:*) allow rule. Never wrap in $() or redirect to /tmp/.

© peterkrueck, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/second-opinion-gemini of peterkrueck/Claude-Code-Development-Kit.

  • SKILL.md
  • SKILL.default.md

Open the folder on GitHubat commit ba85375

Compare with similar skills

Second Opinion Gemini next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Second Opinion Gemini compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Second Opinion Gemini this skillpeterkrueck/Claude-Code-Development-Kit1.4k—~2.3kAutomated safety check: WarnMIT
NotebookLM Research AssistantPleasePrompto/notebooklm-skill7.8k14 repos~2.4kAutomated safety check: NotesMIT
Brand and Design Toolkitnextlevelbuilder/ui-ux-pro-max-skill134k1 repos~3.5kAutomated safety check: PassMIT
AI Image Generation and Editingzhayujie/CowAgent47k—~1.3kAutomated safety check: PassMIT
OpenCLI Smart Search Routerjackwener/OpenCLI30k2 repos~753Automated safety check: PassApache-2.0
NotebookLM Automationteng-lin/notebooklm-py20k—~4.1kAutomated safety check: PassMIT

Similar skills

  • NotebookLM Research Assistant

    PleasePrompto/notebooklm-skill

    Lets Claude Code ask questions of your Google NotebookLM notebooks through browser automation and return answers grounded in your uploaded sources.

    7.8k GitHub starsUsed in 14 repos~2.4k tokens
    Knowledge ManagementAuto-check: notes
  • Brand and Design Toolkit

    nextlevelbuilder/ui-ux-pro-max-skill

    Bundles design tasks behind one skill: brand identity, tokens, UI styling, logos, corporate identity mockups, slides, banners, icons and social images.

    134k GitHub starsUsed in 1 repo~3.5k tokens
    Media & CreativeAuto-check passed
  • Generates or edits images from text prompts through a Python script that picks an image backend based on which API keys are configured.

    47k GitHub stars~1.3k tokensUpdated today
    Media & CreativeAuto-check passed
  • Routes a search question to the most suitable opencli source, normally one AI site plus up to two specialist sites, with call limits per question and a recap at the end.

    30k GitHub starsUsed in 2 repos~753 tokens
    Productivity & AutomationAuto-check passed
  • NotebookLM Automation

    teng-lin/notebooklm-py

    Installs, authenticates and operates Gemini Notebook (NotebookLM) through the notebooklm-py CLI or its typed async Python API, for notebooks, sources, grounded chat and generated artifacts.

    20k GitHub stars~4.1k tokensUpdated 2 days ago
    Knowledge ManagementAuto-check passed
  • Nano Banana Pro Prompts Recommend Skill

    YouMind-OpenLab/nano-banana-pro-prompts-recommend-skill

    Recommend suitable prompts from 10,000+ Nano Banana Pro image generation prompts based on user needs.

    1.9k GitHub starsUsed in 1 repo~4.1k tokens
    Media & CreativeAuto-check passed

More from peterkrueck/Claude-Code-Development-Kit

All 9 skills in this repo
  • Image Edit

    peterkrueck/Claude-Code-Development-Kit

    Edit images with precision — crop, resize, mirror, rotate, trim, and reframe.

    1.4k GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Image Gen

    peterkrueck/Claude-Code-Development-Kit

    Generate character art and image variations using AI image generation (Google Gemini) with reference images for style and character consistency.

    1.4k GitHub stars~1.4k tokensUpdated 2 mo ago
    Auto-check passed
  • Bg Remove

    peterkrueck/Claude-Code-Development-Kit

    Remove backgrounds from images using local AI (rembg). An agent skill from peterkrueck/Claude-Code-Development-Kit.

    1.4k GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Context7 Guidance

    peterkrueck/Claude-Code-Development-Kit

    Fetch CURRENT library/framework/API/CLI documentation via Context7 instead of relying on training data.

    1.4k GitHub stars~671 tokensUpdated 2 mo ago
    Auto-check passed
  • Second Opinion

    peterkrueck/Claude-Code-Development-Kit

    Get a second opinion from OpenAI's Codex CLI running locally.

    1.4k GitHub stars~2.4k tokensUpdated 2 mo ago
    Auto-check: warnings
  • Deploy

    peterkrueck/Claude-Code-Development-Kit

    Test and deploy changes safely. An agent skill from peterkrueck/Claude-Code-Development-Kit.

    1.4k GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Second Opinion Gemini

What does Second Opinion Gemini do?

Get a second opinion from Google's Gemini Pro via the locally installed Gemini CLI (defaults to gemini-3.1-pro-preview; override with the CLAUDESECONDOPINIONMODEL env var). Second Opinion Gemini is an agent skill from peterkrueck/Claude-Code-Development-Kit.1-pro-preview; override with the CLAUDESECONDOPINIONMODEL env var).

When should I use Second Opinion Gemini?

Second Opinion Gemini fits situations like: explicitly says ask Gemini; what does Gemini think; ask both (run alongside the default engine and synthesize); A generic second opinion.

How do I install Second Opinion Gemini in Claude Code?

Run `npx skills add peterkrueck/Claude-Code-Development-Kit --skill second-opinion-gemini -a claude-code`. Or copy the skill folder (skills/second-opinion-gemini in peterkrueck/Claude-Code-Development-Kit) into .claude/skills/second-opinion-gemini in your project. Claude Code loads it when a task matches its description.

How do I install Second Opinion Gemini in Codex?

Run `npx skills add peterkrueck/Claude-Code-Development-Kit --skill second-opinion-gemini -a codex`. Or copy the skill folder (skills/second-opinion-gemini in peterkrueck/Claude-Code-Development-Kit) into .agents/skills/second-opinion-gemini in your project. Codex loads it when a task matches its description.

Can I use Second Opinion Gemini in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add peterkrueck/Claude-Code-Development-Kit --skill second-opinion-gemini -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/second-opinion-gemini, .gemini/skills/second-opinion-gemini, .github/skills/second-opinion-gemini and .opencode/skills/second-opinion-gemini in your project.

What does Second Opinion Gemini need to run?

Going by SKILL.md and its folder, Second Opinion Gemini needs the command-line tools its instructions call (gemini).

Does Second Opinion Gemini access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Second Opinion Gemini safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): tells the agent its actions are pre-authorized / not to stop for confirmation. Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Second Opinion Gemini use?

Second Opinion Gemini is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Second Opinion Gemini use?

About 2.3k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Second Opinion Gemini?

Skills that share tags, products or a category with Second Opinion Gemini: NotebookLM Research Assistant (PleasePrompto/notebooklm-skill, 7.8k stars), Brand and Design Toolkit (nextlevelbuilder/ui-ux-pro-max-skill, 134k stars), AI Image Generation and Editing (zhayujie/CowAgent, 47k stars) and OpenCLI Smart Search Router (jackwener/OpenCLI, 30k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Second Opinion Gemini?

peterkrueck (a GitHub user) maintains it in peterkrueck/Claude-Code-Development-Kit, which has 1,386 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on July 22, 2026.

Source: peterkrueck/Claude-Code-Development-Kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.