Tech Debt Auditor

Identifies and prioritizes technical debt in a codebase with an effort/impact matrix.

8 stars

Best use case

Tech Debt Auditor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Identifies and prioritizes technical debt in a codebase with an effort/impact matrix.

Teams using Tech Debt Auditor should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/tech-debt-auditor/SKILL.md --create-dirs "https://raw.githubusercontent.com/Notysoty/openagentskills/main/skills/tech-debt-auditor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/tech-debt-auditor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Tech Debt Auditor Compares

Feature / AgentTech Debt AuditorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Identifies and prioritizes technical debt in a codebase with an effort/impact matrix.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Tech Debt Auditor

## What this skill does

This skill directs the agent to systematically scan a codebase for technical debt, categorize every item by type, and then rank each item against an effort/impact matrix so you can prioritize what to tackle first. It distinguishes between cosmetic debt (naming, formatting), structural debt (tangled dependencies, god classes), and strategic debt (shortcuts taken deliberately). The output is a prioritized backlog, not just a complaint list.

Use this when you're planning a refactoring sprint, preparing for a new feature that will touch old code, or doing a code quality review before onboarding new engineers.

## How to use

### Claude Code / Cline

Copy this file to `.agents/skills/tech-debt-auditor/SKILL.md` in your project root.

Then ask:
- *"Use the Tech Debt Auditor skill on the `src/payments/` directory."*
- *"Run a full tech debt audit on this repository using the Tech Debt Auditor skill."*

Point to a specific directory, a single file, or ask for a whole-repo scan. For large repos, start with the highest-churn directories.

### Cursor

Add the instructions below to your `.cursorrules` or paste them into the Cursor AI pane before pointing to the code you want audited.

### Codex

Paste the file or directory listing into the chat along with the instructions from the section below. For large codebases, provide the directory tree and the agent will ask for specific files it needs to inspect.

## The Prompt / Instructions for the Agent

When asked to audit for technical debt, follow this process precisely:

### Phase 1 — Scan and catalogue

Read the target files thoroughly. For each file, look for:

**Structural debt**
- God classes or modules (a single file doing too many unrelated things)
- Circular dependencies between modules
- Deeply nested conditionals (more than 3 levels)
- Functions longer than 50 lines
- Duplicated logic across multiple files
- Hard-coded configuration values that should be environment variables

**Dependency debt**
- Outdated packages with known issues or major version gaps
- Direct use of deprecated APIs
- Tightly coupled modules with no abstraction layer

**Test debt**
- Files or functions with no test coverage
- Tests that are testing implementation rather than behavior
- Commented-out test blocks
- Missing integration tests for critical paths

**Documentation debt**
- Public functions/classes with no docstring or JSDoc
- Outdated comments that describe behavior that no longer matches the code
- Missing README or architecture notes for non-obvious modules

**Cosmetic debt**
- Inconsistent naming conventions within the same file
- Unused imports or dead code
- Magic numbers and unexplained string literals

### Phase 2 — Score each item

For every debt item found, assign:

- **Impact** (1–3): How much does this hurt? 1 = minor annoyance, 2 = slows feature work or causes occasional bugs, 3 = blocks features, causes real bugs, or creates security/correctness risk
- **Effort** (1–3): How much work to fix? 1 = under an hour, 2 = half a day to a day, 3 = multi-day or requires coordination

### Phase 3 — Build the priority matrix

Categorize each item:

- **Do First** — High impact (3), Low effort (1 or 2): quick wins
- **Plan In** — High impact (3), High effort (3): schedule these as dedicated work items
- **Nice to Have** — Low impact (1 or 2), Low effort (1): fix when passing by
- **Deprioritize** — Low impact (1 or 2), High effort (3): probably not worth it

### Phase 4 — Output

Format the output as follows:

```markdown
## Tech Debt Audit — [Target]

### Summary
- Total items found: N
- Do First: N items
- Plan In: N items
- Nice to Have: N items
- Deprioritize: N items

### Do First (High Impact, Low Effort)

| # | File | Debt Type | Description | Impact | Effort |
|---|------|-----------|-------------|--------|--------|
| 1 | `src/foo.ts` | Structural | Function `processOrder` is 120 lines and handles 4 unrelated concerns | 3 | 1 |

### Plan In (High Impact, High Effort)

[Same table format]

### Nice to Have

[Same table format]

### Deprioritize

[Same table format]

### Recommended Starting Point
[2–3 sentences explaining which item(s) to tackle first and why, including any dependencies between items]
```

