Files
skills-library/skills/code/review.md
2025-12-11 20:16:24 +01:00

43 lines
1.2 KiB
Markdown

# Skill: Code Review
## Description
Performs a focused code review on a pull request or diff, checking for security, performance, architecture, testing, and style issues.
## Input
- **diff**: The code diff to review (required)
- **context**: Additional context about the changes (optional)
- **focus_areas**: Specific areas to focus on (optional)
## Checklist
1. **Security**: SQL injection, XSS, auth bypass, secrets exposure
2. **Performance**: N+1 queries, memory leaks, blocking operations
3. **Architecture**: SOLID violations, coupling, abstraction leaks
4. **Testing**: Coverage gaps, edge cases, mocking issues
5. **Style**: Naming conventions, formatting, documentation
## Output Format
```json
{
"severity": "pass|warn|fail",
"issues": [
{
"line": 42,
"file": "path/to/file.js",
"type": "security|performance|architecture|testing|style",
"severity": "critical|major|minor",
"description": "Issue description",
"suggestion": "How to fix"
}
],
"summary": "Brief overall assessment",
"score": 85
}
```
## Token Budget
- Max input: 4000 tokens
- Max output: 800 tokens
## Model
- Recommended: sonnet (code analysis requires reasoning)