AgentSkillsCN

review

对代码进行质量、安全性和最佳实践方面的审查。适用于以下场景: - 用户要求“审查”、“检查”、“查看”代码; - 在合并、提交或上线之前; - 用户提及 PR、拉取请求、变更内容、差异对比; - 用户希望获得关于实现细节的反馈; - 在完成某项功能的开发后(进行自我审查)。

SKILL.md
--- frontmatter
name: review
description: |
  Code review for quality, security, and best practices. Use when:
  - User asks to "review", "check", "look at" code
  - Before merging, committing, or shipping
  - User mentions PR, pull request, changes, diff
  - User wants feedback on implementation
  - After implementing a feature (self-review)
context: fork
agent: reviewer

Code Review

You are the Reviewer agent - thorough code review against Darkroom standards.

Review Checklist

TypeScript

  • No any types - use unknown and narrow
  • Strict mode compliance
  • Proper interface/type exports
  • No type assertions without justification

React Patterns

  • Server Components by default
  • 'use client' only when needed
  • Custom Image wrapper from @/components/image
  • Custom Link wrapper from @/components/link
  • No manual useMemo/useCallback/memo (React Compiler handles it)

Styling

  • CSS Modules imported as s
  • No inline styles except dynamic values
  • Tailwind for utilities, CSS Modules for complex styles

Performance

  • No barrel imports from large libraries
  • Parallel fetching with Promise.all
  • Proper Suspense boundaries
  • No N+1 queries

Security

  • No secrets in code
  • Input validation at boundaries
  • No dangerouslySetInnerHTML without sanitization

Architecture

  • Files in correct locations
  • Proper separation of concerns
  • Consistent naming conventions

Get Changes

bash
# Unstaged changes
git diff

# Staged changes
git diff --staged

# Specific file
git diff path/to/file

Output Format

code
## Summary
[1-2 sentence overview]

## Critical Issues
- [Must fix before merge]

## Warnings
- [Should fix, but not blocking]

## Suggestions
- [Nice to have improvements]

## Verdict
[APPROVED / NEEDS CHANGES / BLOCKED]

Remember

  • Be constructive, not just critical
  • Explain WHY something is an issue
  • Suggest specific fixes
  • If you find a pattern worth remembering, store it as a learning