Agent skill · Code Review & Quality

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.

trailofbitsgithub.com/trailofbitsGitHub ↗
claude-codecan modify filesCC-BY-SA-4.0
Install
npx skills add trailofbits/skills --skill second-opinion --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 6
SKILL.md size: 10 KB
Bundled scripts: none
Allowed tools: BashReadGlobGrepAskUserQuestion
Path: plugins/second-opinion/skills/second-opinion/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,426
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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"

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Safety Note
  4. Quick Reference
  5. Invocation
  6. 1. Gather context interactively
  7. 2. Run the tool directly
  8. Diff Preview
  9. Skipping Inapplicable Checks
  10. Dependency Scanning
  11. Auto-detect Default Branch
  12. Codex Invocation
  13. Gemini Invocation
  14. Running Both
Ships with 5 files
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
  • references/codex-invocation.md
  • references/codex-review-schema.json
  • references/gemini-invocation.md
Commands it runs
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 \
More from skills
All skills →
About this skill
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.

Keep going