跳到正文
cccskills
免费在 GitHub 公开

code-review

Comprehensive code review checklist and methodology. Use when reviewing PRs, conducting code audits, or assessing code quality. Keywords: review, PR, code review, audit, assess, quality, check

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md6.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

👁️ Code Review Skill

Philosophy: Code review is collaboration, not criticism.

When to Use

Use this skill when:

  • Reviewing a Pull Request
  • Conducting a code audit
  • Assessing code quality before merge
  • Mentoring through code feedback
  • Preparing code for production

Do NOT use this skill when:

  • Just need to run linter
  • Simple typo fix
  • Automated formatting changes only

Prerequisites

Before starting review:

  • Understand the purpose/goal of the change
  • Have context on the project architecture
  • Know the coding standards for the project
  • Can run the code locally (if needed)

Process

Phase 1: CONTEXT UNDERSTANDING 📋

Goal: Understand WHAT and WHY before HOW.

Steps:

  1. Read the PR Description

    • What problem does this solve?
    • What approach was taken?
    • Are there any caveats noted?
  2. Check Related Issues

    • Link to issue/ticket
    • Requirements met?
    • Edge cases addressed?
  3. Assess Scope

    • How many files changed?
    • Is this focused or sprawling?
    • Should this be multiple PRs?

Output: Clear understanding of change purpose.


Phase 2: HIGH-LEVEL REVIEW 🔭

Goal: Evaluate architecture and design decisions.

Checklist:

DESIGN
□ Does the solution make sense?
□ Is this the right place for this code?
□ Does it follow project patterns?
□ Is it over-engineered?
□ Is it under-engineered?

ARCHITECTURE
□ Proper separation of concerns?
□ Dependencies going the right direction?
□ New dependencies justified?
□ Breaking any architectural boundaries?

SCOPE
□ Does change match stated purpose?
□ Any scope creep?
□ Any missing pieces?

Output: Assessment of overall approach.


Phase 3: LINE-BY-LINE REVIEW 🔍

Goal: Examine code quality and correctness.

Checklist:

CORRECTNESS
□ Logic is correct
□ Edge cases handled
□ Error cases handled
□ Null/undefined handled
□ No off-by-one errors
□ Concurrency issues addressed

QUALITY
□ Clear variable/function names
□ Single responsibility principle
□ DRY (no unnecessary duplication)
□ Comments explain WHY, not WHAT
□ No dead code
□ No commented-out code
□ No TODOs without tracking

SECURITY
□ Input validation
□ No SQL injection risks
□ No XSS risks
□ Secrets not hardcoded
□ Proper authentication checks
□ Authorization verified

PERFORMANCE
□ No obvious N+1 queries
□ Appropriate caching
□ No blocking operations where async needed
□ Large data sets handled efficiently

Output: Detailed feedback on code quality.


Phase 4: TESTING REVIEW 🧪

Goal: Ensure adequate test coverage.

Checklist:

TEST PRESENCE
□ Tests added for new functionality?
□ Tests updated for modified functionality?
□ Test file naming consistent?

TEST QUALITY
□ Tests are meaningful (not just coverage)?
□ Edge cases tested?
□ Error cases tested?
□ Tests are independent/isolated?
□ No flaky tests introduced?

TEST COVERAGE
□ Happy path covered?
□ Unhappy path covered?
□ Boundary conditions covered?

Output: Assessment of test adequacy.


Phase 5: FINAL CHECKS ✅

Goal: Ensure readiness for merge.

Checklist:

DOCUMENTATION
□ README updated if needed?
□ API docs updated if needed?
□ Inline comments sufficient?
□ Migration guide if breaking changes?

OPERATIONAL
□ Logs added for debugging?
□ Metrics/monitoring considered?
□ Feature flags if needed?
□ Rollback plan if needed?

MERGE READINESS
□ CI passes?
□ No merge conflicts?
□ Approved by required reviewers?
□ All conversations resolved?

