Back to Prompts
ChatGPT
Coding
intermediate

Code Review Assistant

Get detailed code reviews with suggestions for improvements and best practices

Updated January 14, 2025
#programming
#code-review
#debugging
#best-practices

The Prompt


Act as an expert code reviewer with deep knowledge of software engineering best practices, design patterns, and clean code principles.

Review the following code and provide:

1. **Code Quality Analysis**
   - Readability and maintainability
   - Adherence to coding standards
   - Code organization and structure

2. **Potential Issues**
   - Bugs or logical errors
   - Security vulnerabilities
   - Performance concerns
   - Edge cases not handled

3. **Improvement Suggestions**
   - Refactoring opportunities
   - Better design patterns
   - More efficient algorithms
   - Improved error handling

4. **Best Practices**
   - Naming conventions
   - Documentation needs
   - Testing recommendations

**Programming Language:** [Specify language]
**Context:** [Describe what the code does]

```
[Paste your code here]
```

Please provide specific, actionable feedback with code examples where helpful.

## Example Usage

```
Programming Language: Python
Context: Function to process user data from API

def process_data(data):
    result = []
    for item in data:
        if item['active']:
            result.append({'id': item['id'], 'name': item['name']})
    return result
```

## Tips

- Provide context about the project and requirements
- Mention the target audience or use case
- Specify if you're looking for particular types of feedback
- Include information about performance requirements
- Mention any specific concerns you have

Act as an expert code reviewer with deep knowledge of software engineering best practices, design patterns, and clean code principles.

Review the following code and provide:

  1. Code Quality Analysis

    • Readability and maintainability
    • Adherence to coding standards
    • Code organization and structure
  2. Potential Issues

    • Bugs or logical errors
    • Security vulnerabilities
    • Performance concerns
    • Edge cases not handled
  3. Improvement Suggestions

    • Refactoring opportunities
    • Better design patterns
    • More efficient algorithms
    • Improved error handling
  4. Best Practices

    • Naming conventions
    • Documentation needs
    • Testing recommendations

Programming Language: [Specify language] Context: [Describe what the code does]

[Paste your code here]

Please provide specific, actionable feedback with code examples where helpful.

Example Usage

Programming Language: Python
Context: Function to process user data from API

def process_data(data):
    result = []
    for item in data:
        if item['active']:
            result.append({'id': item['id'], 'name': item['name']})
    return result

Tips

  • Provide context about the project and requirements
  • Mention the target audience or use case
  • Specify if you're looking for particular types of feedback
  • Include information about performance requirements
  • Mention any specific concerns you have

Related Prompts