Debugging Workflow
Claude Code can read files, run commands, and check git history — this prompt uses all three capabilities in a structured debugging flow. Requiring verification via running a command ensures the fix actually works rather than just looking plausible.
I'm hitting this error: \`\`\` {{errorOutput}} \`\`\` **Steps to reproduce:** {{reproSteps}} **When it started:** {{whenItStarted}} Debug this systematically: 1. Read the error and identify the failing file/line 2. Read that file and trace the execution path 3. Check recent git changes if relevant: run \`git diff {{branch}}\` or \`git log --oneline -10\` 4. Identify the root cause — not just the symptom 5. Propose a fix and explain why it solves the root cause 6. Apply the fix 7. Run {{verifyCommand}} to confirm it works If the error has multiple possible causes, investigate each one. Do not guess — verify by reading the actual code.
Variables to customize
Why this prompt works
Claude Code can read files, run commands, and check git history — this prompt uses all three capabilities in a structured debugging flow. Requiring verification via running a command ensures the fix actually works rather than just looking plausible.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Get thorough code reviews with actionable feedback tailored to your language, framework, and standards.
Context-Aware Code CompletionProviding the surrounding code and project context lets the model match existing patterns exactly. The constraint against modifying existing code prevents unwanted side effects.
Inline Code SuggestionConstraining suggestions to match existing style and scope produces insertions that feel native to the codebase. The 'no explanation' rule mimics real inline completion behavior.
Code ExplanationThe audience level parameter adjusts complexity automatically. Requiring a usage example ensures the explanation is practical, not just theoretical.