Skip to main content
prompt GP ChatGPT

Code Review Assistant — ChatGPT & Claude.ai prompt: review any code

A prompt that turns the model into a reviewer: it reads your code for bugs, style and maintainability, then hands back a list of fixes.

Open on GitHub

What Code Review Assistant does

The prompt sets a reviewer role and a fixed three-part answer: an overview of the code's strengths and weaknesses, section-by-section feedback, and a list of actionable improvements. It covers readability, maintainability and style, flags spots where the code may fail, and points out coding standards that were followed or broken.

Scope stays on the language and framework you name, so put both in your message along with the code itself. Skip that and the feedback drifts into generic advice. The prompt ships with a Python prime-finding function as its input example, which shows the shape of the response you get back.

It lives in the f/prompts.chat repository under CC0-1.0, so you can edit the wording to match your team's review checklist. The tone is set to constructive: every suggestion is supposed to come with an explanation rather than a bare verdict.

What it helps with

  • find potential bugs in a function before merging
  • get line-by-line notes on style and readability
  • check which coding standards the code breaks
  • build a fix list before sending code to a teammate
  • assess unfamiliar code without reading all of it

Example prompts for the agent

  • Act as a Code Review Assistant and review this Python function: give me the strengths and weaknesses, then line-by-line feedback and a list of improvements.
  • Check this class for readability and maintainability, flag anywhere it might fail, and suggest fixes with examples.
  • Review this TypeScript module: which coding standards does it violate and what should be rewritten?

How to install Code Review Assistant

How to use

Paste the text at the start of a chat or into project instructions

Questions about Code Review Assistant

How do I install Code Review Assistant in Claude?

There is nothing to install: copy the prompt text into a chat or into the system instructions, then paste your code below it.

What does Code Review Assistant do?

It reviews submitted code for readability, maintainability and style, looks for potential bugs, and returns three sections: code analysis, specific feedback, and improvement suggestions.

Do I need to name the language and framework?

Yes. The prompt tells the model to stay on the language and framework the user provides, so without them the feedback stays generic.

Source text

prompts.csv · CC0-1.0
Act as a Code Review Assistant. Your role is to provide a detailed assessment of the code provided by the user. You will:

- Analyze the code for readability, maintainability, and style.
- Identify potential bugs or areas where the code may fail.
- Suggest improvements for better performance and efficiency.
- Highlight best practices and coding standards followed or violated.
- Ensure the code is aligned with industry standards.

Rules:
- Be constructive and provide explanations for each suggestion.
- Focus on the specific programming language and framework provided by the user.
- Use examples to clarify your points when applicable.

Response Format:
1. **Code Analysis:** Provide an overview of the code’s strengths and weaknesses.
2. **Specific Feedback:** Detail line-by-line or section-specific observations.
3. **Improvement Suggestions:** List actionable recommendations for the user to enhance their code.

Input Example:
"Please review the following Python function for finding prime numbers: \ndef find_primes(n):\n    primes = []\n    for num in range(2, n + 1):\n        for i in range(2, num):\n            if num % i == 0:\n                break\n        else:\n            primes.append(num)\n    return primes"

© sinansonmez · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Code review and refactoring →

From the same set77

The whole set →
Deep Copy Functionality A prompt that explains shallow versus deep copying and shows how to duplicate objects without leaving shared references behind. GP ChatGPT ★ 174,597repo stars Developer Work Analysis from Git Diff and Commit Message This prompt reviews a git diff and commit message, then summarizes the change scope, possible issues, key modifications, and recommendations. GP ChatGPT ★ 174,597repo stars Code Translator: Any Language to Any Language A prompt that turns code in one language into another, keeping behaviour intact and commenting the key parts. GP ChatGPT ★ 174,597repo stars Predictive Eye Tracking Heatmap Generator A prompt that turns a UI screenshot into a thermal heatmap: where the eye lands, and what gets scrolled past. GP ChatGPT ★ 174,597repo stars Reverse Prompt Engineer A prompt that takes a finished output — text, code, an idea — and reconstructs the request that likely produced it. Handy for decoding someone else's prompt or auditing your own. GP ChatGPT ★ 174,597repo stars Devops Engineer A prompt that turns the chat into a senior DevOps engineer and walks through deployment, infrastructure and CI/CD for your task. GP ChatGPT ★ 174,597repo stars SEO Prompt A prompt that has WebPilot build a detailed 2,000-word article outline from Google's top 10, with keywords and an FAQ. GP ChatGPT ★ 174,597repo stars Large Language Models Security Specialist A prompt that turns a chat into an LLM security review: it probes how the model answers test prompts and suggests ways to close the gaps. GP ChatGPT ★ 174,597repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor