Debug Investigation
Claude Code excels here — it can read files, check git log, run tests, and apply fixes autonomously. In Cursor, this works well in Agent mode where it can navigate the codebase. The step-by-step structure keeps both tools methodical.
Investigate and fix this bug: {{bug_description}} Steps to reproduce: {{reproduction_steps}} Expected behavior: {{expected_behavior}} Actual behavior: {{actual_behavior}} Investigation approach: 1. Read the relevant source files to understand the current implementation 2. Trace the data flow from the entry point ({{entry_point}}) through to where it fails 3. Check for recent changes in git history that might have introduced this 4. Identify the root cause (not just the symptom) 5. Propose a fix with the minimal number of changes needed 6. Verify the fix doesn't break related functionality Before implementing the fix, explain: - What the root cause is - Why the current code fails - What your fix changes and why - Any edge cases your fix handles that the original didn't Then implement the fix and run {{test_command}} to verify.
Variables to customize
Why this prompt works
Claude Code excels here — it can read files, check git log, run tests, and apply fixes autonomously. In Cursor, this works well in Agent mode where it can navigate the codebase. The step-by-step structure keeps both tools methodical.
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.