AgentSkillsCN

aico-code-review

请求进行结构化的代码审查,以及时发现正确性、安全性、性能以及可读性方面的问题。代码审查应尽早开展,并频繁进行。 当满足以下条件时,可使用此技能: - 完成一项任务后,需要进行质量检查; - 在重大功能实现之后; - 在合并到主分支之前; - 当遇到瓶颈,需要为代码注入新鲜视角时; - 用户提出“代码审查”、“审查我的代码”、“检查我的代码”的请求; - 子代理驱动的工作流需要符合规范或接受质量审查。 审查类别:正确性、测试、安全性、性能、可读性、错误处理。 严重程度分级:关键级(立即修复)、重要级(在继续下一步之前修复)、次要级(稍后记录并处理)。

SKILL.md
--- frontmatter
name: aico-code-review
description: |
  Request structured code review to catch correctness, security, performance, and readability issues. Reviews should happen early and often.

  Use this skill when:
  - Completing a task and need quality check
  - After major feature implementation
  - Before merging to main branch
  - When stuck and need fresh perspective on code
  - User asks for "code review", "review my code", "check my code"
  - Subagent-driven workflow needs spec compliance or quality review

  Review categories: Correctness, Tests, Security, Performance, Readability, Error Handling
  Severity levels: Critical (fix now), Important (fix before proceeding), Minor (note for later)

Code Review

When to Request Review

Mandatory:

  • After completing each task
  • After implementing major feature
  • Before merge to main

Optional:

  • When stuck (fresh perspective)
  • Before refactoring
  • After fixing complex bug

Review Checklist

CategoryCheck
CorrectnessDoes it do what it should?
TestsAre there tests? Do they pass?
SecurityAny vulnerabilities?
PerformanceAny obvious bottlenecks?
ReadabilityIs code clear and maintainable?
Error HandlingAre errors handled properly?

Issue Severity

SeverityAction
CriticalFix immediately, blocks progress
ImportantFix before proceeding
MinorNote for later, can proceed

Review Output Template

markdown
## Code Review: [Feature/Task Name]

### Files Modified

- `path/to/file.ts` - [what changed]

### Issues

**Critical:**

- [ ] [Issue description]

**Important:**

- [ ] [Issue description]

**Minor:**

- [ ] [Issue description]

### Assessment

- [ ] Ready to proceed
- [ ] Needs fixes (see issues above)

Key Rules

  • ALWAYS review after each task completion
  • MUST fix Critical issues immediately
  • MUST fix Important issues before proceeding
  • Minor issues can be noted for later
  • If reviewer is wrong, push back with technical reasoning

Common Mistakes

  • ❌ Skip review because "it's simple" → ✅ Review everything
  • ❌ Ignore Critical issues → ✅ Fix immediately
  • ❌ Proceed with Important issues → ✅ Fix first