AI Prompts for Resolving AI-Induced Errors

20 of the best prompts for resolving AI-Induced errors, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

AI Prompts for Resolving AI-Induced Errors

20 of the best prompts for resolving AI-Induced errors, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

Scroll to explore

Windsurf sometimes introduces errors it cannot resolve, causing frustration and wasted time. This can lead to a cycle of unproductive attempts to fix the issue. These prompts guide developers to diagnose, fix, verify, and prevent such errors efficiently. This guide walks you through every stage of Resolving AI-Induced Errors, from Diagnose the Wall all the way through Prevent Recurrence, with a curated, copy-ready prompt at each step. Each stage targets a specific phase of the process so you always know exactly what to ask and what output to expect. Works with ChatGPT, Claude, and Gemini and any other major AI tool.

Diagnose the Wall

Identify the specific error introduced by Windsurf that it cannot resolve.

Identify Error Source

Please help me identify the source of an error in my code. I recently made a change and am unsure what went wrong. Provide a detailed analysis of the error message I received: [INSERT ERROR MESSAGE]. Additionally, include the relevant code snippet where the error occurred: [INSERT CODE SNIPPET]. Explain the potential causes of this error and suggest possible solutions to fix it.

Diagnose the Wall

Check Rule Compliance

Please review the following CLAUDE.md file content: [PASTE CONTENT]. Analyze the rules outlined within and confirm your understanding of each one. After your review, identify which specific rule was applicable to the last task and explain how it should have been applied. Provide a summary of any discrepancies between the rules and your previous actions, along with suggestions for ensuring compliance in future tasks.

Diagnose the Wall

Review Recent Changes

Please provide a detailed review of all the changes made during the last session. For each change, include a brief description of what was modified and the reasoning behind it. Highlight any specific changes that could potentially be linked to the current error, and explain how they might have contributed to the issue. Additionally, suggest possible steps to investigate or resolve these changes to help diagnose the problem effectively.

Diagnose the Wall

Analyze Cascade Actions

Analyze the Cascade mode actions that may have impacted the files associated with the current error. Detail the specific actions taken in Cascade mode, and explain how these actions could have led to unintended changes in the files. Provide examples of potential file alterations that may have occurred as a result of these actions, and suggest steps to identify and rectify any issues caused by these changes.

Diagnose the Wall

Evaluate Error Context

Analyze the current project context regarding the persisting error. Identify potential reasons for its continuation, considering factors such as recent changes in the project, any specific actions that may have triggered the error, and the overall system environment. Provide a thorough assessment that includes possible root causes, their implications, and any relevant patterns that may help in understanding the issue. Conclude with recommendations on how to address the error effectively.

Diagnose the Wall

Isolate and Fix

Focus on isolating the error and applying a specific fix.

Undo Last Change

Identify the last change made that introduced the error in your project. Provide a detailed explanation of what the change was and why it caused the issue. Then, revert that change and confirm that the error has been resolved. Additionally, outline any potential impacts this reversion may have on the overall project and suggest any further steps to prevent similar errors in the future.

Isolate and Fix

Apply Correct Rule

Please review the contents of the CLAUDE.md file and identify the specific error that needs to be fixed. Once you have isolated the error, apply the correct rule to rectify it. After applying the rule, provide a brief explanation of the rule you used and confirm that the error has been resolved. Ensure that your response is clear and includes any relevant details that support the correction.

Isolate and Fix

Suggest Alternative Fix

Identify the current error in the project and provide a detailed alternative solution that adheres to all project rules and guidelines. Explain the reasoning behind your suggested fix, including any potential benefits or drawbacks compared to the original approach. Additionally, outline the steps required to implement this alternative solution effectively, ensuring that it aligns with the overall project objectives.

Isolate and Fix

Refactor Affected Code

Refactor the affected code in the following section: [INSERT CODE SNIPPET]. Your goal is to eliminate the error while ensuring that the existing functionality remains intact. Please provide a detailed explanation of your refactoring approach, including the specific changes made, the reasoning behind those changes, and how they contribute to improved code quality. Additionally, outline any potential edge cases that were considered during the refactoring process and how they were addressed.

Isolate and Fix

Isolate Error Module

Identify the module or function within the code that is causing the error. Provide a detailed analysis of why this specific module is failing, including any relevant error messages or symptoms. After isolating the issue, propose a clear and actionable fix for that module, outlining the steps needed to implement the solution. Additionally, include any potential side effects of the fix and how to test it to ensure the error is resolved.

Isolate and Fix

Verify the Resolution

Ensure the error is resolved and the code functions as expected.

Run Error Check