Do not suggest fixes in detail — this is an audit, not a refactor plan. If the user wants a fix plan for a specific item, they should use the Refactor Planner skill.

## Example

**Input to Agent:**
> "Use the Tech Debt Auditor skill on `src/billing/`."

**Output from Agent:**

> ## Tech Debt Audit — `src/billing/`
>
> ### Summary
> - Total items found: 9
> - Do First: 3 items
> - Plan In: 2 items
> - Nice to Have: 3 items
> - Deprioritize: 1 item
>
> ### Do First (High Impact, Low Effort)
>
> | # | File | Debt Type | Description | Impact | Effort |
> |---|------|-----------|-------------|--------|--------|
> | 1 | `invoiceService.ts` | Structural | Stripe API key hardcoded on line 12 instead of read from env | 3 | 1 |
> | 2 | `invoiceService.ts` | Test | `generateInvoice()` has zero test coverage — it's the most critical billing path | 3 | 2 |
> | 3 | `utils/format.ts` | Documentation | 6 exported functions have no JSDoc; used across 11 files | 2 | 1 |
>
> ### Plan In (High Impact, High Effort)
>
> | # | File | Debt Type | Description | Impact | Effort |
> |---|------|-----------|-------------|--------|--------|
> | 4 | `billingController.ts` | Structural | 280-line god class handles HTTP parsing, business logic, and DB writes with no separation | 3 | 3 |
> | 5 | `billingController.ts` | Dependency | Directly imports `db` connection instead of going through a repository layer, making testing impossible | 3 | 3 |
>
> ### Recommended Starting Point
> Fix the hardcoded API key immediately (item 1) — it's a security issue, not just tech debt. Then add tests for `generateInvoice()` (item 2) before touching anything else, so you have a safety net when splitting the god class (item 4).

## Notes

- For monorepos, run the audit directory by directory so the output stays focused.
- Items that appear in multiple categories (e.g., a god class that also has no tests) should be listed once under the highest-impact category.
- This skill produces an audit list, not code changes. Use the Refactor Planner skill to turn individual items into step-by-step fix plans.

Related Skills

Technical Blog Post Writer

8
from Notysoty/openagentskills

Writes engaging, accurate technical blog posts targeted at developer audiences.

Prompt Injection Defense Auditor

8
from Notysoty/openagentskills

Reviews LLM application prompts and input handling for direct and indirect prompt injection vulnerabilities, then writes defensive scaffolding.

Unit Test Writer

8
from Notysoty/openagentskills

Generates comprehensive unit tests for any function or module with edge cases.

Unit Test Improver

8
from Notysoty/openagentskills

Reviews existing unit tests for gaps, weak assertions, and missing edge cases, then rewrites them to be more robust.

Troubleshooting Guide Builder

8
from Notysoty/openagentskills

Builds a structured troubleshooting guide with symptom → cause → fix format for any tool or system.

Stack Trace Analyzer

8
from Notysoty/openagentskills

Interprets error stack traces to pinpoint root cause, explain what went wrong, and suggest fixes.

SQL Query Optimizer

8
from Notysoty/openagentskills

Reviews SQL queries for performance issues and rewrites them with optimized execution plans.

Sprint Summary Generator

8
from Notysoty/openagentskills

Converts a list of completed tickets or commits into a clear sprint summary for stakeholders.

Social Post Thread Writer

8
from Notysoty/openagentskills

Converts a blog post, idea, or document into an engaging Twitter/X or LinkedIn thread with hooks and CTAs.

SEO Metadata Generator

8
from Notysoty/openagentskills

Generates optimized title tags, meta descriptions, Open Graph tags, and structured data for any web page.

SEO Content Optimizer

8
from Notysoty/openagentskills

Analyzes and rewrites content to maximize search engine visibility without sounding robotic.

SDK Quickstart Writer

8
from Notysoty/openagentskills

Generates a concise, copy-paste-ready quickstart guide for any SDK or library.