SSHdotCodes

Second Opinion

Community SSHdotCodes
Updated

Let Claude access other AI models via MCP

Second Opinion

Second Opinion lets installed AI coding agents use each other as opt-in subagents.

If you are in Claude Code and want Codex to review a risky patch, Claude can run Second Opinion and delegate that slice to Codex. If you are in Codex, the same install gives Codex a skill for delegating to Claude Code, OpenCode, Grok Build, or Google Antigravity. Each agent keeps its own auth, model access, tools, and safety behavior.

Install

Interactive CLI installer:

curl -fsSL https://second-opinion.ssh.codes/install.sh | bash

Install every detected agent skill without prompts:

curl -fsSL https://second-opinion.ssh.codes/install.sh | bash -s -- --yes

Install all supported skill files:

curl -fsSL https://second-opinion.ssh.codes/install.sh | bash -s -- --all --yes

Install a specific agent integration:

curl -fsSL https://second-opinion.ssh.codes/install.sh | bash -s -- --agent codex --yes
curl -fsSL https://second-opinion.ssh.codes/install.sh | bash -s -- --agent claude --yes
curl -fsSL https://second-opinion.ssh.codes/install.sh | bash -s -- --agent opencode --yes
curl -fsSL https://second-opinion.ssh.codes/install.sh | bash -s -- --agent grok --yes
curl -fsSL https://second-opinion.ssh.codes/install.sh | bash -s -- --agent antigravity --yes

Install on another machine over SSH:

ssh dev@server 'curl -fsSL https://second-opinion.ssh.codes/install.sh | bash -s -- --all --yes'

What Gets Installed

The installer adds the second-opinion CLI to ~/.local/bin and writes only Second Opinion-owned skill files:

Agent File written
Codex ~/.agents/skills/second-opinion/SKILL.md
Claude Code ~/.claude/skills/second-opinion/SKILL.md
OpenCode ~/.config/opencode/skills/second-opinion/SKILL.md
Grok Build ~/.grok/skills/second-opinion/SKILL.md
Google Antigravity ~/.gemini/antigravity/skills/second-opinion/SKILL.md

Second Opinion does not edit model settings, provider credentials, hooks, MCP servers, permissions, or app config. If one of those skill files already exists and was not generated by Second Opinion, the installer skips it unless you pass --force.

Use

From any shell:

second-opinion status
second-opinion ask auto --from codex --cwd "$PWD" --mode consult --background -- "Review this change and call out risks."
second-opinion ask claude --from opencode --cwd "$PWD" --mode consult --background -- "Find edge cases in the parser."
second-opinion ask grok --from claude --cwd "$PWD" --mode work --background -- "Implement only the README command table."
second-opinion jobs
second-opinion wait JOB_ID

The installed skills teach each agent to start subagents in the background by default. That lets the parent agent continue its own non-overlapping work while the subagent runs. Later, the parent runs second-opinion wait JOB_ID to collect the subagent output.

Use consult mode by default. Consult mode asks the target agent to inspect and report without editing files. work mode is available for narrow implementation slices, but should be assigned carefully so two agents do not edit the same files at the same time.

Supported Agents

  • Codex
  • Claude Code
  • OpenCode
  • Grok Build
  • Google Antigravity

The CLI has a central registry for agent commands, skill paths, and task-routing hints. To add another agent, update the registry in bin/second-opinion, add tests, and run second-opinion install --agent <new-agent> to regenerate its skill.

Commands

second-opinion install              # interactive when attached to a terminal
second-opinion install --yes         # install detected agent skills
second-opinion install --all --yes   # install all supported skills
second-opinion uninstall --agent codex
second-opinion status --json
second-opinion choose --from claude --task "review auth flow"
second-opinion ask auto --from claude --cwd "$PWD" --mode consult --background -- "Investigate failing tests."
second-opinion jobs
second-opinion wait JOB_ID
second-opinion commands
second-opinion doctor

Design

Second Opinion is intentionally small:

  • No server is required.
  • No API keys are handled by Second Opinion.
  • Each target agent runs through its own installed CLI.
  • All agent instructions are regular skill files that users can inspect.
  • The subagent prompt includes anti-recursion and scope-isolation rules.

Local Development

python3 -m unittest discover -s tests
SECOND_OPINION_HOME="$(mktemp -d)" bin/second-opinion install --all --yes
SECOND_OPINION_HOME="$(mktemp -d)" bin/second-opinion status --json

To test the installer against a local checkout:

python3 -m http.server 8080
SECOND_OPINION_BASE_URL=http://127.0.0.1:8080 bash install.sh --cli-only

License

MIT

MCP Server · Populars

MCP Server · New