Add code review skill
This commit is contained in:
42
skills/code/review.md
Normal file
42
skills/code/review.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# 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)
|
||||
Reference in New Issue
Block a user