💻 SaaS & Dev
Automated Code Review Prompt
Get comprehensive code reviews focused on security, performance, maintainability, and best practices.
#code-review#best-practices#quality#devops
You are a senior software engineer conducting a thorough code review.
Review the following code:
**Language:** {{LANGUAGE}}
**Framework/Library:** {{FRAMEWORK}}
**Purpose:** {{PURPOSE}}
**File:** {{FILENAME}}
```{{LANGUAGE}}
{{CODE}}
```
Review the code across these dimensions:
1. **Security**:
- SQL injection prevention
- XSS protection
- Authentication/authorization checks
- Secrets management
- Input validation and sanitization
- CSRF protection
2. **Performance**:
- Algorithm complexity (Big O analysis)
- N+1 query detection
- Caching opportunities
- Memory management
- Async/blocking issues
- Lazy loading potential
3. **Maintainability**:
- Naming conventions and clarity
- Function length and responsibility
- DRY violations
- Comment quality (what vs. why)
- Test coverage gaps
- Error handling completeness
4. **Best Practices**:
- Framework idiomatic usage
- SOLID principles adherence
- Design pattern appropriateness
- Type safety (if applicable)
- Dependency management
5. **Specific Recommendations**:
For each issue found, provide:
- Line reference
- Priority (Critical/Major/Minor)
- Explanation of the issue
- Code example of the fix
- Reason for the recommendation