Token导航 LogoToken导航

Agent Skill · 研究检索

second-opinion(第二意见)

second-opinion 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

second-opinion 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 3,774。

总安装 39,936周安装 1,643GitHub Stars 4,905下载 12,928核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:second-opinion(第二意见)
来源仓库:https://github.com/trailofbits/skills
仓库路径:skills/second-opinion
安装命令:
npx skills add https://github.com/trailofbits/skills --skill second-opinion
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/trailofbits/skills --skill second-opinion

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

来自外部 LLM(OpenAI Codex 或 Google Gemini CLI)对未提交的更改、分支差异或特定提交进行独立代码审查。

支持两种审查引擎:OpenAI Codex CLI(具有结构化 JSON 输出的 gpt-5.3-codex)和 Google Gemini CLI(具有代码审查扩展的gemini-3.1-pro-preview) 通过交互式问题收集审查范围(未提交、分支差异或特定提交)、可选项目上下文文件(CLAUDE.md 或 AGENTS.md)以及重点区域(一般、安全、性能或错误处理) 选择后并行运行这两个工具,并在执行前提供差异预览和大差异警告 跳过依赖项扫描,除非选择安全焦点并且依赖项文件位于差异中,从而避免不必要的开销

来源仓库内路径:skills/second-opinion

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/trailofbits/skills --skill second-opinion;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

second-opinion 怎么安装?

在终端执行 npx skills add https://github.com/trailofbits/skills --skill second-opinion。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

second-opinion 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

second-opinion 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

second-opinion 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

second-opinion 用的人多吗?

公开数据是累计安装 39,936 次,近一周安装 1,643 次,下载 12,928 次,GitHub 4,905 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

second-opinion 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 4,905 星,维护活跃度相对可查。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
second-opinion

第二意见 · 本页

39,9364,905接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

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" --yolo -e code-review
# Gemini (headless with diff — see references/ for full pattern)
git diff HEAD > /tmp/review-diff.txt
{ printf '%s\n\n' 'Review this diff for issues.'; cat /tmp/review-diff.txt; } \
  | gemini -p - --yolo -m gemini-3.1-pro-preview

Invocation

1. Gather context interactively

Use AskUserQuestion to collect review parameters in one shot. Adapt the questions based on what the user already provided in their invocation (skip questions they already answered).

Combine all applicable questions into a single AskUserQuestion call (max 4 questions).

Question 1 — Tool (skip if user already specified):

header: "Review tool"
question: "Which tool should run the review?"
options:
  - "Both Codex and Gemini (Recommended)" → run both in parallel
  - "Codex only"                          → codex exec
  - "Gemini only"                         → gemini CLI

Question 2 — Scope (skip if user already specified):

header: "Review scope"
question: "What should be reviewed?"
options:
  - "Uncommitted changes" → git diff HEAD + untracked files
  - "Branch diff vs main" → git diff <branch>...HEAD (auto-detect default branch)
  - "Specific commit"     → git diff <sha>~1..<sha> (follow up for SHA)

Question 3 — Project context (skip if neither CLAUDE.md nor AGENTS.md exists):

Check for CLAUDE.md first, then AGENTS.md in the repo root. Only show this question if at least one exists.

header: "Project context"
question: "Include project conventions file so the review
  checks against your standards?"
options:
  - "Yes, include it"
  - "No, standard review"

Question 4 — Review focus (always ask):

header: "Review focus"
question: "Any specific focus areas for the review?"
options:
  - "General review"    → no custom prompt
  - "Security & auth"   → security-focused prompt
  - "Performance"       → performance-focused prompt
  - "Error handling"    → error handling-focused prompt

2. Run the tool directly

Do not pre-check tool availability. Run the selected tool immediately. If the command fails with "command not found" or an extension is missing, report the install command from the Error Handling table below and skip that tool (if "Both" was selected, run only the available one).

Diff Preview

After collecting answers, show the diff stats:

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

If the diff is empty, stop and tell the user.

If the diff is very large (>2000 lines changed), warn the user and ask whether to proceed or narrow the scope.

Skipping Inapplicable Checks

After determining the diff scope, skip checks that don't apply to the files actually changed.

Dependency Scanning

Only run /security:scan-deps when the diff touches dependency manifest files. Check with:

git diff --name-only <scope> \
  | grep -qiE '(package\.json|package-lock|yarn\.lock|pnpm-lock|Gemfile|\.gemspec|requirements\.txt|setup\.py|setup\.cfg|pyproject\.toml|poetry\.lock|uv\.lock|Cargo\.toml|Cargo\.lock|go\.mod|go\.sum|composer\.json|composer\.lock|Pipfile)'

If no dependency files are in the diff, skip the scan even when security focus is selected. The scan analyzes the entire project's dependency tree regardless of diff scope, so it adds significant time for zero value when dependencies weren't touched.

