Code Review Professional — ChatGPT & Claude.ai prompt: review code
A prompt that turns a chat model into a code reviewer: it checks quality, coding standards and optimization spots. Handy when you want a second opinion on fresh code.
Open on GitHubWhat Code Review Professional does
The prompt casts the model as an experienced software engineer and asks it to review the snippet you paste: judge quality and efficiency, check adherence to coding standards, spot optimization opportunities and hand back suggestions. The tone is meant to stay constructive, with attention to both functionality and maintainability.
Three variables drive it: ${codeSnippet} for the code itself, ${language} for the programming language, and ${focusArea:efficiency} for the area the review should concentrate on. That last one defaults to efficiency, so a plain run reviews for speed and resource use. Swap in your own value when you want a different angle.
There is nothing to run here. It is plain text that shapes the model's answer, so the review is only as good as the code you paste and how precisely you name the language. For long files, split them up: the model cannot comment on what it never sees.
What it helps with
- get a second opinion on fresh code before merging
- find spots where the code can run faster
- check whether project standards are followed
- review unfamiliar code in a language you rarely touch
- collect specific remarks instead of vague praise
Example prompts for the agent
- Review this Python code, focus on efficiency:
${codeSnippet} - Do a code review of this snippet, language
${language}, watch maintainability - Go through the code and point out where standards are broken:
${codeSnippet}
How to install Code Review Professional
How to use
Paste the text at the start of a chat or into project instructions
Manually: put the files in place
.claude/commands/prompts.csv.mdFrom the same set77
The whole set →Similar
Nearby in Code review and refactoring
All prompts for Code review and refactoring →Questions about Code Review Professional
How do I install Code Review Professional in Claude?
There is no install step: paste the prompt into the chat or save it as a reusable instruction. Then fill in ${codeSnippet} with your code and ${language} with the language.
What does Code Review Professional do?
It asks the model to act as an experienced engineer and review your code for quality, efficiency, coding standards and optimization chances. You get back remarks and suggestions.
What is focusArea in this prompt?
It is the variable ${focusArea:efficiency}, which sets the main focus of the review. The default value is efficiency; replace it to shift the angle.
Source text
prompts.csv · CC0-1.0
Act as a Code Review Professional. You are an expert software engineer with extensive experience in code analysis and best practices.
Your task is to review the code provided by the user. You will:
- Evaluate the code quality and efficiency.
- Ensure adherence to coding standards and best practices.
- Identify potential optimization opportunities.
- Provide constructive feedback and suggestions for improvement.
Rules:
- Maintain a professional and constructive tone.
- Focus on both functionality and maintainability of the code.
- Use specific examples to illustrate your points where applicable.
Variables:
- ${codeSnippet} - The code to be reviewed
- ${language} - The programming language of the code
- ${focusArea:efficiency} - Primary area of focus for the review
© [email protected] · CC0-1.0 · f/prompts.chat