code-review-preferences
Apply code review best practices
Code reviews often lack structure, leading to inconsistent feedback and missed issues. This skill provides a systematic 3-pass review method with clear guidelines for giving constructive feedback.
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“code-review-preferences”。 Review this function for me
预期结果:
- Pass 1 (Understand): This function processes user input and validates it against business rules
- Pass 2 (Correctness): Found potential null reference on line 15; edge case for empty strings not handled
- Pass 3 (Improvements): Consider extracting validation to a separate function for reusability; max 5 comments limit reached
正在使用“code-review-preferences”。 Review this PR for security issues
预期结果:
- Critical: SQL injection risk on line 23 - user input not parameterized
- High: Missing authentication check on API endpoint
- Medium: Sensitive data logged in plain text
正在使用“code-review-preferences”。 Give feedback on my pull request
预期结果:
- Great work on the clean error messages in the new validation function
- Consider breaking down the large function (67 lines) into smaller helpers
- Tests cover main cases but missing edge case for null input
安全审计
安全Pure prompt-based skill containing only code review methodology and guidelines. All 19 static findings are false positives caused by keyword matching on legitimate code review documentation. No executable code, file access, network calls, or command execution capabilities.
风险因素
🌐 网络访问 (1)
质量评分
你能构建什么
Review pull requests systematically
Apply the 3-pass method to review PRs methodically and provide consistent, constructive feedback.
Establish team review standards
Define clear review guidelines and feedback expectations for consistent code quality across the team.
Learn effective review techniques
Follow structured methodology to understand how to review code and give helpful feedback.
试试这些提示
Review this code for bugs, security issues, and readability. Use the 3-pass method: first understand what it does, then check correctness, then suggest improvements.
Review this pull request. Focus on the most important issues. Limit your comments to the top 5 problems. Be constructive and specific.
Review this code specifically for security issues. Look for injection risks, authentication problems, and data exposure. Explain each finding clearly.
Review this code for consistency with existing patterns. Check naming conventions, function length, and error handling style. Suggest aligned improvements.
最佳实践
- Use the 3-pass method: understand first, then check correctness, then suggest improvements
- Limit comments to the top 5 issues to avoid overwhelming the author
- Ask questions instead of giving commands to encourage collaboration
避免
- Nitpicking style preferences instead of focusing on substantive issues
- Being vague with feedback like this could be better
- Using code reviews to show off knowledge or block progress
常见问题
What tools work with this skill?
How many comments should I make?
Can this run automated tests?
Is my code safe to share?
How is this different from linters?
Does this integrate with GitHub or GitLab?
开发者详情
作者
ChaiWithJai许可证
MIT
仓库
https://github.com/ChaiWithJai/claude-code-mastery/tree/main/examples/skills/code-review-preferences引用
main
文件结构
📄 SKILL.md