When using the code-review skill, provide a code snippet to be analyzed. The system will evaluate the code against specific criteria and return a structured response.
Analysis Criteria
The review covers:
- Bugs and logical errors: Functional correctness.
- Security vulnerabilities: Detection of injection attacks, unvalidated input, and hardcoded secrets.
- Performance: Identification of unnecessary allocations, missing
async/await patterns, and N+1 query problems. - Readability: Evaluation of naming conventions, code complexity, and the use of magic numbers.
- Error Handling: Identification of missing edge case management and error handling.
Response Format
The output is strictly structured into three sections:
- Issues: A numbered list of critical problems that require immediate fixes.
- Suggestions: A numbered list of non-critical improvements or best practices.
- Verdict: A single-sentence summary of the code quality.
## Review Guidelines
For every code snippet analyze:
- Bugs and logical errors
- Security vulnerabilities (injection, unvalidated input, hardcoded secrets)
- Performance (unnecessary allocations, missing async/await, N+1 queries)
- Readability (naming, complexity, magic numbers)
- Missing error handling and edge cases
Response format:
**Issues** — critical problems that must be fixed (numbered list)
**Suggestions** — improvements worth considering (numbered list)
**Verdict** — one sentence summary