Tech Debt Auditor
Skill9 starsChanged 8 months agoMITView on GitHub
Identifies and prioritizes technical debt in a codebase with an effort/impact matrix.
In this repository61 other files it gives its agents.
- Accessibility Audit HelperSkill
- Agent Context File WriterSkill
- Agent Evaluation Framework BuilderSkill
- AI Feature Spec WriterSkill
- API Documentation GeneratorSkill
- REST API Endpoint DesignerSkill
- Architecture ExplainerSkill
- Article RepurposerSkill
- Auth Flow PlannerSkill
- Blog Outline GeneratorSkill
- Breaking Change DetectorSkill
- Bug Root Cause AnalyzerSkill
- Caching Strategy AdvisorSkill
- Changelog CuratorSkill
- Code Review ChecklistSkill
- Database Schema ReviewerSkill
- Docker Compose GeneratorSkill
- Documentation Gap FinderSkill
- Edge Case DiscoverySkill
- Error Log SummarizerSkill
- FAQ GeneratorSkill
- Flaky Test AnalyzerSkill
- Form UX OptimizerSkill
- Git Commit WriterSkill
- Hallucination Risk ReviewerSkill
- Hybrid Search ArchitectSkill
- Incident Postmortem WriterSkill
- Issue to PR PlannerSkill
- Landing Page Copy ImproverSkill
- LangGraph State Machine DesignerSkill
- LLM Cost OptimizerSkill
- LLM Tracing and Observability SetupSkill
- MCP Integration AssistantSkill
- MCP Server BuilderSkill
- Migration Guide WriterSkill
- Newsletter Summary WriterSkill
- Observability ChecklistSkill
- Playwright Test BuilderSkill
- PR Description WriterSkill
- Prompt Injection Defense AuditorSkill
- Prompt RefinerSkill
- Prompt Version Control WorkflowSkill
- RAG Chunking Strategy AdvisorSkill
- RAG Workflow PlannerSkill
- React Component ReviewerSkill
- README WriterSkill
- Refactor PlannerSkill
- Release Notes GeneratorSkill
- Responsive Layout ReviewerSkill
- SDK Quickstart WriterSkill
- SEO Content OptimizerSkill
- SEO Metadata GeneratorSkill
- Social Post Thread WriterSkill
- Sprint Summary GeneratorSkill
- SQL Query OptimizerSkill
- Stack Trace AnalyzerSkill
- Technical Blog Post WriterSkill
- Troubleshooting Guide BuilderSkill
- Unit Test ImproverSkill
- Unit Test WriterSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
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 …
- Very specific: line 35
Add the instructions below to your .cursorrules or paste them into the Cursor AI pane before pointing to the code you want audited.
- Distinctive: line 43
When asked to audit for technical debt, follow this process precisely:
- Distinctive: line 47
Read the target files thoroughly.
- Distinctive: line 130
Do not suggest fixes in detail — this is an audit, not a refactor plan.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
## 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.tsStructural Stripe API key hardcoded on line 12 instead of read from env 3 1 2 invoiceService.tsTest generateInvoice()has zero test coverage — it's the most critical billing path3 2 3 utils/format.tsDocumentation 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.tsStructural 280-line god class handles HTTP parsing, business logic, and DB writes with no separation 3 3 5 billingController.tsDependency Directly imports dbconnection instead of going through a repository layer, making testing impossible3 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

