Home
cd ../playbooks
Developer ToolsIntermediate

Tech Debt Analyzer

Identify, analyze, document, and track technical debt in JavaScript/TypeScript codebases with automated detection and prioritized remediation plans.

10 minutes
By AI LabsSource
#tech-debt#code-quality#refactoring#javascript#typescript#maintenance

Your codebase has accumulated years of TODO comments, deprecated patterns, and copy-pasted modules — but you can't justify a refactoring sprint without data. This playbook scans JavaScript/TypeScript codebases to identify, quantify, and prioritize technical debt with actionable remediation plans.

Who it's for: engineering managers building data-driven cases for tech debt remediation sprints, tech leads identifying the highest-impact refactoring targets in legacy codebases, frontend developers tracking code quality degradation across React and Node projects, CTOs presenting technical debt reports to stakeholders with business impact estimates, senior engineers creating systematic debt reduction roadmaps for their teams

Example

"Analyze tech debt in our React/Node codebase and prioritize fixes" → Tech debt pipeline: automated codebase scan for deprecated APIs, duplicated code, and complexity hotspots, debt categorization (architecture, code quality, dependency, testing), severity and effort scoring for each debt item, prioritized remediation plan ranked by impact-to-effort ratio, and tracking dashboard showing debt reduction progress over sprints

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

Or install from your terminal:
npx ccplaybooks add tech-debt-analyzer
# Technical Debt Analyzer

## Your Role
You are my technical debt specialist. Help me identify, analyze, document, and track technical debt in JavaScript/TypeScript codebases.

## Analysis Workflow

### Step 1: Automated Code Analysis
Detect code smells and issues:

**Code Quality Indicators**
- Large files (>500 lines)

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

Systematically identify and track technical debt in JavaScript/TypeScript projects. Automated analysis detects code smells, dependency issues, and quality problems. Get prioritized remediation plans and documentation templates.


Quick Start

Step 1: Navigate to Your Project

cd ~/your-js-project

Step 2: Download the Template

Click Download above, then:

mv ~/Downloads/CLAUDE.md ./

Step 3: Analyze Your Codebase

claude

Then ask: "Analyze this codebase for technical debt"


What Gets Detected

Automated Analysis

Category Indicators
Code Quality Large files (>500 lines), complex functions
Debt Markers TODO, FIXME, HACK comments
Bad Practices Console statements, weak typing
Complexity Deep nesting (>4 levels), long params

Manual Review Areas

Category Focus
Architecture Design patterns, coupling
Testing Coverage gaps, flaky tests
Documentation Outdated docs, missing examples
Dependencies Outdated packages, vulnerabilities

Severity Levels

Level Action Examples
Critical Fix immediately Security issues, broken builds
High Current/next sprint Major blockers
Medium Plan quarterly Refactoring needs
Low Opportunistic Nice-to-haves

Example Prompts

  • "Scan for technical debt in this project"
  • "Find all TODO and FIXME comments"
  • "Analyze dependency health"
  • "Create a tech debt remediation plan"
  • "Generate a tech debt register"

Nine Debt Categories

  1. Code Quality: Complexity, readability
  2. Architectural: Design issues, coupling
  3. Test Debt: Coverage, reliability
  4. Documentation: Outdated, missing
  5. Dependency: Outdated, vulnerable
  6. Performance: Slow code paths
  7. Security: Vulnerabilities
  8. Infrastructure: CI/CD, deployment
  9. Design: API, interface issues

Recommended Capacity

20% of sprint capacity for tech debt maintenance.


Maintenance Schedule

Frequency Activity
Weekly Review TODO/FIXME comments
Monthly Dependency updates
Quarterly Full codebase analysis

Tips

  • Track everything: Use a debt register
  • Prioritize ruthlessly: Not all debt needs fixing
  • Automate detection: Integrate into CI/CD
  • Document decisions: Use ADRs for context

$Related Playbooks

Developer Tools

