second-opinion
Runs external LLM code reviews (OpenAI Codex or Google Gemini CLI) on uncommitted changes, branch diffs, or specific commits. Use when the user asks for a second opinion, external review, codex review, gemini review, or mentions /second-opinion.
npx skills add trailofbits/skills --skill second-opinion --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Second Opinion Shell out to external LLM CLIs for an independent code review powered by a separate model. Supports OpenAI Codex CLI and Google Gemini CLI. ## When to Use - Getting a second opinion on code changes from a different model - Reviewing branch diffs before opening a PR - Checking uncommitted work for issues before committing - Running a focused review (security, performance, error handling) - Comparing review output from multiple models ## When NOT to Use - Neither Codex CLI nor Gemini CLI is installed - No API key or subscription configured for either tool - Reviewing non-code files (documentation, config) - You want Claude's own review (just ask Claude directly) ## Safety Note Gemini CLI is invoked with `--yolo`, which auto-approves all tool calls without confirmation. This is required for headless (non-interactive) operation but means Gemini will execute any tool actions its extensions request without prompting. ## Quick Reference ``` # Codex (headless exec with structured JSON output) codex exec --sandbox read-only --ephemeral \ --output-schema codex-review-schema.json \ -o "$output_file" - < "$prompt_file" # Gemini (code review extension) gemini -p "/code-review"
- When to Use
- When NOT to Use
- Safety Note
- Quick Reference
- Invocation
- 1. Gather context interactively
- 2. Run the tool directly
- Diff Preview
- Skipping Inapplicable Checks
- Dependency Scanning
- Auto-detect Default Branch
- Codex Invocation
- Gemini Invocation
- Running Both
For uncommitted (tracked + untracked): git diff --stat HEAD git ls-files --others --exclude-standard For branch diff: git diff --stat <branch>...HEAD For specific commit: git diff --stat <sha>~1..<sha> git diff --name-only <scope> \ git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null \
What does the second-opinion skill do?
Runs external LLM code reviews (OpenAI Codex or Google Gemini CLI) on uncommitted changes, branch diffs, or specific commits. Use when the user asks for a second opinion, external review, codex review, gemini review, or mentions /second-opinion.
How do I install it?
Run `npx skills add trailofbits/skills --skill second-opinion --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
