mcpField
R
review

review

github.com/parcadei测试与质量3.9k521 次安装39 周前更新
代码仓库

关于 review

review 是通过协调专业 Agent 开展代码审查的工作流技能,可评估代码质量、设计一致性和变更风险。它支持完整、快速、安全聚焦及 PR 审查模式,并综合结果给出结论和建议。

主要功能

  1. 01并行运行专业审查 Agent
  2. 02检查代码质量与可读性
  3. 03评估设计一致性和变更风险
  4. 04支持完整、快速、安全及 PR 模式
  5. 05综合审查结果并给出结论

适用场景

  1. 01合并前审查功能变更
  2. 02快速获取代码质量反馈
  3. 03评估变更中的安全问题
  4. 04审查拉取请求

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/parcadei/continuous-claude-v3 --skill review

安装后在 Claude Code 中输入/review确认已加载。

详细介绍

/review - 代码审查工作流

通过多个视角和并行专家进行代码审查。

使用场景

  • “审查这段代码”
  • “审查我的 PR”
  • “合并前检查一下”
  • “为实现获取反馈”
  • 合并重大更改之前
  • 质量门禁

工作流概览

         ┌──────────┐
         │  critic  │ ─┐
         │ (code)   │  │
         └──────────┘  │
                       │
         ┌──────────┐  │      ┌──────────────┐
         │plan-reviewer│ ─┼────▶ │ review-agent │
         │ (plan)   │  │      │ (synthesis)  │
         └──────────┘  │      └──────────────┘
                       │
         ┌──────────┐  │
         │plan-reviewer│ ─┘
         │ (change) │
         └──────────┘

         Parallel                Sequential
         perspectives            synthesis

Agent 顺序

#Agent关注点执行方式
1critic代码质量、模式、可读性并行
1plan-reviewer架构、是否遵循计划并行
1plan-reviewer更改影响、风险评估并行
2review-agent综合所有审查结果,给出最终结论在 1 之后

审查视角

  • critic:这段代码写得好吗?(风格、模式、可读性)
  • plan-reviewer:这是否符合设计?(架构、计划)
  • plan-reviewer:这项更改是否安全?(风险、影响、回归问题)
  • review-agent:总体评估和建议

执行

阶段 1:并行审查
# Code quality review
Task(
  subagent_type="critic",
  prompt="""
  Review code quality: [SCOPE]

  Evaluate:
  - Code style and consistency
  - Design patterns used
  - Readability and maintainability
  - Error handling
  - Test coverage

  Output: List of issues with severity (critical/major/minor)
  """,
  run_in_background=true
)

# Architecture review
Task(
  subagent_type="plan-reviewer",
  prompt="""
  Review architecture alignment: [SCOPE]

  Check:
  - Follows established patterns
  - Matches implementation plan (if exists)
  - Consistent with system design
  - No architectural violations

  Output: Alignment assessment with concerns
  """,
  run_in_background=true
)

# Change impact review
Task(
  subagent_type="plan-reviewer",
  prompt="""
  Review change impact: [SCOPE]

  Assess:
  - Risk level of changes
  - Affected systems/components
  - Backward compatibility
  - Potential regressions
  - Security implications

  Output: Risk assessment with recommendations
  """,
  run_in_background=true
)

# Wait for all parallel reviews
[Check TaskOutput for all three]
阶段 2:综合
Task(
  subagent_type="review-agent",
  prompt="""
  Synthesize reviews for: [SCOPE]

  Reviews:
  - critic: [code quality findings]
  - plan-reviewer: [architecture findings]
  - plan-reviewer: [change impact findings]

  Create final review:
  - Overall verdict (APPROVE / REQUEST_CHANGES / NEEDS_DISCUSSION)
  - Prioritized action items
  - Blocking vs non-blocking issues
  - Summary for PR description
  """
)

审查模式

完整审查
User: /review
→ All four agents, comprehensive review
快速审查
User: /review --quick
→ critic only, fast feedback
安全重点审查
User: /review --security
→ Add aegis (security agent) to parallel phase
PR 审查
User: /review PR #123
→ Fetch PR diff, review changes

示例

User: /review the authentication changes

Claude: Starting /review workflow...

Phase 1: Running parallel reviews...
┌────────────────────────────────────────────┐
│ critic: Reviewing code quality...          │
│ plan-reviewer: Checking architecture...         │
│ plan-reviewer: Assessing change impact...         │
└────────────────────────────────────────────┘

critic: Found 2 issues
- [minor] Inconsistent error messages in auth.ts
- [major] Missing input validation in login()

plan-reviewer: ✅ Matches authentication plan

plan-reviewer: Medium risk
- Affects: login, signup, password reset
- Breaking change: session token format

Phase 2: Synthesizing...

┌─────────────────────────────────────────────┐
│ Review Summary                              │
├─────────────────────────────────────────────┤
│ Verdict: REQUEST_CHANGES                    │
│                                             │
│ Blocking:                                   │
│ 1. Add input validation to login()          │
│                                             │
│ Non-blocking:                               │
│ 2. Standardize error messages               │
│                                             │
│ Notes:                                      │
│ - Document session token format change      │
│ - Consider migration path for existing      │
│   sessions                                  │
└─────────────────────────────────────────────┘

结论

  • APPROVE:可以合并,所有问题都较轻微
  • REQUEST_CHANGES:必须修复阻塞性问题
  • NEEDS_DISCUSSION:架构决策需要进一步讨论

评论

支持 Markdown