AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Second Opinion

skill-flurdy-agent-skills-second-opinion · by flurdy

Query an alternative AI CLI (Claude, Codex, or Gemini) for a second opinion on plans, PRs, bugs, or code.

No reviews yet
0 installs
38 views
0.0% view→install

Install

$ agentstack add skill-flurdy-agent-skills-second-opinion

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-flurdy-agent-skills-second-opinion)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Second Opinion? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Second Opinion

Query Claude, Codex, or Gemini CLI for an independent review of plans, PRs, code, or bugs.

When to Use

  • You want a second opinion on a plan, architecture decision, or approach
  • You want an independent PR review from another AI
  • You want to cross-check a bug triage or root cause analysis
  • You want to validate a proposed change before committing

Usage

/second-opinion                          # Interactive — asks what to review and which agent
/second-opinion review-pr 123            # Review PR #123
/second-opinion review-pr                # Review current branch PR
/second-opinion validate-plan ""   # Validate a plan/approach
/second-opinion triage-bug ""  # Get bug triage input
/second-opinion ask ""         # Freeform question with repo context
/second-opinion ask "" --agent claude   # Force a specific agent
/second-opinion ask "" --agent codex
/second-opinion ask "" --agent gemini
/second-opinion ask "" --agent all      # Query all agents in parallel
/second-opinion review-pr --timeout 5             # Allow 5 minutes (default: 3, max: 10)
/second-opinion ask "..." --model fast            # Use the fast tier instead of smart
/second-opinion ask "..." --model gemini-3-pro    # Pass an explicit model ID through

Requirements

  • claude CLI installed and authenticated (part of Claude Code)
  • codex CLI installed and authenticated (codex login)
  • gemini CLI installed and authenticated
  • gh CLI for PR operations

Model Selection

Default is smart — no flag passed, so each CLI uses whatever model it's configured to default to (typically the top reasoning model). Configure those in each CLI's own settings (~/.codex/config.toml, etc.) rather than here, so new models like Gemini 3 Pro or GPT-5.x flow through without editing this skill.

Overrides:

  • --model fast — cheap/quick tier (table below)
  • --model — any other value is treated as a literal model ID and passed through

| CLI | fast maps to | |--------|-------------------| | claude | claude-haiku-4-5 | | codex | gpt-5-mini | | gemini | gemini-2.5-flash |

Refresh the fast table when cheaper/newer models ship. The smart default requires no maintenance here — it's whatever each CLI picks.

Instructions

1. Parse Arguments

Extract from the arguments:

  • mode: one of review-pr, validate-plan, triage-bug, ask (default: ask user)
  • target: PR number, plan text, bug description, or freeform question
  • agent: claude, codex, gemini, or all (default: codex)
  • timeout: timeout in minutes (default: 3, max: 10)
  • model: smart (default), fast, or an explicit model ID — see Model Selection

Look for --agent anywhere in the arguments. If not specified, default to codex. Look for --timeout anywhere in the arguments. If not specified, default to 3. Look for --model anywhere in the arguments. If not specified, default to smart.

If no mode is provided, ask the user what they'd like a second opinion on.

2. Gather Context by Mode

review-pr
# If PR number provided:
gh pr view {PR_NUMBER} --json title,body,additions,deletions,changedFiles,state,baseRefName,headRefName
gh pr diff {PR_NUMBER}

# If no PR number, find current branch PR:
gh pr view --json number,title,body,additions,deletions,changedFiles,state,baseRefName,headRefName
gh pr diff

Build a prompt:

Review this pull request. Focus on:
- Correctness and potential bugs
- Security concerns
- Performance implications
- Code quality and maintainability
- Missing edge cases or error handling

PR: {title}
Description: {body}

Diff:
{diff}
validate-plan

The user provides the plan text as the target. Gather additional context:

# Get repo structure overview for context
git ls-files | head -100

Build a prompt:

Evaluate this implementation plan for the codebase in the current directory.
Flag any concerns about:
- Feasibility and completeness
- Missing steps or dependencies
- Potential risks or gotchas
- Better alternatives

Plan:
{plan_text}
triage-bug

Build a prompt:

Help triage this bug in the codebase in the current directory.
Analyze:
- Likely root cause
- Which files/components are probably involved
- Suggested investigation steps
- Potential fixes

Bug description:
{bug_description}
ask

Pass the question directly with repo context:

