Code reviewer

From matteocervelli/llms · View interactive version

Code reviewer is an AI agent skill from the GitHub repository matteocervelli/llms. Review code for quality, security, and performance with comprehensive feedback.

How to use this skill

Skill file

Code Reviewer Skill

Purpose

This skill provides comprehensive code review guidance covering quality, security, performance, and style. It helps identify issues, suggest improvements, and ensure code meets project standards before committing.

Activation

On-demand via command: /review-code <file-path>

Example:

/review-code src/tools/example/core.py

When to Use

Resources

review-checklist.md

Comprehensive code review checklist covering:

security-patterns.md

Security best practices including:

Provides

Code Quality Feedback

Security Vulnerability Detection

Performance Optimization Suggestions

Refactoring Recommendations

Style Guide Compliance Checks

Usage Examples

Example 1: Review Python Module

/review-code src/tools/doc_fetcher/core.py

Provides feedback on:

Example 2: Security-Focused Review

/review-code src/api/authentication.py

Focuses on:

Example 3: Performance Review

/review-code src/processors/data_processor.py

Analyzes:

Review Categories

1. Code Quality (⭐⭐⭐⭐⭐ Essential)

File Organization
Naming Conventions
Type Hints
Docstrings
Error Handling

2. Testing (⭐⭐⭐⭐ Important)

Test Coverage
Test Quality

3. Performance (⭐⭐⭐ Moderate)

Efficiency
Resource Usage
Optimization

4. Security (⭐⭐⭐⭐⭐ Critical)

Input Validation
Authentication & Authorization
Data Protection
OWASP Top 10

5. Style (⭐⭐⭐ Moderate)

PEP 8 Compliance
Import Organization
Code Formatting

Review Output Format

# Code Review: <file-path>

## Summary
[Brief overview of file purpose and key findings]

## Quality Score: X/10
[Overall quality score with justification]

## Critical Issues (Must Fix)
- [Issue 1 with location and recommendation]
- [Issue 2 with location and recommendation]

## Important Issues (Should Fix)
- [Issue 1 with location and recommendation]
- [Issue 2 with location and recommendation]

## Suggestions (Consider)
- [Suggestion 1 with rationale]
- [Suggestion 2 with rationale]

## Strengths
- [Positive aspect 1]
- [Positive aspect 2]

## Detailed Analysis

### Code Quality
[Detailed quality assessment]

### Security
[Security assessment and concerns]

### Performance
[Performance analysis]

### Testing
[Test coverage and quality]

### Style
[Style guide compliance]

## Recommendations
1. [Priority 1 recommendation]
2. [Priority 2 recommendation]
3. [Priority 3 recommendation]

## Next Steps
[Suggested actions for improvement]

Best Practices

Constructive Feedback

Priority Levels

Context Awareness

Common Issues to Check

Python-Specific

General Issues

Integration with Development Workflow

Pre-Commit Review

Use this skill before committing:

/review-code <file-you-modified>

Pre-Pull Request Review

Review all changed files:

git diff --name-only main | xargs -I {} /review-code {}

Refactoring Review

After refactoring, verify improvements:

/review-code <refactored-file>

Notes

Used When

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.