AgentSkillsCN

code-review

专注于预防Bug的代码审查清单。涵盖崩溃、逻辑错误、安全问题、内存泄漏以及异步问题。在审查Pull Request、代码变更,或当用户请求代码审查时使用此功能。

SKILL.md
--- frontmatter
name: code-review
description: Code review checklist focused on bug prevention. Covers crashes, logic errors, security, memory leaks, and async issues. Use when reviewing pull requests, code changes, or when the user asks for a code review.

Code Review

Goal: Prevent bugs. Ignore style, formatting, naming — linter handles that.


Report These

  • Null/undefined crashes
  • Logic errors (off-by-one, wrong conditions, missing edge cases)
  • Race conditions, missing Promise handling
  • Memory leaks (unsubscribed observables, event listeners)
  • Infinite loops
  • SQL/XSS injection, unsanitized input
  • Authentication bypass, wrong permission checks
  • Exposed secrets
  • Breaking changes without migrations
  • N+1 queries, blocking operations in main thread

Ignore These

  • Formatting, spacing
  • Variable names (unless truly misleading)
  • Refactoring ideas without concrete bug
  • Style preferences
  • Missing comments

Review Checklist

  1. Will it crash? (null/undefined, types)
  2. Is logic correct? (edge cases)
  3. Is data safe? (validation, permissions)
  4. Resource leaks? (subscriptions, listeners)
  5. Async correct? (Promise handling, race conditions)

If all clear → APPROVE.


Tone

Be direct. State impact clearly: "Crash", "Bug", "Data loss", "Breaking". When in doubt, don't comment.