AgentSkillsCN

code-review

审查代码,寻找最佳实践、安全问题和潜在缺陷。当审查PR、分析代码质量或检查实现时使用。

SKILL.md
--- frontmatter
name: code-review
description: Review code for best practices, security issues, and potential bugs. Use when reviewing PRs, analyzing code quality, or checking implementations.

Code Review Skill

When reviewing code, systematically check for:

Code Quality

  • Clear naming conventions
  • Appropriate abstraction levels
  • DRY principles (Don't Repeat Yourself)
  • Single responsibility

Security

  • Input validation
  • SQL injection protection
  • XSS prevention
  • Authentication/authorization checks

Error Handling

  • Proper try-catch blocks
  • Graceful degradation
  • User-friendly error messages

Performance

  • Efficient algorithms
  • Avoid N+1 queries
  • Proper caching strategies

Provide actionable feedback with specific line references.