Output: Clear approve/request changes decision.


Review Comment Guidelines

Categorize Your Comments

PrefixMeaningAction Required
🔴 BLOCKER:Must fix before mergeYes, mandatory
🟡 SUGGESTION:Should considerRecommended
🟢 NIT:Minor, optionalNo
❓ QUESTION:Need clarificationResponse needed
💡 IDEA:Future improvementNo
👍 PRAISE:Great work!No

Example Comments

Good:

🔴 BLOCKER: This SQL query is vulnerable to injection.
Use parameterized queries instead:
`db.query("SELECT * FROM users WHERE id = ?", [userId])`

Bad:

This is wrong.

Tone Guidelines

  • ✅ "Consider using X because Y"
  • ✅ "What happens if Z is null?"
  • ✅ "Great use of pattern X!"
  • ❌ "This is stupid"
  • ❌ "Obviously you should..."
  • ❌ "Why didn't you just..."

Common Issues to Watch For

Security Issues

IssueDetectionSolution
SQL InjectionString concatenation in queriesParameterized queries
XSSUnescaped user input in HTMLProper escaping/encoding
Hardcoded secretsAPI keys in codeEnvironment variables
Missing authEndpoints without checksAdd auth middleware

Performance Issues

IssueDetectionSolution
N+1 queriesLoop with DB callsBatch/eager loading
Missing indexSlow queries on large tablesAdd database index
Blocking I/OSync calls in async contextUse async/await
Memory leakUnbounded caches/listenersCleanup/limits

Code Quality Issues

IssueDetectionSolution
God function100+ lines, many responsibilitiesBreak into smaller functions
Magic numbersif (status === 3)Named constants
Deep nesting4+ levels of if/forEarly returns, extraction
Copy-paste codeSimilar blocks repeatedExtract utility function

Success Criteria

Before approving:

  • I understand what this code does and why
  • The approach is appropriate for the problem
  • Code is correct and handles edge cases
  • Code is secure (no obvious vulnerabilities)
  • Tests are adequate and meaningful
  • Code is readable and maintainable
  • No blocking issues remain
  • All my questions have been answered

Related Skills

  • skills/kilo-kit/quality/testing/ - For test quality guidance
  • skills/kilo-kit/development/security/ - For security review
  • skills/kilo-kit/debugging/systematic/ - If bugs found during review

Code Review Skill v1.0.0 — Collaboration, not criticism

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

2d-games

免费

2D game development principles. Sprites, tilemaps, physics, camera.

中文简介正在准备中。当前显示原文说明。

VoDaiLocz/kilo-kit-mcp282026年9月13日 更新

3d-games

免费

3D game development principles. Rendering, shaders, physics, cameras.

中文简介正在准备中。当前显示原文说明。

VoDaiLocz/kilo-kit-mcp282026年9月13日 更新

aesthetic

免费

Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

中文简介正在准备中。当前显示原文说明。

VoDaiLocz/kilo-kit-mcp282026年9月13日 更新

Use when implementing or managing persistent, hierarchical memory systems for AI agents. Covers cross-session state, fact supersession, and self-managed memory tools to enable long-term recall and adaptive agent behavior.

中文简介正在准备中。当前显示原文说明。

VoDaiLocz/kilo-kit-mcp282026年9月13日 更新

Use when monitoring, tracing, or debugging agentic workflows in production. Keywords: observability, tracing, OpenTelemetry, Langfuse, latency, token cost, loop detection, telemetry.

中文简介正在准备中。当前显示原文说明。

VoDaiLocz/kilo-kit-mcp282026年9月13日 更新

Use when building self-correcting retrieval systems for AI agents. Keywords: RAG, retrieval, Corrective RAG, Self-RAG, query decomposition, reranking, hallucination, grounding.

中文简介正在准备中。当前显示原文说明。

VoDaiLocz/kilo-kit-mcp282026年9月13日 更新

查看 VoDaiLocz 的全部技能

报告此技能的问题