Skip to content

/second-opinion

Cross-validate code, architecture or design decisions using a second model. Use for critical decisions, complex refactoring, security reviews.

From plugin
4919 skills8 agents44 commands20 hooks
shell
$ npx -y skills add xiaobei930/cc-best --skill second-opinion --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/second-opinion
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this skill.

Cross-validate code, architecture or design decisions using a second model. Use for critical decisions, complex refactoring, security reviews.

SKILL.md

second-opinion.SKILL.md
name: second-opinion
description: "Cross-validate code, architecture or design decisions using a second model. Use for critical decisions, complex refactoring, security reviews."
allowed-tools: Read, Grep, Glob

Second Opinion 二次审查

概述

在以下场景使用二次审查:

  • **架构决策**:重大技术选型、系统设计
  • **安全审查**:认证、授权、数据处理逻辑
  • **复杂重构**:跨模块重构、API 变更
  • **疑难调试**:长时间无法解决的问题

方法一:使用 Oracle CLI(推荐)

[Oracle](https://github.com/steipete/oracle) 是一个专门用于此目的的工具。

安装

# 不需要安装,使用 npx 直接运行
npx -y @steipete/oracle --help

基本用法

# 预览(不消耗 token)
npx -y @steipete/oracle --dry-run summary \
  -p "审查这个认证模块的安全性" \
  --file "src/auth/**"

# 浏览器模式(推荐,使用 ChatGPT)
npx -y @steipete/oracle --engine browser --model gpt-5.2-pro \
  -p "审查架构决策是否合理" \
  --file "src/**" --file "!**/*.test.*"

# API 模式(需要 OPENAI_API_KEY)
npx -y @steipete/oracle --engine api \
  -p "分析这个重构方案的风险" \
  --file "src/core/**"

文件选择技巧

# 包含特定目录
--file "src/auth/**"
--file "src/api/**"

# 排除测试和快照
--file "src/**" --file "!**/*.test.*" --file "!**/*.snap"

# 包含配置文件
--file "package.json" --file "tsconfig.json"

方法二:手动二次审查

如果不使用 Oracle,可以手动进行二次审查:

1. 准备审查包

# 审查请求

## 项目背景

- 技术栈:[描述]
- 构建命令:[描述]
- 关键约束:[描述]

## 审查目标

[具体问题或决策]

## 相关代码

[粘贴关键代码片段]

## 已尝试的方案

[描述之前的尝试]

## 期望输出

- 风险评估
- 改进建议
- 替代方案

2. 选择审查模型

| 模型 | 适用场景 | 特点 | | ----------- | ------------------ | ------------------ | | GPT-4/5 | 通用审查、架构分析 | 广泛知识、推理强 | | Claude Opus | 复杂推理、代码分析 | 深度思考、上下文长 | | Gemini Pro | 多模态、大规模代码 | 长上下文、快速 |

3. 审查清单

  • [ ] 提供足够的项目背景
  • [ ] 包含关键代码文件
  • [ ] 明确审查目标
  • [ ] 描述约束条件
  • [ ] 指定期望输出格式

Prompt 模板

架构审查

我需要你审查以下架构决策:

## 项目背景
[技术栈、规模、团队情况]

## 当前方案
[描述架构设计]

## 备选方案
[其他考虑过的方案]

## 关注点
- 可扩展性
- 维护成本
- 团队技能匹配度

请提供:
1. 当前方案的优缺点分析
2. 潜在风险和缓解措施
3. 是否有更好的替代方案

安全审查

请对以下代码进行安全审查:

## 代码功能
[描述功能]

## 代码
[粘贴代码]

## 关注点
- OWASP Top 10
- 认证/授权逻辑
- 输入验证
- 敏感数据处理

请指出:
1. 安全漏洞(按严重程度排序)
2. 修复建议
3. 最佳实践建议

调试协助

我遇到了一个难以解决的问题:

## 症状
[描述问题表现]

## 重现步骤
[详细步骤]

## 已尝试
[之前的调试尝试]

## 相关代码
[粘贴代码]

## 错误信息
[完整错误信息]

请帮我:
1. 分析可能的根本原因
2. 建议调试方向
3. 提供可能的解决方案

最佳实践

DO ✅

  • 提供完整的项目上下文
  • 明确指定审查目标
  • 包含约束和限制条件
  • 要求结构化的输出

DON'T ❌

  • 不要包含敏感信息(密钥、凭证)
  • 不要一次审查太多代码(< 200KB)
  • 不要期望 100% 正确(验证输出)
  • 不要忽略审查建议的局限性

输出验证

二次审查的结果应当:

1. **交叉验证**:与项目实际情况对比 2. **测试验证**:关键建议应编写测试验证 3. **渐进采纳**:逐步采纳建议,而非全盘接受 4. **记录决策**:记录采纳或拒绝建议的原因

> **记住**: 第二意见的价值在于打破盲点——不是为了否定,而是为了全面。

Read more
Read it on GitHub ↗
Ships withcc-best

Role-Driven Development Workflow for Claude Code Transform Claude into a complete development team. From product requirements to code review — one plugin, full workflow. Quick Start • Features • Workflow • Commands • FAQ

Get the whole plugin, auto-invoked
Stats
49
Stars
0
Views
3
Forks
Maintained
Maintenance
JavaScript
Language
MIT
License
1mo ago
Last commit
6mo ago
Created

Repo: xiaobei930/cc-best