Run code reviews using external LLM CLIs (OpenAI Codex, Google Gemini) on uncommitted changes, branch diffs, or specific commits.
- Codex CLI installed:
npm i -g @openai/codex - OpenAI API key or ChatGPT Plus subscription configured for Codex
- Gemini CLI installed:
npm i -g @google/gemini-cli - Google account authenticated
- Code review extension:
gemini extensions install https://github.com/gemini-cli-extensions/code-review - Security extension:
gemini extensions install https://github.com/gemini-cli-extensions/security
/plugin marketplace add trailofbits/skills
/plugin install second-opinion
/second-opinion
The command will prompt for:
- Review tool — Codex, Gemini, or both (default)
- Review scope — uncommitted changes, branch diff, or specific commit
- Project context — optionally include CLAUDE.md/AGENTS.md for project-aware review
- Review focus — general, security, performance, or error handling
/second-opinion check the uncommitted changes for security issues
Inline arguments pre-fill the scope and focus, skipping redundant questions.
Shells out to codex review and/or gemini CLI with high-capability model configurations. When both tools are selected (the default), runs Codex first then Gemini, presenting results side by side for comparison.
This plugin bundles Codex CLI's built-in MCP server (codex mcp-server), which auto-starts when the plugin is installed and provides two MCP tools:
- codex — start a new Codex session with a prompt, model, sandbox, and approval policy settings
- codex-reply — continue an existing session by thread ID for multi-turn conversations
These tools work independently of the /second-opinion slash command. Use them when you want direct, programmatic access to Codex without the interactive prompt workflow.