name: code-review description: Provide a structured checklist for reviewing code changes.
Code Review Skill
Use this skill to conduct a comprehensive review of code changes. Evaluate the following areas and provide feedback organised by severity (e.g. Must fix, Should fix, Nit):
Correctness
- Does the change implement the specification and satisfy the tasks?
- Are all acceptance criteria met? Are edge cases handled gracefully?
- Does the code integrate properly with existing components and data flows?
Design & Architecture
- Is the code consistent with the planned architecture and layering defined in the constitution? Does it honour module boundaries and dependency inversion?
- Are abstractions clear and not leaking internal details? Are responsibilities well divided across classes and functions?
Tests
- Are there sufficient unit and integration tests? Do tests cover both positive and negative scenarios?
- Do tests assert expected behaviour and protect against regressions? Are they deterministic and repeatable?
- Is test setup clear and isolated from production code?
Style & Readability
- Does the code follow language‑specific style guidelines (naming, formatting, idioms)?
- Are names descriptive and consistent? Is the code easy to read and understand?
- Are comments used appropriately to explain why (not what) when necessary? Is dead code removed?
Security
- Are inputs validated and sanitised? Are there any injection risks (SQL, shell, template, etc.)?
- Are secrets handled securely (no hardcoded tokens, proper use of environment variables or secret managers)?
- Are authentication and authorisation checks implemented correctly? Is sensitive data encrypted?
Performance
- Are there any obvious performance bottlenecks (e.g. unnecessary loops, repeated database calls, excessive memory usage)?
- Are data structures and algorithms appropriate for the expected load? Are caching or batching strategies applied where needed?
- Does the code scale horizontally or handle concurrency appropriately? Are resources released properly?
Provide actionable suggestions and point to specific lines or functions. Encourage the author to address issues and follow up with another review if necessary.