codebase-cleanup-tech-debt

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

1|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend --skill codebase-cleanup-tech-debt-hamzaoui-louai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-cleanup-tech-debt
Source: https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend/tree/main/.opencode/skills/codebase-cleanup-tech-debt
Command: npx skills add https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend --skill codebase-cleanup-tech-debt-hamzaoui-louai

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 duplication, high cyclomatic complexity, architecture flaws, testing gaps, documentation gaps, and outdated dependencies with quantified metrics. - Impact & ROI Analysis: Calculates the real cost of each debt item in hours and dollars, with risk ratings from critical to low. - Prioritized Remediation Roadmap: Produces quick wins, medium-term improvements, and long-term initiatives with effort estimates and ROI projections, plus prevention gates like CI checks and debt budgets. - Use Case: Point the skill at a legacy service and receive a debt metrics dashboard, a quarter-by-quarter refactoring plan, and an executive summary showing expected return on a 500-hour investment. ## 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, cyclomatic complexity above 10, methods over 50 lines, god classes, circular dependencies, outdated dependencies, and test coverage gaps. Quantify each finding with metrics like duplication percentage, complexity scores, and coverage numbers.

How to prioritize technical debt remediation?

Calculate the cost of each debt item in hours per month multiplied by developer rate, then rank by ROI. Start with quick wins that are high value and low effort, then schedule medium-term refactors and long-term architectural initiatives.

What metrics should a technical debt dashboard track?

Track cyclomatic complexity, code duplication percentage, unit/integration/e2e test coverage, outdated dependency counts, and security vulnerabilities. Monitor trends quarterly to measure whether debt is growing or shrinking.

How do I refactor legacy code without breaking production?

Use incremental refactoring: add a facade over legacy code, build the new service alongside it, and migrate gradually behind feature flags. Always write tests before refactoring and maintain backward compatibility.

How can teams prevent new technical debt from accumulating?

Enforce automated quality gates such as pre-commit complexity and duplication checks, CI dependency audits, and mandatory test coverage for new code. Set a debt budget limiting monthly growth and requiring quarterly reduction targets.