From second-opinion
Reference for invoking external AI coding CLIs non-interactively (Gemini CLI, OpenAI Codex CLI, Grok CLI, Aider, Warp, vibe-tools/cursor-tools) to gather an independent second opinion, plus install hints and auth requirements. Use when the user wants cross-model review, consensus, an alternative approach, or to "ask another AI".
How this skill is triggered — by the user, by Claude, or both
Slash command
/second-opinion:second-opinionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill teaches how to drive other AI coding assistants **from the shell, in
This skill teaches how to drive other AI coding assistants from the shell, in
non-interactive (headless) mode, so Claude Code can collect independent opinions
and synthesize them. The companion /second-opinion command orchestrates the flow;
this file is the per-tool detail.
command -v <tool>. Only use what's installed.<tool> --help
before composing the real call. Treat the tables below as the expected form.timeout, handle missing API keys gracefully, and
never let one tool's failure abort the others.gemini)Google's open-source terminal agent for the Gemini models.
gemini -p "PROMPT" (also --prompt). Piping
works: cat diff.txt | gemini -p "Review this diff for bugs".-m gemini-2.5-pro (or -m gemini-2.5-flash for speed/cost).-y / --yolo.GEMINI_API_KEY env var (AI Studio key), or an interactive Google
login the user has already done. If unauthenticated it will error — report and
skip.npm install -g @google/gemini-cli then run gemini.Good for: fast general second opinions, large-context reasoning, and reading files you point it at.
codex)OpenAI's open-source coding agent.
codex exec "PROMPT" (the exec subcommand runs
to completion and prints, no TUI). On older builds the flag was -q/--quiet:
codex -q "PROMPT". Confirm with codex exec --help.-m <model> (e.g. a current GPT/o-series coding model).exec runs non-interactively; review its --help for
--full-auto / approval and sandbox flags before granting write access.codex login, or OPENAI_API_KEY in the environment.npm install -g @openai/codex (or brew install codex).Good for: strong code reasoning and an opinion from a non-Google, non-Anthropic model — valuable independence for consensus.
grok)xAI's official terminal coding agent, Grok Build
(binary grok), an agentic CLI in the same class as Claude Code / Codex. Prefer
this over third-party Grok CLIs (e.g. @vibe-kit/grok-cli).
grok -p "PROMPT" runs one-shot without the TUI
and prints the result. Add --output-format text|json|streaming-json for
machine-readable output. Verify with grok --help as flags evolve.--no-auto-update (skip background update checks) and
--always-approve (skip interactive approvals) for scripts/CI.grok-build-0.1 by default; a --model
flag may be available — check grok --help.grok launch (SuperGrok / X
Premium+). For headless servers / CI, set GROK_CODE_XAI_API_KEY="xai-..."
(an XAI_API_KEY from the xAI developer console).curl -fsSL https://x.ai/cli/install.sh | bash — puts a grok
binary on your PATH.XAI_API_KEY is set, you may call the xAI
REST API with curl (OpenAI-compatible /v1/chat/completions on api.x.ai).Good for: a third independent model family; Grok often has a distinct style/opinion.
aider)Open-source AI pair programmer that edits files in your git repo.
aider --message "PROMPT" --chat-mode ask.
The ask chat mode answers questions and discusses without touching files, and
--message runs once and exits. This is the right mode for a second opinion.aider --message "PROMPT" (alias -m) runs once and exits.
Add --yes-always to auto-confirm prompts.--model <name> (Aider supports many providers via LiteLLM).--chat-mode ask, even a single --message can
change the working tree and (unless disabled) commit. If you want Aider's actual
proposed implementation as its "opinion":
--no-auto-commits (review with git diff, then revert if unwanted), orOPENAI_API_KEY,
ANTHROPIC_API_KEY, GEMINI_API_KEY, …).python -m pip install aider-install && aider-install, or
pipx install aider-chat.Good for: "show me how you would implement/refactor this" — Aider returns an actual concrete diff as its opinion.
oz)Warp is an agentic development environment with built-in AI agents. Its headless
command-line interface is the Oz CLI (oz), made for running agents from
scripts, CI, and remote machines.
oz agent run --prompt "PROMPT".--output-format text or --output-format json for
machine-readable results.oz agent run-cloud --prompt "PROMPT" runs the agent on a
standardized remote machine instead of locally.WARP_API_KEY="wk-..." in the environment for
headless/CI use.oz, not warp. If command -v oz fails (older Warp, or
Oz CLI not installed), skip Warp rather than guessing flags.Good for: a second opinion from Warp's agent, especially when the user already lives in Warp.
vibe-tools)vibe-tools (formerly cursor-tools) is purpose-built to let an agent ask other
providers — it's almost tailor-made for second opinions.
vibe-tools ask "PROMPT" --provider openai --model <m>
(providers include openai, anthropic, gemini, perplexity, xai, …).vibe-tools repo "PROMPT" — sends repo
context (commonly via Gemini's large context window) so the opinion is grounded in
real code. Great for "review my architecture" questions.vibe-tools web "PROMPT" for an internet-grounded answer.vibe-tools plan "PROMPT" to get an implementation plan from another
model.OPENAI_API_KEY,
GEMINI_API_KEY, PERPLEXITY_API_KEY, XAI_API_KEY, …), configured via its
.vibe-tools.env / cursor-tools.env.npm install -g vibe-tools then vibe-tools install to set up keys.Good for: one wrapper that fans out to several providers, and for repo-grounded second opinions without manually pasting code.
llm (Simon Willison's CLI): llm -m <model> "PROMPT" — supports many
providers via plugins. Handy generic second-opinion source.ollama: ollama run <model> "PROMPT" — a local model second opinion, no
API key/network needed (quality depends on the local model).curl: if a vendor CLI is missing but its key is present, call the
OpenAI-compatible endpoint directly.After collecting responses:
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub fingerskier/claude-plugins --plugin second-opinion