tech-debt-scorer

Scores methods and constructors for tech debt signals and routes high-debt items to cleanup story generation.

Updated May 2, 2024
One-click install
npx skills add https://github.com/cman131/EatSomethingSourWhenYoureTired --skill tech-debt-scorer-cman131
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tech-debt-scorer
Source: https://github.com/cman131/EatSomethingSourWhenYoureTired/tree/main/.claude/skills/tech-debt-scorer
Command: npx skills add https://github.com/cman131/EatSomethingSourWhenYoureTired --skill tech-debt-scorer-cman131

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate tech debt that slows development and increases regression risk, but teams lack a systematic way to detect, quantify, and prioritize cleanup work before building on fragile code. ## Core Features & Use Cases - Method-Level Debt Scoring: Scores individual methods and constructors using weighted signals like long methods, deep nesting, duplicated logic, and constructor dependency counts, reporting only the top 3 findings. - Flexible Suppression: Supports inline ignore comments, a persistent .claude/tech-debt-ignore.json file, and scan-time skips so known debt stays visible without blocking workflows. - Cleanup Story Routing: Generates structured STORY_REQUEST payloads for the story-author agent when scores exceed thresholds, turning findings into actionable cleanup stories. - Use Case: During a plan critique, scan the methods a plan will modify; if a method scores 12+, route it to story-author for a cleanup story before building new features on top of it. ## Quick Start Ask the AI to run a tech debt scan on a specific file, such as scanning src/services/OrderService.ts to score its methods and constructor.

Frequently Asked Questions about tech-debt-scorer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan a file for tech debt?▼

Run the on-demand scan command with a file path, such as /tech-debt scan src/BusinessLogic/OrderService.ts, to score the constructor and all public methods. Append :MethodName to score only a single method.

What tech debt signals does the scan detect?▼

The scan detects long methods, deep nesting over 4 levels, duplicated logic, TODO/FIXME density, excessive constructor dependencies, long files, god class indicators, missing test coverage, and high churn combined with high complexity.

How do I suppress or ignore tech debt findings?▼

Add an inline comment like // tech-debt-ignore: file-length with a justification, create a .claude/tech-debt-ignore.json file listing ignored files, folders, or signals, or pass --skip-debt to skip the scan entirely.

What happens when a method scores high on tech debt?▼

Scores of 12 or higher are routed to the story-author agent, which receives a structured STORY_REQUEST payload and generates a cleanup story in .claude/stories/. Scores of 8-11 recommend a cleanup unit in the plan.

Does the tech debt scan work on all file types?▼

The scan filters to .ts, .tsx, and .js files under src/ only. Auto-generated files and build-output directories like dist/ and node_modules/ are excluded from scanning.

Why does the report only show 3 tech debt items?▼

The skill caps output at the top 3 highest-scoring methods or constructors to keep findings actionable and avoid overwhelming the user. Method-level issues take priority over class-level issues when filling those slots.