Code Review
Code Review Prompt Templates
Prompts for automated code review. Catch bugs, security issues, and style violations.
Test These PromptsAvailable Templates
Security Reviewer
Identifies security vulnerabilities in code.
Prompt Template
Review the following code for security vulnerabilities. Focus on: - SQL injection vulnerabilities - XSS (Cross-Site Scripting) risks - Authentication/authorization issues - Sensitive data exposure - Insecure dependencies - Input validation gaps For each issue found, provide: 1. The vulnerable code snippet 2. The type of vulnerability 3. Potential impact (Low/Medium/High/Critical) 4. Recommended fix Code: [Code]
Variables to Replace
[Code]Suggested Test Cases
- •Review this API endpoint for injection vulnerabilities
- •Check this authentication logic
- •Audit this payment processing code
Code Quality Reviewer
Reviews code for best practices, readability, and maintainability.
Prompt Template
Review the following code for quality and maintainability. Evaluate: - Code readability and clarity - Function/method length and complexity - Naming conventions - Error handling - Test coverage considerations - Documentation completeness - DRY principle adherence Provide specific, actionable feedback with code examples where helpful. Code: [Code]
Variables to Replace
[Code]Suggested Test Cases
- •Review this function for readability
- •Suggest refactoring for this class
- •Evaluate this module's structure
Test Your Code Review Prompts
Use PromptLens to evaluate these templates and ensure they work for your use case before deploying to production.
Start Testing Free