Tech debt tracker

From borghei/Claude-Skills · View interactive version

Tech debt tracker is an AI agent skill from the GitHub repository borghei/Claude-Skills. Scan codebases for technical debt with AST parsing, prioritize by impact, and generate trend dashboards. Use when tracking tech debt, prioritizing refactoring, calculating cost-of- delay, planning sprint debt, or reporting debt to execs.

How to use this skill

Skill file

Tech Debt Tracker

The agent identifies, scores, prioritizes, and tracks technical debt across codebases using AST parsing, cost-of-delay analysis, and trend dashboards.

Core Capabilities

When to Use

Clarify First

Before scanning or reporting, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Tools

| Tool | Purpose | Command |

|------|---------|---------|

| debt_scanner.py | Scan a directory for debt signals; output JSON inventory + text report | python scripts/debt_scanner.py <dir> --output scan_results --format both |

| debt_prioritizer.py | Enrich inventory with cost-of-delay/WSJF/RICE and sprint allocation | python scripts/debt_prioritizer.py scan_results.json --framework wsjf --team-size 8 |

| debt_dashboard.py | Trend analysis, velocity, forecasts, and exec summary across snapshots | python scripts/debt_dashboard.py --input-dir ./debt_scans/ --period quarterly |

Runnable on the bundled samples:

python scripts/debt_scanner.py assets/sample_codebase --format text
python scripts/debt_prioritizer.py assets/sample_debt_inventory.json --framework cost_of_delay
python scripts/debt_dashboard.py assets/historical_debt_2024-01-15.json assets/historical_debt_2024-02-01.json

The scanner reports each duplicated region once (overlapping windows are merged and

repetitive runs inside one file are ignored), so the 986-line sample yields about 60 items.

Health score is 100 - severity-weighted items per 1,000 lines (critical 5, high 3, medium 1,

low 0.5), so it compares codebases of different sizes. Exit codes: 0 ok; 2 bad input

(missing directory or file, unreadable inventory).

References

Load the reference that matches the task — keep this file lean and pull detail on demand:

Scope & Limitations

This skill covers:

This skill does NOT cover:

Integration Points

| Skill | Use for |

|-------|---------|

| engineering/dependency-auditor | CVE and outdated-dependency findings to merge into the inventory |

| engineering/ci-cd-pipeline-builder | Gate builds on summary.health_score or new critical items |

Anti-Patterns

Counting Items Instead of Interest

Mistake: Reporting "we have 412 debt items" and prioritising by count per module.

Why it happens: Counts are what scanners produce.

Instead: Rank by interest: debt in code touched every sprint costs far more than debt in a file nobody opens. Weight by change frequency (for example git log --since=6.months --name-only).

A Debt Sprint Every Quarter

Mistake: Saving all debt work for a dedicated cleanup sprint.

Why it happens: It is easy to negotiate once.

Instead: Reserve a fixed share of every sprint (the prioritizer's allocation) and fix debt where feature work already touches the code.

Dashboards Without a Decision

Mistake: Sending executives a health trend with no ask.

Why it happens: The dashboard looks like the deliverable.

Instead: Lead with the decision: what to fund, what it unblocks, and what happens to delivery speed if nothing changes.

Files

| File | Purpose |

|------|---------|

| scripts/debt_scanner.py | Codebase scan to a debt inventory with health score |

| scripts/debt_prioritizer.py | Cost-of-delay, WSJF or RICE ranking and sprint allocation |

| scripts/debt_dashboard.py | Trends, velocity and forecasts across snapshots |

| assets/sample_codebase/ | Three-file codebase with planted debt |

| assets/sample_debt_inventory.json, historical_debt_*.json | Inventory and snapshots for the prioritizer and dashboard |

| expected_outputs/*.json | Reference outputs for the samples |

| references/*.md | Methodology, tool reference, dashboards, taxonomy, prioritization, communication templates, quadrant and roadmap |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.