跳到主要内容

🔍 自动化代码审查

把 Pull Request、分支 diff 或单个文件交给 AI,它可以生成一份详细 code review,包括安全问题、性能风险、可维护性建议和修复思路。

你: $Code Reviewer
审查 feature/auth-refactor 分支相对 main 的改动。

AI 会做什么

  1. 执行 git diff main..feature/auth-refactor
  2. 阅读每个改动文件的完整上下文,而不只是 diff
  3. 分类整理问题:安全、性能、正确性、风格、文档
  4. 按严重程度排序
  5. 给出具体修复建议
  6. 保存结构化 review 报告

Skill 内容

---
name: code-reviewer
description: Reviews code changes for security, performance, correctness, and style issues
---

## Code Review

1. Get the diff
2. Read full file context
3. Check security, correctness, performance, style, and testing
4. Prioritize findings by severity
5. For each finding, include file, line, explanation, and concrete fix
6. Write an overall summary