Test Specialist

Comprehensive JavaScript/TypeScript testing guidance with test writing, bug analysis, coverage analysis, and proactive issue detection.

10 minutes
Intermediate
Developer Tools

Accessibility Engineering for Components

Build accessible UI components at the code level, not just the audit level — 14 concrete engineering principles (focus-visible over bare :focus, roving tabindex for composite widgets, inert-based modal focus trapping, WCAG 2.5.8 hit-area minimums), a common-mistakes table with fixes, and a severity-rated review format ending in a hard Block/Needs-changes/Approve verdict.

5 minutes
Intermediate
Developer Tools

Adversary Emulation: MuddyWater

An intelligence-grounded, authorized purple-team emulation profile for MuddyWater (MITRE ATT&CK G0069), Iran's MOIS-linked cyber-espionage group — attribution, targeting, representative TTPs by ATT&CK tactic, emulation guidance mapped to generic red-team tooling, and paired detection/defense recommendations for every offensive technique, all under an explicit authorized-use caveat.

15 minutes
Advanced
Developer Tools

Adversary Emulation: Turla

An intelligence-grounded, authorized purple-team emulation profile for Turla (MITRE ATT&CK G0010), Russia's FSB-linked espionage group — attribution, distinctive TTPs (satellite C2 hijacking, steganographic email backdoors, parasitizing rival APT infrastructure), emulation guidance mapped to generic red-team tooling, and paired detection recommendations, under an explicit authorized-use and lab-only caveat for rootkit techniques.

15 minutes
Advanced
Developer Tools

AI Agent Red Team Methodology

A first-principles methodology for authorized red-team exercises against AI products, agents, MCP servers, skills, and repositories — capability and trust-boundary modeling, AI-specific attack hypothesis families (prompt injection, tool misuse, data leakage, SSRF), harmless-proof testing with canaries, one-variable-at-a-time adaptive iteration, and business-language evidence-based reporting.

10 minutes
Advanced
Developer Tools

Better Web Typography

Web typography engineering as a review discipline, not a style guide — CSS properties over raw variable-font tags, a semantic type scale with descending heading sizes, deliberate text-wrap usage (balance vs. pretty), tabular numbers for changing values, mobile input zoom fixes, and a severity-rated review report format with a concrete common-mistakes table.

5 minutes
Intermediate
Developer Tools

Agent DX CLI Scale

A 7-axis, 0-21 scoring scale for evaluating how well a CLI is designed for AI agents rather than humans — machine-readable output, raw payload input, schema introspection, context-window discipline, input hardening, safety rails, and agent knowledge packaging.

5 minutes
Intermediate
Developer Tools

Agent Design Philosophy

A mental model for designing AI agents in any domain — the model already knows how to be an agent, so design is about capabilities, knowledge, and context, added only as far as a Progressive Complexity ladder (basic → planning → subagents → skills) that real usage actually demands.

10 minutes
Intermediate
Developer Tools

Agent Prompt Architect

A compact seven-field skeleton (Role, Goal, Inputs, Constraints, Process, Output, Verification, Fallback) and a fast refinement loop for turning vague intent into a prompt an agent can execute reliably every time.

5 minutes
Beginner
Developer Tools

Agent SDK App Builder

Scaffold new Claude Agent SDK applications in TypeScript or Python, and verify existing ones against official SDK patterns before you ship.

10 minutes
Intermediate
Developer Tools

Brandkit Generator: Premium Identity Board Creator

An image-direction rule set that produces a complete brand-guidelines board in one image: logo concept, color system, typography, and applications, grounded in brand strategy instead of random logo generation

5 minutes
Beginner
Developer Tools

Brutalist UI Skill: Industrial & Tactical Interface Design

A design language that forces Claude to build raw, mechanical interfaces — Swiss industrial print or CRT terminal telemetry, with rigid grids and zero rounded corners

5 minutes
Intermediate

Browse all Developer Tools playbooks →