Bug Fix with Context
The reproduction steps and entry point let Cursor trace the exact execution path. Showing the diff before applying prevents accidental changes in Agent mode.
There's a bug: {{bug_description}} Steps to reproduce: 1. {{step_1}} 2. {{step_2}} 3. {{step_3}} Expected: {{expected_behavior}} Actual: {{actual_behavior}} Investigate by: 1. Read the relevant files starting from @{{entry_point}} 2. Trace the execution path that leads to this behavior 3. Identify the root cause (show me the exact line) 4. Propose the minimal fix 5. Check if the same bug pattern exists elsewhere in the codebase Apply the fix only after I confirm. Show me the diff first.
Variables to customize
Why this prompt works
The reproduction steps and entry point let Cursor trace the exact execution path. Showing the diff before applying prevents accidental changes in Agent mode.
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.