code-review-specialist
它能做什么
它指导你的智能体检查代码的安全风险、低效写法和质量问题,并清楚地说明每个发现。适合希望对代码或拉取请求进行全面复查的开发者。
适用场景
- ✓当你希望对代码或拉取请求做安全检查的时候。
- ✓当你想在发布前找出运行缓慢或性能不佳的代码的时候。
- ✓当你想检查代码质量,例如命名、结构和测试覆盖率的时候。
技能链接
https://github.com/luongnv89/claude-howto/blob/main/03-skills/code-review-specialist/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查这个登录模块的安全问题,并告诉我最严重的几个该怎么修复?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先阅读审查清单和问题记录模板,然后按类别检查代码。它会为每个发现写明严重程度、位置和影响,还可以运行随技能附带的指标脚本分析代码。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Code Review Skill
This skill provides comprehensive code review capabilities focusing on:
Security Analysis
- Authentication/authorization issues
- Data exposure risks
- Injection vulnerabilities
- Cryptographic weaknesses
- Sensitive data logging
Performance Review
- Algorithm efficiency (Big O analysis)
- Memory optimization
- Database query optimization
- Caching opportunities
- Concurrency issues
Code Quality
- SOLID principles
- Design patterns
- Naming conventions
- Documentation
- Test coverage
Maintainability
- Code readability
- Function size (should be < 50 lines)
- Cyclomatic complexity
- Dependency management
- Type safety
Reference Files
This skill includes supporting files that you should read when performing reviews:
templates/review-checklist.md— Structured checklist covering security, performance, quality, and testing. Read this file and use it as a guide to ensure no category is missed during review.templates/finding-template.md— Standard template for documenting individual findings with severity, location, code examples, and impact analysis. Read this file and use its format when reporting issues.scripts/analyze-metrics.py— Python script that calculates code metrics (function count, class count, average line length, complexity score). Run this on the file under review to gather quantitative data.scripts/compare-complexity.py— Python script that compares cyclomatic and cognitive complexity between two versions of a file. Run this with the before and after versions when reviewing refactoring changes.
Review Template
For each piece of code reviewed, provide:
Summary
- Overall quality assessment (1-5)
- Key findings count
- Recommended priority areas
Critical Issues (if any)
- Issue: Clear description
- Location: File and line number
- Impact: Why this matters
- Severity: Critical/High/Medium
- Fix: Code example
Findings by Category
Security (if issues found)
List security vulnerabilities with examples
Performance (if issues found)
List performance problems with complexity analysis
Quality (if issues found)
List code quality issues with refactoring suggestions
Maintainability (if issues found)
List maintainability problems with improvements
Version History
- v1.0.0 (2024-12-10): Initial release with security, performance, quality, and maintainability analysis
Last Updated: August 4, 2026 Claude Code Version: 2.1.220 Sources:
- https://code.claude.com/docs/en/skills Compatible Models: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
常见问题
它检查哪些方面?
安全、性能、代码质量和可维护性,包括测试覆盖率。
问题如何记录?
每个问题都按统一模板记录,包括严重程度、位置、代码示例和影响。
它需要特别的工具吗?
它使用技能附带的 Python 指标脚本,因此需要电脑上可以运行 Python。
详情
作者的原始描述
Comprehensive code review with security, performance, and quality analysis. Use when users ask to review code, analyze code quality, evaluate pull requests, or mention code review, security analysis, or performance optimization.
repo: luongnv89/claude-howto
热度
- GitHub 星标
- 46k
- 排名
- #6322
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …