AI Prompts for Identifying Deprecated API Usage

20 of the best prompts for identifying deprecated API usage, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

AI Prompts for Identifying Deprecated API Usage

20 of the best prompts for identifying deprecated API usage, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

Scroll to explore

Published June 28, 2026

Using deprecated library methods or APIs can cause future failures as they may be removed or unsupported. This can lead to unexpected behavior or complete application breakdowns. These prompts help developers identify and replace deprecated usage, ensuring code stability and future-proofing. This guide walks you through every stage of Identifying Deprecated API Usage, 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 which parts of the codebase are using deprecated methods or APIs.

List Deprecated Methods

Scan the entire codebase for deprecated methods or APIs currently in use. For each deprecated method identified, provide the corresponding file names and line numbers, along with a brief description of each method's purpose and any suggested alternatives if available. Format the output as a structured report for easy reference.

Diagnose the Wall

Check Specific File

Analyze the file [FILE_NAME] for any deprecated methods or APIs currently in use. Provide a detailed list of these deprecated elements, including the specific line numbers where they are found, and include a brief explanation of why each method or API is considered deprecated. Additionally, suggest any recommended alternatives if applicable, and format your findings in a clear and organized manner for easy reference.

Diagnose the Wall

Analyze Recent Changes

Analyze the most recent set of changes in the codebase related to the windsurf-deprecated-api-usage. Identify any deprecated methods or APIs that have been introduced, and for each one, provide the name, reason for deprecation, and recommended alternatives. Additionally, summarize the potential impact of these deprecated items on existing functionality and suggest specific steps for updating the code to ensure compatibility with the latest standards. Format your response as a detailed report.

Diagnose the Wall

Review Dependency Usage

Review the dependencies in my project for any deprecated methods or APIs. For each deprecated item you find, provide the name of the dependency, the specific deprecated method or API, the version in which it was deprecated, and any recommended alternatives or updates to ensure compatibility with the latest standards.

Diagnose the Wall

Summarize Deprecated Features

Provide a detailed summary of all deprecated language features used in the project related to [PROJECT NAME]. For each deprecated feature, include the specific file names and line numbers where they are found. Additionally, explain the potential impact of these deprecated features on the project's functionality and suggest alternatives or updates that could be implemented to replace them. Format the summary in a clear, organized manner for easy reference.

Diagnose the Wall

Isolate and Fix

Focus on replacing deprecated methods or APIs with current alternatives.

Replace Deprecated Methods

Identify all deprecated methods in the codebase related to the windsurf-deprecated-api-usage. For each deprecated method, provide a modern alternative and explain why it is preferred. Outline the steps needed to implement each change effectively, including any potential impacts on existing functionality. Additionally, specify the tests that should be conducted to ensure the new methods work correctly. Format your response in a clear, structured manner, detailing each method replacement in a separate section.

Isolate and Fix

Update API Calls

Identify any deprecated API calls in the provided code snippet: [CODE SNIPPET]. Replace them with the latest version of the API, ensuring compatibility with the existing code structure and functionality. After making the updates, provide a summary of the changes, detailing the specific deprecated calls that were replaced, the reasons for the updates, and any necessary adjustments made to ensure seamless integration with the current codebase.

Isolate and Fix

Refactor Affected Code

Refactor the code that currently relies on deprecated features to utilize updated methods or APIs. Provide a detailed summary of the changes made, including the specific deprecated features that were replaced, the new methods or APIs used, and any potential impacts on functionality. Ensure that the refactored code is well-structured, follows best practices for maintainability, and includes comments within the code to explain the rationale behind the changes for future reference.

Isolate and Fix

Modify Dependency Versions

Review the current dependencies in my project for any that are using deprecated methods. For each deprecated dependency, identify the latest version available and provide a brief explanation of the changes made in that version. Ensure that all proposed updates are compatible with the existing codebase, and outline any necessary modifications to the code to accommodate these updates. Format your response as a detailed report, including a summary of the affected dependencies and the steps taken to ensure compatibility.

Isolate and Fix

Optimize for Current Standards

Review the codebase for [PROJECT NAME] and identify any deprecated language features currently in use. For each deprecated feature, provide a detailed explanation of the modern standard that should replace it, including specific code modifications needed. Additionally, suggest best practices for optimizing overall code quality and performance in accordance with current standards. Format your findings in a structured report, highlighting each deprecated feature, its recommended replacement, and the rationale behind each change.

Isolate and Fix

Verify the Resolution

Ensure that all deprecated usage has been successfully replaced and the code functions correctly.

Run Code Analysis

Conduct a comprehensive code analysis of my project to identify any deprecated methods or APIs that may still be in use. Provide a detailed report that outlines the specific deprecated elements found, their locations within the code, and recommendations for updating or replacing them. Additionally, categorize the findings by severity, indicating which deprecated methods pose the highest risk to functionality, and ensure the report is formatted clearly for easy reference and action.

