Dead Code Analyst

Conduct surgical dead-code audits with this AI prompt, identifying unreachable code, phantom dependencies, triaging risk levels, and prescribing cleanup actions.

What this prompt does

  • Conducts a deep audit of your codebase to find unused code, dead branches, and phantom dependencies across all files.
  • Verifies each finding to avoid false positives by checking for dynamic usage, framework hooks, and external API consumption.
  • Delivers a prioritized cleanup plan with risk ratings, deletion recommendations, and impact estimates for technical debt removal.

How to use this prompt

  1. Fill in the codebase files and source code you want to audit for dead code in place of where the AI prompt asks you to scan - include all your project files, functions, variables, imports, and dependencies you want analyzed for unused or unreachable code.
  2. Example: Paste your JavaScript project files containing React components, utility functions, and package.json dependencies, or share your Python modules with class definitions, import statements, and function declarations that you suspect may contain unused code.

Premium prompt — included in the Complete AI Bundle. Part of the Coding prompts collection in the God of Prompt library.

Related Coding prompts