| name | code-review |
| description | Review code changes against project standards with structured feedback on security, performance, naming, error handling, and test coverage. |
Code Review
Perform a structured code review on staged or recent changes, checking for security issues, performance problems, naming inconsistencies, and missing tests.
When to Use
Use this skill when:
- Reviewing a PR or set of changes before merge
- Self-reviewing your own code before pushing
- Auditing a specific file or module for quality
Instructions
-
Read the style guide at ../../_references/style-guide.md to understand the team's conventions.
-
Identify the changes to review:
- If given a file path, review that file
- If given a PR number, use
gh pr diff <number> to get the diff
- If no target specified, use
git diff --staged for staged changes
- If nothing is staged, use
git diff HEAD~1 for the last commit
-
Review each changed file against these criteria:
Security (Critical)
Performance
Code Quality
Testing
-
Rate each category:
- 🟢 Good — no issues found
- 🟡 Acceptable — minor issues, non-blocking
- 🔴 Needs Work — must fix before merge
-
Provide specific feedback:
- Reference exact line numbers
- Explain why something is a problem, not just what
- Suggest a concrete fix for every issue raised
- Distinguish between blocking issues and suggestions
-
Output format:
## Code Review: {file or PR}
| Category | Rating | Issues |
|-------------|--------|--------|
| Security | 🟢 | 0 |
| Performance | 🟡 | 2 |
| Quality | 🟢 | 0 |
| Testing | 🔴 | 3 |
### Blocking Issues
...
### Suggestions
...
### What's Good
...
Example Usage
Review the staged changes
Code review src/api/auth.ts focusing on security
Review PR #42