Please conduct a comprehensive error check on the project to verify that the previously identified error has been fully resolved. Outline the specific areas you will examine during this check and detail any findings related to the resolution of the error. If any new issues are discovered, please document them along with recommendations for how to address them. Present the results in a clear format, including a summary of the checks performed and any relevant metrics or indicators of success.

Verify the Resolution

Confirm Rule Compliance

Please verify that all changes made comply with the rules outlined in CLAUDE.md. Carefully review each change and identify any discrepancies or violations of the established rules. Provide a detailed list of any issues found, including specific sections of CLAUDE.md that were not adhered to, and suggest possible corrections or adjustments to ensure compliance. Format your response in a clear, organized manner, highlighting the discrepancies and their implications.

Verify the Resolution

Test Affected Features

Please test all features that were affected by the error in [SPECIFIC SYSTEM OR APPLICATION NAME]. For each feature, provide a detailed assessment of its functionality, noting any discrepancies or issues that arise during testing. Include information on how the feature is expected to perform versus what you observe, and categorize any problems by severity. Additionally, suggest potential fixes or improvements for any issues identified, and summarize your findings in a report format.

Verify the Resolution

Validate Code Integrity

Please validate the integrity of the code after the recent fix. Review the code thoroughly to ensure that no new errors or issues have been introduced during the fixing process. Provide a detailed report that includes any identified errors, potential areas of concern, and suggestions for further improvements if necessary. Additionally, confirm that all original functionality remains intact and operational as expected.

Verify the Resolution

Generate Success Report

Please create a comprehensive success report that outlines the resolution process for the identified error. Include the following sections: a summary of the error, the steps taken to resolve it, any changes made to the system or process, and confirmation that the error is no longer present. Additionally, provide any relevant metrics or observations that demonstrate the effectiveness of the resolution. Format the report in a clear and organized manner, suitable for review by stakeholders.

Verify the Resolution

Prevent Recurrence

Create safeguards to prevent similar errors in the future.

Draft New CLAUDE Rule

Help me draft a new rule to add to my CLAUDE.md document that addresses the recent issue I encountered. The rule should clearly outline the specific circumstances that led to the error and provide actionable steps to prevent it from recurring in the future. Include guidelines on monitoring and evaluating the effectiveness of this rule over time. Format the rule in a clear and concise manner, ready for direct inclusion in the document.

Prevent Recurrence

Create Code Comment

Please add a detailed comment to the affected section of the code that explains the previous error that occurred. Include a clear description of what caused the error, how it was identified, and the specific steps taken to resolve it. This comment should serve as a guide for future edits, helping other developers understand the context and prevent similar issues from arising. Ensure the comment is concise yet informative, ideally no longer than five sentences.

Prevent Recurrence

Develop Session Checklist

Help me develop a comprehensive checklist to follow at the start of each windsurfing session to prevent errors. The checklist should include key items such as equipment inspection (sail, board, and harness), safety gear verification, and a review of weather conditions. Additionally, include steps for setting up the equipment properly and ensuring that all necessary tools are on hand. Format the checklist in a clear, easy-to-follow manner with bullet points for each item.

Prevent Recurrence

Establish Naming Convention

Please suggest a detailed naming convention that can help prevent similar errors in the future. Include specific guidelines for how to structure names, such as using prefixes, suffixes, or specific formats that enhance clarity and consistency. Explain the benefits of this naming convention, including how it can improve communication among team members, reduce confusion, and facilitate easier identification of components or files. Additionally, provide examples of good and bad naming practices to illustrate your points.

Prevent Recurrence

Design Project Guard

Create a project guard mechanism that automatically identifies and flags potential rule violations in a project workflow before they lead to errors. Outline the specific rules and criteria that should trigger a flag, and describe how the mechanism will notify the team of these potential issues. Include details on the integration of this mechanism within existing project management processes, and suggest methods for monitoring its effectiveness over time. Provide a structured plan for implementation, including timelines and responsible parties.

Prevent Recurrence

Frequently asked questions

Why does Windsurf introduce errors it can't fix?+

Windsurf's Cascade mode can make autonomous edits across multiple files, sometimes introducing errors if it misinterprets project rules or dependencies.

How can I prevent Windsurf from making unwanted changes?+

Ensure your CLAUDE.md file is comprehensive and clear, guiding Windsurf's actions effectively. Regularly update it to reflect project changes.

What should I do if Windsurf keeps spinning on an error?+

Interrupt the process and use diagnostic prompts to identify the error source. Then apply targeted fixes to resolve the issue.

Can I limit Windsurf's editing scope?+

Yes, you can configure Windsurf to focus on specific files or modules by adjusting your project rules and settings in CLAUDE.md.

How do I verify that an error is truly resolved?+

Use verification prompts to run comprehensive checks and tests, ensuring all affected features function correctly without new issues.