Debugging Assistant
Provides all the context a debugger needs (error, location, reproduction, expected vs actual) and asks for root cause analysis before applying a fix, preventing superficial patches.
I'm hitting this bug:\n\nError: {{error_message}}\nWhere: {{where_it_occurs}}\nWhen: {{reproduction_steps}}\n\nExpected behavior: {{expected}}\nActual behavior: {{actual}}\n\nDebug this step by step:\n1. Read the file where the error originates\n2. Trace backward — what calls this code and with what arguments?\n3. Check for common causes: null/undefined values, type mismatches, async timing issues, missing env vars\n4. Look at recent changes to the involved files (if git history is available)\n5. Propose a fix with an explanation of the root cause\n\nBefore applying the fix:\n- Explain WHY the bug happens, not just how to fix it\n- Show me the specific line(s) that are wrong\n- Confirm the fix won't break other code paths that use the same function
Variables to customize
Why this prompt works
Provides all the context a debugger needs (error, location, reproduction, expected vs actual) and asks for root cause analysis before applying a fix, preventing superficial patches.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Forcing the agent to plan before acting prevents premature execution and wasted steps. Explicit dependency mapping enables parallel execution and catches logical gaps early.
Tool Selection AgentThe ReAct pattern (Reason + Act) creates an explicit reasoning trace that improves tool selection accuracy. The error-handling rule prevents infinite retry loops.
Prompt CompressorExplicitly requiring all functional requirements to be preserved prevents the model from over-compressing and losing critical instructions.
Memory Management AgentExplicit memory read/write instructions create agents that improve over time. Categorization keeps memories organized, and the deduplication rule prevents context bloat.