Trigger Conditions
This skill is activated when the user requests code review, code review, code inspection, or code quality assessment.
Workflow
- Read the target file — Use the Glob and Read tools to obtain the code to be reviewed
- Analyze code quality — Evaluate from the following dimensions:
- Code standards (naming, formatting, comments)
- Potential Bugs (null pointers, out-of-bounds, concurrency issues)
- Performance issues (N+1 queries, memory leaks, unnecessary loops)
- Security vulnerabilities (SQL injection, XSS, hardcoded keys)
- Design patterns (whether used reasonably, whether there are better solutions)
- Generate review report — Output a structured report in Chinese
Output Format
## 📋 代码审查报告
### 📊 总体评分:X/10
### 🔴 严重问题(必须修复)
- [文件:行号] 问题描述
💡 修复建议:...
### 🟡 建议改进(推荐修复)
- [文件:行号] 问题描述
💡 改进建议:...
### 🟢 亮点
- 做得好的地方
### 📝 总结
一段总结性评价
Notes
- Keep technical terms in English (such as null pointer, SQL injection)
- Keep code examples in their original language
- For Chinese variable names/comments, also check whether they are appropriate