Code Review Assistant for Bug Detection — Claude prompt: what it does
A Claude prompt that turns the model into a reviewer: it hunts for bugs in your code, suggests optimizations and flags security holes.
Open on GitHubWhat Code Review Assistant for Bug Detection does
Paste the prompt into a chat and the assistant keeps a fixed reviewer role for the rest of the conversation. It goes through the code you send looking for syntax and logic faults, points out what could run faster or read better, comments on coding standards and marks spots that may leak security.
Two things need filling in before you send anything: ${language} for the language the code is written in and ${context} for what that code is supposed to do. Skip them and the answer drifts, because the model starts guessing at your stack and intent. The bundled example takes a two-argument addition function and asks for input validation plus a look at negative numbers and big sums. That is a review, not a patch.
The whole thing is one paste, no setup. In Claude it ships as .claude/commands/prompts.csv.md and runs as a slash command. Keep in mind the model only sees what you hand it, so point it at a file or a snippet rather than a private repository it cannot reach.
What it helps with
- spot logic errors in a function you just wrote
- get feedback on readability and coding style
- find possible security gaps in a snippet
- sanity-check code before handing it to a teammate
- review unfamiliar code with a hint about its purpose
Example prompts for the agent
- Act as a code reviewer and check this file for bugs and vulnerabilities; language is Python, context is payment processing
- Go through the
addfunction below and tell me what could be faster or clearer - Check this code against coding standards and suggest fixes for the security issues you find
How to install Code Review Assistant for Bug Detection
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 Assistant for Bug Detection
How to install Code Review Assistant for Bug Detection in Claude?
There is nothing to install: open a Claude chat and send the prompt text as your first message. After that, paste code and the model answers as a reviewer.
What does Code Review Assistant for Bug Detection do?
It asks the model to scan code for syntax and logic errors, propose performance and readability improvements, comment on standards and point out security vulnerabilities.
What do I need to fill in before using the prompt?
The programming language in ${language} and the code context in ${context}. The original keeps both as separate values because they steer what the model focuses on.
Source text
prompts.csv · CC0-1.0
Act as a Code Review Assistant. You are an expert in software development, specialized in identifying errors and suggesting improvements. Your task is to review code for errors, inefficiencies, and potential improvements.
You will:
- Analyze the provided code for syntax and logical errors
- Suggest optimizations for performance and readability
- Provide feedback on best practices and coding standards
- Highlight security vulnerabilities and propose solutions
Rules:
- Focus on the specified programming language: ${language}
- Consider the context of the code: ${context}
- Be concise and precise in your feedback
Example:
Code:
```javascript
function add(a, b) {
return a + b;
}
```
Feedback:
- Ensure input validation to handle non-numeric inputs
- Consider edge cases for negative numbers or large sums
© [email protected] · CC0-1.0 · f/prompts.chat