当前位置: 首页 > Skill >

Code Review Checklist

Code Review Checklist

Code Review Checklist

代码审查清单 - 全面的代码审查清单和指导工具。用于用户询问代码审查、代码检查、PR review、代码质量,或想要进行或准备代码审查时。

1.0.0 2026.11.25 401
获取Skill文件查看使用说明
作 者:苏言 许可证: 更新时间:2026.11.25
本文目录展开

Code Review Checklist (代码审查清单)

Overview

This skill provides a systematic approach to code reviews. It offers comprehensive checklist items across multiple dimensions of code quality, helps reviewers focus on high-impact areas, and guides developers in preparing code for review. Designed to make code reviews more efficient and thorough.

When to Use This Skill

  • Preparing code for pull request review
  • Conducting a code review as a reviewer
  • Self-reviewing own code before submission
  • Establishing code review standards for a team
  • Training new developers on review best practices
  • Auditing code quality in a codebase

What This Skill Provides

1. Predefined Checklists

Comprehensive checklist items organized by category:

  • Code correctness and logic
  • Code style and readability
  • Performance and efficiency
  • Security considerations
  • Error handling
  • Testing coverage
  • Documentation
  • Architecture and design patterns

2. Review Guidance

  • What to look for in each category
  • Red flags and common issues
  • Best practices specific to language/framework
  • Questions to ask the author

3. Review Workflow

  • Systematic approach to reviewing
  • Priority ordering of checks
  • Time allocation guidance
  • Documentation requirements

Checklist Categories

1. Correctness & Logic

  • Code produces expected output
  • Edge cases are handled
  • No off-by-one errors
  • Logic is sound and complete
  • No infinite loops or recursion issues
  • Proper use of data structures

2. Code Style & Readability

  • Follows project coding standards
  • Naming is clear and descriptive
  • Functions are appropriately sized
  • Code is not duplicated (DRY principle)
  • Complex logic has comments
  • Formatting is consistent

3. Performance & Efficiency

  • No unnecessary loops or iterations
  • Proper use of caching when applicable
  • Database queries are optimized
  • No memory leaks
  • Appropriate algorithmic complexity
  • Resources are properly released

4. Security

  • Input validation on all user inputs
  • No SQL injection vulnerabilities
  • No XSS vulnerabilities
  • Secrets not hardcoded
  • Proper authentication/authorization
  • Sensitive data properly protected
  • No security misconfigurations

5. Error Handling

  • Errors are caught and handled appropriately
  • Error messages are user-friendly
  • No empty catch blocks
  • Logging is appropriate
  • Graceful degradation where needed
  • No exposing internal error details

6. Testing

  • Unit tests exist for new code
  • Tests cover happy path and edge cases
  • Tests are maintainable
  • Mock usage is appropriate
  • Test coverage meets requirements
  • No flaky tests introduced

7. Documentation

  • Public APIs are documented
  • Complex logic has comments
  • README updated if needed
  • API changes are documented
  • Breaking changes are noted

8. Architecture & Design

  • Follows project architecture patterns
  • Single Responsibility Principle followed
  • Dependencies are properly injected
  • Coupling is minimized
  • Changes are localized appropriately
  • No tech debt introduced unnecessarily

Language-Specific Considerations

JavaScript/TypeScript

  • Proper async/await usage
  • TypeScript types are correct
  • No 'any' type abuse
  • ESLint rules followed

Python

  • PEP 8 compliance
  • Type hints where appropriate
  • Docstrings for public functions
  • No deprecated imports

Java

  • Null safety considerations
  • Resource management (try-with-resources)
  • Stream API usage
  • Concurrent access considerations

Go

  • Error handling conventions
  • Goroutine leak prevention
  • Context usage
  • Naming conventions

Review Workflow

Step 1: Context (2-3 min)

  • Read PR description and motivation
  • Understand what changed and why
  • Check related issues or docs

Step 2: Overview (3-5 min)

  • Scan changed files
  • Identify high-risk areas
  • Note files needing deep review

Step 3: Detailed Review (15-30 min)

  • Follow checklist by priority
  • Comment on issues found
  • Ask clarifying questions
  • Suggest improvements

