From agents
Systematic tech debt inventory with complexity analysis, dead code detection, and remediation planning. Track debt over time. NOT for code review (honest-review) or refactoring.
npx claudepluginhub wyattowalsh/agents --plugin agentsThis skill uses the workspace's default tool permissions.
Systematic technical debt inventory, prioritization, and remediation planning.
evals/explicit-scan.jsonevals/implicit-trigger.jsonevals/negative-control.jsonevals/prioritize-mode.jsonevals/roadmap-mode.jsonevals/track-mode.jsonreferences/complexity-metrics.mdreferences/debt-taxonomy.mdreferences/prioritization-framework.mdreferences/remediation-templates.mdscripts/complexity-scanner.pyscripts/dead-code-detector.pyscripts/dependency-staleness-checker.pyscripts/pattern-consistency-checker.pytemplates/dashboard.htmlCreates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Systematic technical debt inventory, prioritization, and remediation planning. Multi-pass analysis with confidence scoring and evidence-based findings.
Scope: Debt inventory and tracking only. NOT for code review (honest-review), refactoring execution, or dependency updates.
| Term | Definition |
|---|---|
| debt item | A discrete tech debt finding with category, severity, confidence, and evidence |
| category | Debt classification: design, test, documentation, dependency, infrastructure |
| severity | Impact level: CRITICAL, HIGH, MEDIUM, LOW |
| confidence | Score 0.0-1.0 per item; >=0.7 report, 0.3-0.7 flag, <0.3 discard |
| complexity | Cyclomatic (decision paths) or cognitive (human comprehension difficulty) |
| dead code | Functions, classes, or imports with no references in the codebase |
| staleness | Days since a dependency's current version was superseded |
| inconsistency | Same pattern implemented differently across files |
| remediation | Specific fix action with effort estimate and risk level |
| debt score | Aggregate metric: sum of (severity_weight x confidence) across all items |
| baseline | Previous scan stored at ~/.{gemini |
| heatmap | Visual density of debt items per file or directory |
| risk x effort | Prioritization matrix: impact vs. remediation cost |
| $ARGUMENTS | Mode |
|---|---|
scan or scan <path> | Full codebase debt inventory (or scoped to path) |
analyze <file/dir> | Targeted deep analysis of specific file or directory |
prioritize | Rank all debt items by risk x effort matrix |
roadmap | Generate phased remediation plan |
report | Render dashboard visualization |
track | Compare current scan against previous baseline |
| Empty | Show mode menu with descriptions and examples |
Full codebase debt inventory. Run all 4 analysis scripts, aggregate results, assign categories and severities.
Run uv run python skills/tech-debt-analyzer/scripts/complexity-scanner.py <path> to get complexity metrics.
Parse JSON output. Flag functions with cyclomatic_complexity > 10 as HIGH, > 5 as MEDIUM.
Run uv run python skills/tech-debt-analyzer/scripts/dead-code-detector.py <path> to find unused code.
Parse JSON output. Each unused item becomes a debt item (category: design, severity by confidence).
Run uv run python skills/tech-debt-analyzer/scripts/dependency-staleness-checker.py <path> to check outdated packages.
Parse JSON output. Deprecated packages are CRITICAL. Staleness > 365 days is HIGH.
Run uv run python skills/tech-debt-analyzer/scripts/pattern-consistency-checker.py <path> to detect inconsistencies.
Parse JSON output. Each inconsistency becomes a debt item (category: design).
After script-based detection, perform additional analysis:
Assign confidence scores (0.0-1.0) per finding. Research-validate HIGH/CRITICAL items using Grep and codebase evidence.
Merge all findings into a unified inventory:
~/.{gemini|copilot|codex|claude}/tech-debt/<project-slug>-<date>.jsonPresent findings grouped by category, sorted by severity within each group.
Targeted deep analysis of a specific file or directory. Run all 4 scripts scoped to the target. Apply the same 6-step scan process but with deeper per-function analysis. Include: function-level complexity breakdown, inline dead code, local pattern violations.
Rank debt items using risk x effort matrix. Load references/prioritization-framework.md.
| Low Effort | Medium Effort | High Effort | |
|---|---|---|---|
| High Risk | P0: Fix immediately | P1: Schedule next sprint | P2: Plan for next quarter |
| Medium Risk | P1: Schedule next sprint | P2: Plan for next quarter | P3: Backlog |
| Low Risk | P2: Quick wins batch | P3: Backlog | P4: Accept or defer |
For each debt item, estimate:
Output a ranked list with priority labels (P0-P4).
Generate a phased remediation plan. Requires a prior scan (reads baseline from ~/.{gemini|copilot|codex|claude}/tech-debt/).
Phase structure:
Each phase includes: items, estimated effort, dependencies, success criteria.
Render dashboard visualization. Requires a prior scan.
~/.{gemini|copilot|codex|claude}/tech-debt/templates/dashboard.html to a temporary file<script id="data"> tagDashboard sections: category pie chart, complexity heatmap, trend chart (if multiple baselines), prioritized backlog table.
Compare current scan against previous baseline for longitudinal tracking.
~/.{gemini|copilot|codex|claude}/tech-debt/<project-slug>-*.json (most recent)~/.{gemini|copilot|codex|claude}/tech-debt/mkdir -p<project-slug>-<YYYY-MM-DD>.json{ "project": str, "date": str, "score": float, "items": [...], "summary": {...} }Load ONE reference at a time. Do not preload all references into context.
| File | Content | Read When |
|---|---|---|
references/debt-taxonomy.md | 5 debt categories with subcategories and remediation templates | Scan Step 6, classifying findings |
references/complexity-metrics.md | Cyclomatic and cognitive complexity definitions, thresholds, interpretation | Interpreting complexity-scanner output |
references/prioritization-framework.md | Risk x effort matrix, scoring rubric, priority definitions | Prioritize mode |
references/remediation-templates.md | Fix patterns by issue type, effort estimates, risk ratings | Roadmap mode, generating fix plans |
| Script | When to Run |
|---|---|
scripts/complexity-scanner.py | Scan Steps 1, Analyze mode |
scripts/dead-code-detector.py | Scan Step 2, Analyze mode |
scripts/dependency-staleness-checker.py | Scan Step 3 |
scripts/pattern-consistency-checker.py | Scan Step 4, Analyze mode |
| Template | When to Render |
|---|---|
templates/dashboard.html | Report mode — inject findings JSON into data tag |
Every debt item follows this format:
[file:line] or [file:start-end] — exact source location