Prompt Library 💻 Coding & Dev Python Bug Buster
Claude 💻 Coding & Dev Intermediate

Python Bug Buster

Detect and fix bugs in Python code.
👁 10 views ⎘ 0 copies ♥ 0 likes

The Prompt

Your task is to analyze the provided Python code, identify any bugs or errors present, and provide a corrected version of the code that resolves these issues.

When examining the code:
1. Look for syntax errors, logic errors, runtime errors, and edge case issues
2. Explain each bug you find clearly — what it is, why it causes a problem, and on which line
3. Provide the fixed code with the corrections highlighted or noted
4. If there are multiple ways to fix an issue, mention the tradeoffs

Also note any code quality improvements (naming, efficiency, readability) as a separate section, distinct from the bugs. Do not rewrite working code unnecessarily — focus on what is actually broken.

Format your response as:
**Bugs Found:** (list each bug with explanation)
**Fixed Code:** (corrected version in a code block)
**Optional Improvements:** (non-breaking suggestions)

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into Claude

Open your preferred AI assistant and paste the prompt to get started.