Given the codebase in the current directory, answer this question:
{question}

3. Invoke the Agent CLI

Pass the assembled prompt directly as a positional argument to ensure commands match auto-approve permission patterns like Bash(claude:*), Bash(codex:*), and Bash(gemini:*).

Resolve the model flag before building the command. Given the parsed --model value:

  • smart (default) → omit the model flag entirely; let the CLI use its configured default
  • fast → look up the fast row in the table under Model Selection for the current agent
  • anything else → treat as a literal model ID, pass through unchanged

In the snippets below, {model_flag} expands to the relevant CLI's flag + value (e.g. --model claude-haiku-4-5, -m gpt-5-mini, -m gemini-2.5-flash) when a model was resolved, and to an empty string when smart is in effect.

For Claude

Pass the prompt via the -p flag:

claude -p "{assembled_prompt}" --no-input {model_flag}

Where {model_flag} is --model when resolved, or empty for smart.

The --no-input flag prevents Claude from asking interactive questions. Claude runs in read-only mode by default when using -p.

Timeout: Use the parsed timeout value (default 3 min, converted to milliseconds).

For Codex

For review-pr mode, prefer the built-in review command:

# PR review using codex's native review (--base and positional prompt are mutually exclusive)
codex review --base {base_branch} {model_flag}

# Or for uncommitted changes:
codex review --uncommitted {model_flag}

For all other modes, pass the prompt as a positional argument:

codex exec {model_flag} "{assembled_prompt}"

Where {model_flag} is -m when resolved, or empty for smart (which lets ~/.codex/config.toml decide the model and reasoning effort).

Timeout: Use the parsed timeout value. Codex is slow on large prompts — consider --timeout 5 or higher for PR reviews in large repos.

For Gemini

Pass the prompt via the -p flag:

gemini -p "{assembled_prompt}" --sandbox -o text {model_flag}

Where {model_flag} is -m when resolved, or empty for smart.

The --sandbox flag prevents Gemini from modifying files. The -o text flag gives clean text output.

Timeout: Use the parsed timeout value (default 3 min, converted to milliseconds).

For All

Run all available agents in parallel (use parallel Bash tool calls). Present all results.

5. Present Results

Format the response clearly:

## Second Opinion ({agent_name})

{agent_response}

---
*Source: {agent_name} CLI, mode: {mode}*

If multiple agents were queried, present each under its own heading:

## Claude Opinion

{claude_response}

## Codex Opinion

{codex_response}

## Gemini Opinion

{gemini_response}

## Key Differences

{brief comparison of where they agree/disagree}

After presenting the raw results, add your own assessment (see step 6).

6. Your Assessment

Critically review the external agent's findings against the actual codebase. For each finding, verify whether it is correct by reading the relevant code — do not take the agent's claims at face value.

Single PR
### My Assessment

| # | Finding | Verdict | Rationale |
|---|---------|---------|-----------|
| 1 | {short description} | Valid / Non-issue / Already handled | {one-line reason} |
| 2 | ... | ... | ... |

**Actionable items:** {list only the valid findings worth acting on, or "None."}
Batch (multiple PRs)

When reviewing several PRs in one session, present a summary table after all individual reviews:

### Batch Summary

| PR | Title | Findings | Actionable |
|----|-------|----------|------------|
| #123 | feat: add caching | 4 | 1 — readCookie split bug |
| #124 | fix: session init | 3 | 0 |
| ... | ... | ... | ... |

Then list only the genuinely actionable items across all PRs, grouped by severity.

Follow-up

After the assessment, offer:

  • "Want me to create beads for the actionable items?"
  • Or, if nothing is actionable: "Nothing worth following up — want me to act on anything else?"

Error Handling

  • If a CLI is not installed or not authenticated, tell the user and suggest another available agent
  • If a CLI times out (>3 min), report partial output if any and suggest trying another agent
  • If the prompt is too large, summarize the diff/context before sending
  • If both agents fail, report the errors and suggest the user try manually

Rules

  • Never let the external agent modify files — use read-only/sandbox modes
  • Always use --no-input for Claude, --sandbox for Gemini, and default (no write) permissions for Codex
  • Do not send sensitive data (env vars, secrets, credentials) to external CLIs
  • Present the external agent's response faithfully in step 5 — save your own judgement for step 6
  • Make clear which agent provided which opinion
  • The temp file approach avoids shell injection from prompt content

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.