ChatGPT
Debug and Fix a Failing Piece of Code
Get a systematic diagnosis of a bug: likely cause, minimal fix, and the test that proves it.
Explain Code
Understand inherited code fast: what it does, why, its dependencies and where it breaks.
Act as a patient senior developer onboarding me onto unfamiliar code. My experience level: {{level}} Code: ``` {{code}} ``` Explain in this order: 1. One-paragraph summary of what this code does and where it likely sits in the system 2. Walkthrough of the important blocks in execution order, in plain language 3. Inputs, outputs and side effects (network, filesystem, state, globals) 4. Assumptions the code makes that could break 5. Vocabulary or patterns used here that I should learn, with a one-line definition each 6. Three questions I should ask the original author Do not paraphrase every line. Focus on intent and risk, not syntax.
Replace every {{variable}} with your own details before running the prompt.
2 variables
Get a systematic diagnosis of a bug: likely cause, minimal fix, and the test that proves it.
Review code for correctness, security, performance and readability with severity-ranked findings.
Get a clean REST design with resources, status codes, validation, pagination and error shapes.