Verify the Resolution

Execute Test Suite

Run the complete test suite for [PROJECT_NAME] to verify that all replacements for the deprecated API function correctly. Provide a detailed report that includes the results of each test case, highlighting any failures or unexpected behaviors. Additionally, summarize any new issues that may have arisen during the testing process, and suggest potential fixes or areas for further investigation. Ensure the report is structured clearly, with sections for passed tests, failed tests, and overall conclusions.

Verify the Resolution

Validate Dependency Updates

Validate that all updated dependencies in the current codebase are functioning correctly. For each dependency, provide a brief summary of its purpose and explain how it integrates with the existing code. If any issues are found, detail the nature of the problem, including error messages, affected functionality, and potential solutions. Additionally, include recommendations for further testing or adjustments needed to ensure compatibility. Organize the report clearly with distinct sections for each dependency.

Verify the Resolution

Confirm Feature Functionality

Verify the functionality of all features affected by the changes in the deprecated API. For each feature, list its name and describe whether it is operating as intended, including any issues encountered during testing. If a feature is not functioning correctly, provide details on the nature of the problem and suggest potential solutions. Format your response as a report with distinct sections for each feature, and include a summary of the overall status at the end.

Verify the Resolution

Generate Compatibility Report

Generate a detailed compatibility report for the updated code with current standards and APIs. The report should include sections on the specific standards being adhered to, any deprecated features that have been replaced, and a comparison of the old and new API functionalities. Additionally, highlight any potential issues that may arise from the update and suggest best practices for ensuring continued compatibility. Ensure the report is formatted as a structured document with clear headings and bullet points for clarity.

Verify the Resolution

Prevent Recurrence

Implement measures to avoid future use of deprecated methods or APIs.

Create CLAUDE.md Rule

Create a new rule for the CLAUDE.md document that outlines guidelines for preventing the use of deprecated methods. Include a clear definition of what constitutes a deprecated method, reasons for avoiding them, and the consequences of using such methods in the codebase. Provide specific examples of deprecated methods, suggest alternative approaches or methods to use instead, and format the rule using bullet points or numbered lists for clarity and ease of understanding.

Prevent Recurrence

Add Code Comments

Review the codebase for any usage of deprecated methods or APIs. For each instance found, insert a comment above the relevant code line that warns against its use, provides a clear example of how it is currently used, explains the reason for its deprecation, and suggests a suitable alternative that developers should implement instead. Ensure that the comments are concise and informative to enhance clarity and prevent future misuse.

Prevent Recurrence

Develop Naming Conventions

Suggest a comprehensive set of naming conventions for identifying deprecated usage within the WINDSURF API. Include specific prefixes or suffixes that clearly indicate an element is deprecated, and provide detailed guidelines on documenting these changes for future reference. Additionally, give examples of how these conventions can be applied to various types of elements, such as FUNCTIONS, VARIABLES, and CLASSES, ensuring clarity and consistency for easier identification and replacement of deprecated elements in future development.

Prevent Recurrence

Design Session-Opener Checklist

Create a comprehensive checklist to review at the beginning of each coding session to prevent the use of deprecated methods from the API. Include the following sections: a list of deprecated methods to avoid, guidelines for identifying alternatives, reminders to check the latest API documentation, and steps to verify code compatibility with the current API version. Format the checklist clearly with bullet points for easy reference during coding sessions.

Prevent Recurrence

Implement Project Guard

Create a project guard script that automatically flags deprecated API usage during development. The script should scan the codebase for instances of deprecated APIs, providing clear warnings or error messages when such usage is detected. Include specific functionalities such as logging occurrences, suggesting alternatives, and integrating with the build process to prevent deployment if deprecated APIs are found. Provide a detailed outline of the script structure, key functions, and example code snippets to illustrate how it works.

Prevent Recurrence

Frequently asked questions

How does Windsurf identify deprecated methods?+

Windsurf uses its AI capabilities to scan the codebase for known deprecated methods and APIs, referencing the latest documentation and standards.

Can Windsurf update deprecated APIs automatically?+

Yes, in Cascade mode, Windsurf can autonomously update deprecated APIs by applying changes across multiple files, ensuring compatibility.

What if Windsurf breaks working code?+

In Cascade mode, Windsurf might break working code while fixing deprecated usage. Always verify changes and run tests to ensure stability.

How do I ensure my dependencies are up-to-date?+

Windsurf can check your project's dependencies for deprecated methods and suggest updates to the latest versions, ensuring compatibility.

How can I prevent future deprecated usage?+

Use Windsurf to create CLAUDE.md rules and implement project guards that flag deprecated usage, ensuring adherence to current standards.