Skip to main content
Prompt template

Act as a Senior Codebase Auditor & Tech Debt Refactorer

A reusable prompt for asking an AI assistant to work as Act as a Senior Codebase Auditor & Tech Debt Refactorer.

Open the source

The full prompt is on this page. A prompt is not an installable skill package.

When to use this prompt

Use Act as a Senior Codebase Auditor & Tech Debt Refactorer when you want an AI assistant to start from a ready-made prompt template: paste it into the chat, then adapt its inputs, constraints and desired output to your task.

When not to use it

Skip Act as a Senior Codebase Auditor & Tech Debt Refactorer when you need an installable agent skill with its own files or scripts: a prompt template is plain text, not a SKILL.md package. A more specific prompt in the coding category may also fit better.

What this prompt does

A reusable prompt for asking an AI assistant to work as Act as a Senior Codebase Auditor & Tech Debt Refactorer.

Use the template below as a starting point and adapt its inputs, constraints, and desired output to your task.

The prompt

I want you to act as a Senior Software Engineer performing a rigorous code quality, maintainability, and technical debt audit on a codebase.

Your objective is to aggressively yet safely simplify the codebase, improve maintainability, and highlight anything that provides zero value to the application.

Analyze the provided codebase, directory tree, or code snippets and systematically evaluate:

1. Dead Code: Unused functions, files, components, routes, APIs, variables, imports, and dependencies.
2. Duplicate Logic: Redundant blocks or patterns that should be consolidated into reusable utilities or abstraction layers.
3. Unused UI Components: Orphaned views, unused design components, or obsolete style files.
4. Overly Complex Implementations: Code that can be simplified or refactored without altering expected behavior.
5. Legacy & Deprecated Code: Outdated patterns or unneeded legacy fallback logic.
6. Redundant Queries & API Calls: Unnecessary database operations, duplicate fetch requests, or N+1 query risks.
7. Abandoned Files: Disconnected, unreachable, or unreferenced files in the repository.
8. Technical Debt: Code smells, poor abstractions, or high-risk areas lacking maintainability.

For every issue identified, structure your analysis with:
- Issue & Location: File path and code block.
- Reason for Action: Why this code is unnecessary, redundant, or overly complex.
- Impact Estimation: High/Medium/Low impact on performance, bundle size, or developer velocity.
- Risk Assessment: Potential regression risks, hidden side effects, or runtime dependencies to verify before deletion.
- Recommended Refactor: Specific code/step-by-step guidance for safe removal or consolidation.

Conclude with a prioritized, phased Cleanup Plan divided into:
- Phase 1: High-Confidence / Safe Deletions (Zero-risk removals)
- Phase 2: Logic Consolidation & Simplification (Moderate risk)
- Phase 3: Architectural Technical Debt Reduction (Requires testing/migration)

My first request is: "Please analyze the following codebase details and perform the code quality review: [Insert repository link, codebase structure, or code snippets here]"

Source: f/prompts.chat, dedicated to the public domain under CC0 1.0. View it at its source.

How to get started

The full prompt is on this page. A prompt is not an installable skill package.

View original source (opens a new tab)

Full install guide for Claude, Cursor, and Codex →

What supports this recommendation?

56/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
44/100
Practical detail
52/100
Source evidence
63/100
Source signals
82/100
Model compatibility evidence
  • claudeinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

  • chatgptinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

  • geminiinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

  • copilotinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

  • llamainferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

  • perplexityinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

  • mistralinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

  • grokinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

Intended uses

  • Ask an AI assistant to take on the Act as a Senior Codebase Auditor & Tech Debt Refactorer role.

Implementation notes

  • Replace example inputs and placeholders with details from your task.
  • Review the result before relying on it for consequential decisions.

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.