Step 4: Summary (3-5 min)

  • Summarize findings
  • Categorize issues (Blocking/Suggestion/Question)
  • Approve or request changes

Usage Examples

As a Reviewer

"用代码审查清单检查这个PR"
"帮我审查这个函数的逻辑"
"检查这段代码有没有安全问题"
"看看这个文件有哪些可以改进的地方"

As a Developer

"帮我准备代码审查"
"自审查这份代码,有什么遗漏?"
"检查这段代码的测试覆盖"
"这个代码符合项目规范吗?"

For Team Standards

"生成一个代码审查检查清单"
"我们团队的代码审查标准是什么?"
"前端代码审查有什么特殊要求?"

Output Format

For each review, output:

## Code Review: [PR/Change Title]

### Summary
- Files changed: X
- Lines added/removed: +X/-X
- Risk level: [Low/Medium/High]

### Findings

#### 🔴 Blocking Issues
- [Issue description] - [File:Line] - [Suggestion]

#### 🟡 Suggestions
- [Suggestion] - [File:Line]

#### 🟢 Good Practices Noted
- [Positive observation]

### Checklist Status
- [x] Correctness
- [x] Style
- [ ] Security (needs work)
- [x] Performance

### Recommendation
[Approve / Request Changes / Discuss]

### Action Items
- [ ] Item 1
- [ ] Item 2

Integration with Development Workflow

This skill integrates with:

  • github — For reviewing PRs directly
  • coding-agent — For automated code quality checks
  • opencli — For running linters and formatters

Limitations

  • Cannot execute code to verify correctness
  • Cannot know full system context
  • Best practices may vary by project
  • Language-specific items may be incomplete for niche languages

Acceptance Criteria

  1. ✓ Provides comprehensive checklist coverage
  2. ✓ Can customize for different languages/frameworks
  3. ✓ Identifies common issues efficiently
  4. ✓ Helps categorize issue severity
  5. ✓ Provides actionable feedback
  6. ✓ Saves time in review process
  7. ✓ Helps developers learn and improve

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,014
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
Skill 文件
  • SKILL.md
    • Code Review Checklist (代码审查清单)
    • Overview
    • When to Use This Skill
    • What This Skill Provides
      • 1. Predefined Checklists
      • 2. Review Guidance
      • 3. Review Workflow
    • Checklist Categories
      • 1. Correctness & Logic
      • 2. Code Style & Readability
      • 3. Performance & Efficiency
      • 4. Security
      • 5. Error Handling
      • 6. Testing
      • 7. Documentation
      • 8. Architecture & Design
    • Language-Specific Considerations
      • JavaScript/TypeScript
      • Python
      • Java
      • Go
    • Review Workflow
      • Step 1: Context (2-3 min)
      • Step 2: Overview (3-5 min)
      • Step 3: Detailed Review (15-30 min)
      • Step 4: Summary (3-5 min)
    • Usage Examples
      • As a Reviewer
      • As a Developer
      • For Team Standards
    • Output Format
    • Integration with Development Workflow
    • Limitations
    • Acceptance Criteria
  • 项目或源文件

相关 Skill

更多
Pr Review Pr Review 全面审查Pull Request,关注代码质量、安全、性能和可维护性,适用于任何代码审查任务。
Claude Code Dev Workflow Claude Code Dev Workflow OpenClaw + Claude Code 编程工作流。当用户想用 Claude Code 写代码、调试、重构、做 PR review 时激活。支持两种模式:ACP 集成(推荐,通过飞书/Telegram/Discord 直接对话 Claude Code)和 PTY 后台模式(通过 exec 控制 Claude...
Autonomous Ai Agents Opencode Autonomous Ai Agents Opencode "Delegate coding to OpenCode CLI (features, PR review)."
multi-agent-code-review multi-agent-code-review Use when 需要进行代码审查、PR review、代码质量评估或多智能体协作审查
项目改动审查清单 项目改动审查清单 Execute a production-ready code review checklist for this Vue 3 + TypeScript + Vite project. Use when the user asks for review, self-check before commit, pre-merge quality gate, risk scan, or "按规范检查" style requests.