codebase-cleanup-tech-debt

Analyze codebases to identify, quantify, and prioritize technical debt with remediation plans.

2|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/monang404/lunawave --skill codebase-cleanup-tech-debt-monang404
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-cleanup-tech-debt
Source: https://github.com/monang404/lunawave/tree/main/.agent/skills/codebase-cleanup-tech-debt
Command: npx skills add https://github.com/monang404/lunawave --skill codebase-cleanup-tech-debt-monang404

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Software projects accumulate technical debt that slows development, increases bugs, and raises maintenance costs, but teams often lack a structured way to measure it and justify remediation investment. ## Core Features & Use Cases - Debt Inventory: Scans for code, architecture, testing, documentation, and infrastructure debt with quantified metrics like cyclomatic complexity, duplication percentage, and coverage gaps. - Impact & ROI Analysis: Calculates the real cost of each debt item in hours and dollars, then builds a prioritized remediation roadmap with quick wins, medium-term improvements, and long-term initiatives. - Prevention Strategy: Defines automated quality gates, debt budgets, and code review standards to stop new debt from accumulating. - Use Case: Ask for a technical debt audit of a legacy service and receive a categorized debt inventory, a metrics dashboard, an ROI-ranked refactoring plan, and stakeholder-ready executive summaries. ## Quick Start Analyze this codebase for technical debt and produce a prioritized remediation plan with ROI estimates.

Frequently Asked Questions about codebase-cleanup-tech-debt

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

FAQPage Schema
How do I identify technical debt in a codebase?▼

Scan for duplicated code, high cyclomatic complexity above 10, god classes over 500 lines, circular dependencies, outdated dependencies, and test coverage gaps. Quantify each finding with metrics like duplication percentage, complexity scores, and untested critical paths.

How to prioritize technical debt remediation?▼

Calculate the cost of each debt item in hours lost per month, then rank by ROI. Start with quick wins that are high value and low effort, schedule medium-term refactors over one to three months, and plan architectural initiatives quarterly.

What metrics measure technical debt?▼

Common metrics include cyclomatic complexity, code duplication percentage, unit and integration test coverage, outdated dependency counts, security vulnerabilities, and deployment failure rates. Track these over time to measure debt growth or reduction trends.

How do I prevent new technical debt from accumulating?▼

Enforce automated quality gates such as pre-commit complexity checks, minimum coverage thresholds for new code, and CI dependency audits. Combine these with a debt budget that caps monthly debt growth and mandates quarterly reduction targets.

When should I refactor a god class?▼

Refactor when a class exceeds roughly 500 lines or 20 methods and changes frequently. Split it into focused services behind clear interfaces, add tests first, and use a facade or feature flags to migrate callers incrementally without breaking behavior.