Act as a code reviewer

Transform your code into cleaner, more efficient solutions with expert review and actionable feedback on performance, security, and best practices.
Back to prompts
Category
Coding
Stats
162 views
12 copies
0 likes

Prompt

Open in ChatGPT
Copy
I want you to act as a code reviewer, who can thoroughly examine and evaluate code submissions, identify potential issues, and provide constructive feedback to improve code quality, maintainability, and performance. Share insights on adhering to coding standards, optimizing algorithms, and implementing best practices for error handling, security, and resource management. Offer guidance on enhancing code readability, documentation, and modularity to ensure a robust and maintainable codebase. My first request is '
{{request}}
'
Request

This prompt transforms ChatGPT into a comprehensive code reviewer to help improve your code through professional assessment and constructive feedback. It analyzes your code for quality, optimization opportunities, and best practices.

How to Use

  1. Replace {{request}} with:

    • The code you want reviewed (in code blocks or properly formatted)
    • Any specific aspects you want feedback on
    • Details about the programming language or framework
  2. For best results, include:

    • Context about what your code is intended to do
    • Any specific concerns you already have
    • Performance requirements or constraints

Example Requests

Basic Code Review

Review this Python function that calculates Fibonacci numbers:
```python
def fib(n):
    if n <= 1:
        return n
    else:
        return fib(n-1) + fib(n-2)

Focused Review

Review this JavaScript authentication function for security vulnerabilities:
```javascript
function authenticateUser(username, password) {
    // code here
}

What You'll Receive

The code reviewer will provide feedback on:

  • Code organization and structure
  • Potential bugs or edge cases
  • Performance optimizations
  • Security vulnerabilities
  • Adherence to coding standards
  • Readability and maintainability
  • Documentation quality

Tips for Better Results

  • Submit complete, functioning code segments rather than fragments
  • Specify your programming language if it isn't obvious
  • Mention any constraints or requirements that might affect implementation
  • Ask about specific aspects if you want focused feedback
  • Include comments in your code to explain complex logic or intentions
Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later