Skip to main content
prompt GP ChatGPT

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 GitHub

What 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 add function 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

Questions 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

Similar prompts

All prompts for Code review and refactoring →

From the same set91

The whole set →
Dockerfile and CI taste A prompt that lists rules for Dockerfiles and CI: multi-stage builds, non-root user, image scanning. Useful when you ask an AI to write or review a build config. GP ChatGPT ★ 174,676repo stars Senior Code Reviewer (severity-ranked) A code review prompt that ranks findings from blockers down to nits and closes with a verdict. Useful when you need to know what in a patch actually breaks. GP ChatGPT ★ 174,676repo stars TypeScript Library taste A prompt that pins down conventions for a TypeScript library: pnpm, strict tsconfig, tsup, vitest, Changesets. Useful when a project needs one style from the first commit. GP ChatGPT ★ 174,676repo stars Claude Web Page Redesign Planning Prompt A prompt that makes the model audit the current markup and code first, then hand back a redesign plan in markdown. No edits get made. GP ChatGPT ★ 174,676repo stars Automated Text Typing Every 5 Minutes with Python This prompt turns the chat into a Python automation engineer that writes a script typing your text on a timer. Handy when the same line has to go into another window without you touching the keyboard. GP ChatGPT ★ 174,676repo stars Fix LaTeX dollars This prompt sorts every $ in Markdown into currency, math or shell code and escapes only the currency ones. Useful when your build throws warnings. GP ChatGPT ★ 174,676repo stars Vector-Based Space Combat System A prompt that turns the chat into a game mechanics engineer: give it a high-speed combat concept, get movement and projectile logic back. GP ChatGPT ★ 174,676repo stars High-Velocity Dogfight A prompt that asks a model to build a 3D flight simulator: a cylindrical particle tunnel, 5,000 star particles, and speed-driven motion blur. GP ChatGPT ★ 174,676repo 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