Use this skill when the user explicitly requests review, quick review, or security review.
Do not use for:
- Ordinary coding implementation
- Direct bug fixes
- Language detail specifications
- Environment-level risk assessment
Review modes
The user can specify the review target:
- Review the current branch:
$cc-review、$cc-review quick、$cc-review security - Review a specified commit:
$cc-review <commit-hash>、$cc-review quick <commit-hash>、$cc-review security <commit-hash>
Argument parsing rules:
- Match mode keywords first (quick/security/full)
- Other arguments are treated as commit hashes
- Argument order is flexible (
$cc-review quick abc123or$cc-review abc123 quickboth work)
Quick Review
For the current diff or a specified commit, quickly provide high-value feedback.
Git commands:
- Current branch:
git diff --stat+git diff - Specified commit:
git show --stat <commit>+git show <commit>
Full Review
Conduct a more complete review around affected call chains, input/output contracts, and regression surfaces.
Git commands:
- Current branch:
git diff --merge-base origin/HEAD - Specified commit:
git show <commit>
Security Review
Focus on checking authentication and authorization, input validation, command execution, data exposure, and permission boundaries.
Git commands:
- Current branch:
git diff --merge-base origin/HEAD - Specified commit:
git show <commit>
Default priority
- Incorrect behavior and obvious bugs
- Regression risks
- Missing validation or error handling
- Security issues
- Missing or weak tests
- Maintainability issues
Commit Hash Validation
When the user specifies a commit hash, its validity must be verified first:
# 验证 commit 是否存在
if ! git rev-parse --verify "$TARGET^{commit}" >/dev/null 2>&1; then
echo "❌ 错误:无效的 commit hash: $TARGET"
echo ""
echo "请检查:"
echo "1. commit hash 是否正确(可以是完整 hash 或短 hash)"
echo "2. commit 是否存在于当前仓库"
echo ""
echo "提示:使用 'git log' 查看可用的 commit"
exit 1
fi
# 获取完整 hash 和提交信息
FULL_HASH=$(git rev-parse "$TARGET")
COMMIT_MSG=$(git log -1 --pretty=format:"%s" "$TARGET")
The beginning of the review report should include review scope information:
### 审查范围
**提交**: `<full-hash>`
**信息**: <commit-message>
**作者**: <author-name> <<author-email>>
**时间**: <commit-date>
Output requirements
- Use Simplified Chinese for output by default; switch only when the user explicitly requests English or external English materials need to be preserved.
- Use Chinese naming for titles, severity, and conclusions, for example "发现的问题", "待确认问题", "残余风险", "总结", and "高/中/低".
- Findings first, sorted by severity.
- Include precise file references whenever possible.
- Keep the summary brief and place it after the findings.
- If no issues are found, explicitly write "未发现明确问题" and explain residual risks or verification blind spots.
- Suggestions must have a classification label(✅fix in this round / 📝technical debt / ❌reject); dangling phrases such as "leave for the next iteration" are prohibited, see details in
references/quick-review.mdandreferences/full-review.md。
Expand as needed
- Review priority:
references/review-priority.md - Quick Review:
references/quick-review.md - Full Review:
references/full-review.md - Security Review:
references/security-review.md