Auto-detect Default Branch

For branch diff scope, detect the default branch name:

git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null \
  | sed 's@^refs/remotes/origin/@@' || echo main

Codex Invocation

See references/codex-invocation.md for full details on command syntax, prompt assembly, and the structured output schema.

Summary:

  • Uses codex exec (not codex review) for headless operation
  • Model: gpt-5.3-codex, reasoning: xhigh
  • Uses OpenAI's published code review prompt (fine-tuned into the model)
  • Diff is generated manually and piped via stdin with the prompt
  • --output-schema produces structured JSON findings
  • -o captures only the final message (no thinking/exec noise)
  • All three scopes (uncommitted, branch, commit) support project context and focus instructions (no limitations)
  • Falls back to gpt-5.2-codex on auth errors
  • Output is clean JSON — parse and present findings by priority
  • Set timeout: 600000 on the Bash call

Gemini Invocation

See references/gemini-invocation.md for full details on flags, scope mapping, and extension usage.

Summary:

  • Model: gemini-3.1-pro-preview, flags: --yolo, -e, -m
  • For uncommitted general review: gemini -p "/code-review" --yolo -e code-review
  • For branch/commit diffs: pipe git diff into gemini -p
  • Security extension name is gemini-cli-security (not security)
  • /security:analyze is interactive-only — use -p with a security prompt instead
  • Run /security:scan-deps only when security focus is selected AND the diff touches dependency manifest files (see Diff-Aware Optimizations)
  • Set timeout: 600000 on the Bash call

Scope mapping for git diff (Gemini has no built-in scope flags):

ScopeDiff command
Uncommittedgit diff HEAD + untracked (see codex-invocation.md)
Branch diffgit diff <branch>...HEAD
Specific commitgit diff <sha>~1..<sha>

Running Both

When the user picks "Both" (the default):

  1. Run Codex and Gemini in parallel — issue both Bash tool calls in a single response. Both commands are read-only (they review diffs via external APIs) so there is no shared state or git lock contention.
  2. Collect both results, then present with clear headers:
## Codex Review (gpt-5.3-codex)
<codex output>

## Gemini Review (gemini-3.1-pro-preview)
<gemini output>

Summarize where the two reviews agree and differ.

Error Handling

ErrorAction
codex: command not foundTell user: npm i -g @openai/codex
gemini: command not foundTell user: npm i -g @google/gemini-cli
Gemini code-review extension missingTell user: gemini extensions install https://github.com/gemini-cli-extensions/code-review
Gemini gemini-cli-security extension missingTell user: gemini extensions install https://github.com/gemini-cli-extensions/security
Model auth error (Codex)Retry with gpt-5.2-codex
Empty diffTell user there are no changes to review
TimeoutInform user and suggest narrowing the diff scope
Tool partially unavailableRun only the available tool, note the skip

Examples

Both tools (default):

User: /second-opinion
Claude: [asks 4 questions: tool, scope, context, focus]
User: picks "Both", "Branch diff", "Yes include CLAUDE.md", "Security"
Claude: [detects default branch = main]
Claude: [shows diff --stat: 6 files, +103 -15]
Claude: [assembles prompt with review instructions + CLAUDE.md + security focus + diff]
Claude: [runs codex exec and gemini in parallel]
Claude: [reads codex output file, parses structured findings]
Claude: [presents both reviews, highlights agreements/differences]

Codex only with inline args:

User: /second-opinion check uncommitted changes for bugs
Claude: [scope known: uncommitted, focus known: custom]
Claude: [asks 2 questions: tool, project context]
User: picks "Codex only", "No context"
Claude: [shows diff --stat: 3 files, +45 -10]
Claude: [writes prompt file with review instructions + diff]
Claude: [runs codex exec, reads structured JSON output]
Claude: [presents findings by priority with file:line refs]

Gemini only:

User: /second-opinion
Claude: [asks 4 questions]
User: picks "Gemini only", "Uncommitted", "No", "General"
Claude: [shows diff --stat: 2 files, +20 -5]
Claude: [runs gemini -p "/code-review" --yolo -e code-review]
Claude: [presents review]

Large diff warning:

User: /second-opinion
Claude: [asks questions] → user picks "Both", "Uncommitted", "General"
Claude: [shows diff --stat: 45 files, +3200 -890]
Claude: "Large diff (3200+ lines). Proceed, or narrow the scope?"
User: "proceed"
Claude: [runs both reviews]

平台分布

Claude

31.86%
按下载量换算4,119

Codex

31.3%
按下载量换算4,046

Cursor

19.2%
按下载量换算2,482

Gemini CLI

9.05%
按下载量换算1,170

安全审计

Gen Agent Trust Hub

未通过

Socket

可疑

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills