codebase-cleanup-tech-debt

Identify technical debt from actual code and change history, estimate its impact, and prioritize bounded improvements with explicit assumptions.

By sickn33 · 511 installs

npx skills add sickn33/agentic-awesome-skills --skill codebase-cleanup-tech-debt

Source repository · Upstream listing

Compatibility and maintenance Compatibility alias of code refactoring tech debt ; use that ID for new references when no existing contract requires this one. The full instructions and support files remain local so existing installations continue to work offline. This is one shared procedure, not an additional capability. Preserve the callable ID when an existing manifest or client configuration uses it. Modified in AAS on 2026 09 05; original metadata and license notices are retained. Technical Debt Analysis and Remediation You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create actionable remediation plans. Use this skill when Working on technical debt analysis and remediation tasks or workflows Needing guidance, best practices, or checklists for technical debt analysis and remediation Do not use this skill when The task is unrelated to technical debt analysis and remediation You need a different domain or tool outside this scope Context The user needs a comprehensive technical debt analysis to understand what's slowing down development, increasing bugs, and creating maintenance challenges. Focus on practical, measurable improvements with clear ROI. Requirements Inspect the current repository, hotspots and real change/incident history. The numbers, thresholds, staffing and timelines below are hypothetical planning examples, not measurements, promised returns or mandatory quality gates. Report missing cost/usage inputs as unknown; never fill them with fabricated telemetry. Review only scope does not authorize broad refactors, policy changes or deployment. Instructions 1. Technical Debt Inventory Conduct a thorough scan for all types of technical debt: Code Debt Duplicated Code Exact duplicates (copy paste) Similar logic patterns Repeated business rules Quantify: Lines duplicated, locations Complex Code High cyclomatic complexity ( 10) Deeply nested conditionals ( 3 levels) Long methods ( 50 lines) God classes ( 500 lines, 20 methods) Quantify: Complexity scores, hotspots Poor Structure Circular dependencies Inappropriate intimacy between classes Feature envy (methods using other class data) Shotgun surgery patterns Quantify: Coupling metrics, change frequency Architecture Debt Design Flaws Missing abstractions Leaky abstractions Violated architectural boundaries Monolithic components Quantify: Component size, dependency violations Technology Debt Outdated frameworks/libraries Deprecated API usage Legacy patterns (e.g., callbacks vs promises) Unsupported dependencies Quantify: Version lag, security vulnerabilities Testing Debt Coverage Gaps Untested code paths Missing edge cases No integration tests Lack of performance tests Quantify: Coverage %, critical paths untested Test Quality Brittle tests (environment dependent) Slow test suites Flaky tests No test documentation Quantify: Test runtime, failure rate Documentation Debt Missing Documentation No API documentation Undocumented complex logic Missing architecture diagrams No onboarding guides Quantify: Undocumented public APIs Infrastructure Debt Deployment Issues Manual deployment steps No rollback procedures Missing monitoring No performance baselines Quantify: Deployment time, failure rate 2. Impact Assessment Calculate the real cost of each debt item: Development Velocity Impact Quality Impact Risk Assessment Critical : Security vulnerabilities, data loss risk High : Performance degradation, frequent outages Medium : Developer frustration, slow feature delivery Low : Code style issues, minor inefficiencies 3. Debt Metrics Dashboard Create measurable KPIs: Code Quality Metrics Trend Analysis 4. Prioritized Remediation Plan Create an actionable roadmap based on ROI: Quick Wins (High Value, Low Effort) Week 1 2: Medium Term Improvements (Month 1 3) Long Term Initiatives (Quarter 2 4) 5. Implementation Strategy Incremental Refactoring Team Allocation 6. Prevention Strategy Implement gates to prevent new debt: Automated Quality Gates Debt Budget 7. Communication Plan Stakeholder Reports Developer Documentation 8. Success Metrics Track progress with clear KPIs: Monthly Metrics Debt score reduction: Target 5% New bug rate: Target 20% Deployment frequency: Target +50% Lead time: Target 30% Test coverage: Target +10% Quarterly Reviews Architecture health score Developer satisfaction survey Performance benchmarks Security audit results Cost savings achieved Output Format 1. Debt Inventory : Comprehensive list categorized by type with metrics 2. Impact Analysis : Cost calculations and risk assessments 3. Prioritized Roadmap : Quarter by quarter plan with clear deliverables 4. Quick Wins : Immediate actions for this sprint 5. Implementation Guide : Step by step refactoring strategies 6. Prevention Plan : Processes to avoid accumulating new debt 7. ROI Projections : Expected returns on debt reduction investment Focus on delivering measurable improvements that directly impact development velocity, system reliability, and team morale. Limitations Use this skill only when the task clearly matches the scope described above. Do not treat the output as a substitute for environment specific validation, testing, or expert review. Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.