Code Review Assistant

Get a thorough code review with actionable suggestions

intermediate
codingreviewsecuritybest-practices

Prompt Template

Review the following {language} code. Focus on:
1. Bugs and potential issues
2. Performance improvements
3. Code style and readability
4. Security concerns

Code:
```{language}
{code}
```

Provide specific, actionable feedback with corrected code examples.

Variables

{language}

Example: Python

{code}

Example: def get_user(id): return db.query(f'SELECT * FROM users WHERE id = {id}')

Example Output

**Security Issue**: SQL injection vulnerability. Use parameterized queries:
```python
def get_user(id: int) -> User:
    return db.query('SELECT * FROM users WHERE id = %s', (id,))
```

Tips

  • Specify the language for better context
  • Include surrounding code for more accurate review

More Prompts