AgentSkillsCN

second-opinion

当用户在以下情境下提出“保存更改”“提交代码”“完成任务”或“保存进度”时,自动激活版本管理引擎,将复杂的代码变更分解为原子化的语义历史记录,并严格遵循西班牙语版的 Conventional Commits 规范。

SKILL.md
--- frontmatter
name: second-opinion
description: Get second opinions from external AI agents (OpenAI, Gemini, GitHub). Use when user says "second opinion", "ask other AIs", "what would GPT say", "check with others", or wants to validate an approach.

Second Opinion

Query external agents, get answer, act on it.

Commands

CommandDescription
/second-opinionGet a second opinion on current context
/second-opinion setupConfigure agents interactively
/second-opinion statusShow current configuration

CRITICAL: Execution Flow

Step 1: Check for Installed Agent Plugins

FIRST, check if any agent MCP tools are available. Look for these tools:

ToolAgent Plugin
mcp__openai__agent_queryagent-openai
mcp__gemini__agent_queryagent-gemini
mcp__github__agent_queryagent-github

Note: mcp__anthropic__agent_query is excluded when running in Claude Code.

If NONE of these tools exist, display this message and STOP immediately:

code
No second-opinion agents available.

Run `/second-opinion setup` to configure authentication:
- GitHub: Uses OAuth via `gh auth login`
- OpenAI: Enter API key interactively
- Gemini: Enter API key interactively

Do NOT proceed further if no agents are available.

Step 2: Gather Opinions (use opinion-gatherer agent)

If agents ARE installed, spawn the opinion-gatherer agent with:

  • The user's query/question
  • Your own proposal/answer to the question
  • Any relevant context

The agent will:

  1. Output "Gathering second opinions..."
  2. Query each available agent sequentially, showing progress:
    • " Asking OpenAI..."
    • " Asking Gemini..."
    • " Asking GitHub..."
  3. Return aggregated results (including actual model names from responses)

Step 3: Analyze and Decide

After receiving responses from the opinion-gatherer agent, display:

code
Analyzing responses against my proposal...

Then apply this decision logic:

SituationAction
Consensus with your proposalProceed with your proposal
Consensus against your proposalAdopt the consensus approach
No consensus, decidablePick best option, explain briefly
No consensus, criticalAsk user (rare)

Output Guidelines

Do NOT:

  • Attribute opinions to specific agents by name
  • Show verbose breakdowns of each response
  • Summarize what each agent said individually

DO:

  • Return actionable next step
  • Keep it brief
  • Only ask user when truly stuck

Output Examples

Consensus:

code
Use dependency injection. Add the service as a constructor param.

Decided:

code
Going with extracted module approach.

_Cleaner separation, easier to test._

Needs input (rare):

code
Need your input on this one:

- **Sync**: Simpler but blocks UI
- **Async**: More complex but responsive

First-Time Setup

Run /second-opinion setup to configure agents interactively.

AgentAuth Method
GitHubOAuth via gh auth login (no API key needed!)
OpenAIAPI key (entered interactively, stored locally)
GeminiAPI key (entered interactively, stored locally)