Second Opinion Agent Setup

VerifiedSafe

Interactive configuration for AI agents to provide second opinions. Follow steps to enable and set up agents.

Sby Skills Guide Bot
DevelopmentBeginner
7/25/2026
Claude Code
#second-opinion#configuration#ai-agents#setup

Recommended for

Automated summary

This skill interactively configures AI agents used for second opinions in Claude Code.

Strengths

  • Interactive setup without manual file editing
  • Auto-detects GitHub token via gh CLI
  • Supports multiple AI providers
  • Secure storage of API keys

Limitations

  • Requires API keys for most agents
  • Only works within Claude Code environment
  • Does not support all AI models
When to use it

Use this skill when you want to enable and configure external AI agents for second opinions in Claude Code.

When not to use it

Do not use it if you only need single-model responses or are not using Claude Code.

Security analysis

Safe
Quality score85/100

The skill is a configuration wizard for second-opinion AI agents. It uses AskUserQuestion for input, checks files, and runs a benign shell command (`gh auth token`) for token auto-detection. It writes API keys to a local file as expected for this feature. No destructive or exfiltrating actions are instructed.

No concerns found

How this analysis is made

Examples

Setup second opinion
setup second opinion
Configure agents
configure agents for second opinions
Enable OpenAI
enable second opinion with OpenAI

name: setup description: | Configure which AI agents to use for second opinions. Use when user says "setup second opinion", "configure agents", "enable/disable agents", "which agents", or wants to change second-opinion settings.

Second Opinion Setup

Interactive configuration for second-opinion agents. The user should NEVER need to edit any files manually.

Instructions

Follow these steps exactly:

Step 1: Show Current Status

First, check if .claude/second-opinion.json exists and show current configuration:

## Current Configuration

Config file: .claude/second-opinion.json
Status: [exists | not configured]
Enabled agents: [list or "none"]

Step 2: Ask User to Select Agents

Use AskUserQuestion with multiSelect=true:

{
  "questions": [{
    "question": "Which AI agents do you want to enable for second opinions?",
    "header": "Agents",
    "multiSelect": true,
    "options": [
      {
        "label": "OpenAI (GPT-4o)",
        "description": "Requires OpenAI API key"
      },
      {
        "label": "Google Gemini",
        "description": "Requires Google AI API key"
      },
      {
        "label": "GitHub Models",
        "description": "Uses GitHub token (auto-detected from gh CLI if installed)"
      },
      {
        "label": "Anthropic (Claude)",
        "description": "Requires Anthropic API key. Note: Excluded when running in Claude Code"
      }
    ]
  }]
}

Step 3: Check for Existing Keys & Auto-Detect GitHub Token

After user selects agents, for each selected agent:

  1. For GitHub: Run gh auth token to check if a token is available

    • If available, note that it will be auto-detected (no input needed)
    • If not available, mark as needing manual input
  2. For others: Check if key already exists in .claude/second-opinion.json

    • If exists, note it's already configured
    • If missing, mark as needing input

Step 4: Prompt for Missing API Keys

For each selected agent that needs an API key, use AskUserQuestion to prompt:

{
  "questions": [{
    "question": "Please paste your OpenAI API key (starts with sk-):",
    "header": "OpenAI Key",
    "multiSelect": false,
    "options": [
      {
        "label": "Enter key now",
        "description": "Paste your API key when prompted"
      },
      {
        "label": "Skip for now",
        "description": "Configure later"
      }
    ]
  }]
}

If user selects "Enter key now", they will type in "Other" - that's the API key. If user selects "Skip for now", don't save a key for that agent.

Key format hints to tell the user:

  • OpenAI: starts with sk-
  • Anthropic: starts with sk-ant-
  • Google: alphanumeric string
  • GitHub: starts with ghp_ or gho_ (unless using gh CLI)

Step 5: Save Configuration

Map user choices to agent IDs:

  • "OpenAI (GPT-4o)" → openai
  • "Google Gemini" → gemini
  • "GitHub Models" → github
  • "Anthropic (Claude)" → anthropic

Create the .claude directory if needed, then write to .claude/second-opinion.json:

{
  "enabledAgents": ["openai", "gemini", "github"],
  "apiKeys": {
    "openai": "sk-...",
    "gemini": "AI..."
  },
  "updatedAt": "2026-01-16T12:00:00Z"
}

Important: GitHub keys are NOT stored if auto-detected from gh auth token.

Step 6: Show Confirmation

## Configuration Saved

**File:** .claude/second-opinion.json

### Enabled Agents

- openai: ✓ configured
- gemini: ✓ configured
- github: ✓ auto-detected from gh CLI

### Note

- Make sure .claude/ is in your .gitignore to protect API keys
- GitHub token is auto-detected from `gh auth token` - no key stored
- To change agents, run `/second-opinion setup` again

Important Notes

  • NEVER ask user to edit files manually
  • Use AskUserQuestion for ALL user input
  • Auto-detect GitHub token from gh auth token when possible
  • Store keys in .claude/second-opinion.json (user doesn't touch this)
  • Remind user to add .claude/ to .gitignore
  • Anthropic agent is auto-excluded when SECOND_OPINION_HOST=claude-code

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/second-opinion-agent-setup-mrzxuqjd/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/second-opinion-agent-setup-mrzxuqjd' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/second-opinion-agent-setup-mrzxuqjd/download' --output '.skill-downloads/second-opinion-agent-setup-mrzxuqjd/SKILL.md.part' && mv '.skill-downloads/second-opinion-agent-setup-mrzxuqjd/SKILL.md.part' '.skill-downloads/second-opinion-agent-setup-mrzxuqjd/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/second-opinion-agent-setup-mrzxuqjd/SKILL.md' && test -s '.skill-downloads/second-opinion-agent-setup-mrzxuqjd/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/setup' && cp -R '.skill-downloads/second-opinion-agent-setup-mrzxuqjd' '.claude/skills/setup'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/second-opinion-agent-setup-mrzxuqjd'

openskills read 'second-opinion-agent-setup-mrzxuqjd'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/second-opinion-agent-setup-mrzxuqjd/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills