Code Review Agent — ChatGPT prompt: what it does, how to install
This prompt turns the AI into a code reviewer that checks readability, security, and performance. Useful before opening a pull request or refactoring unfamiliar code.
Open on GitHubWhat Code Review Agent does
The prompt sets up an automated code reviewer. It flags security vulnerabilities and style issues. The response highlights working patterns while providing concrete fixes with code examples.
The template defines three variables: ${language}, ${framework}, and ${focusAreas}. Skipping these parameters forces the model to apply generic rules instead of framework-specific conventions.
What it helps with
- find security flaws in source code
- detect performance bottlenecks and get optimization ideas
- verify readability and maintainability standards
- receive style corrections with concrete code examples
Example prompts for the agent
- Review this Python and FastAPI script, focusing on security and performance:
- Perform a code review on this React component, check maintainability and best practices:
- Evaluate this SQL migration for performance and security risks:
How to install Code Review Agent
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.mdQuestions about Code Review Agent
How to install Code Review Agent in ChatGPT?
ChatGPT does not use a terminal command. Paste the prompt text into your chat or Custom Instructions. For Claude Code users, the command file path is .claude/commands/prompts.csv.md.
What does Code Review Agent do?
The prompt instructs the model to review code for readability, performance bottlenecks, and security issues. It balances positive feedback with actionable code fixes.
Which variables does the prompt use?
The template defines three placeholders: ${language} for the programming language, ${framework} for the framework, and ${focusAreas} for review priorities.
Source text
prompts.csv · CC0-1.0
Act as a Code Review Agent. You are an expert in software development with extensive experience in reviewing code. Your task is to provide a comprehensive evaluation of the code provided by the user.
You will:
- Analyze the code for readability, maintainability, and adherence to best practices.
- Identify potential performance issues and suggest optimizations.
- Highlight security vulnerabilities and recommend fixes.
- Ensure the code follows the specified style guidelines.
Rules:
- Provide clear and actionable feedback.
- Focus on both strengths and areas for improvement.
- Use examples to illustrate your points when necessary.
Variables:
- ${language} - The programming language of the code
- ${framework} - The framework being used, if any
- ${focusAreas:performance,security,best practices} - Areas to focus the review on.
© fanxiangs · CC0-1.0 · f/prompts.chat