Skip to main content

This skill may not reflect the latest upstream change

Next.js Releases update on 2026-11-09 may affect this skill Last checked Nov 25, 2026.

tech-debt

Inventory and prioritize all technical debt in a codebase. Scans for TODO/FIXME/HACK markers and stale comments, outdated and deprecated dependencies with CVE detection, high-churn files and cyclomatic complexity hotspots, duplicated code blocks.

v2.0.14 installs

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install tech-debt
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/tech-debt/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiCryptographically signed by the skills-hub.ai distributor key at publish time.
Signed
0Save

Instructions

You are an autonomous technical debt analysis agent. You inventory all forms of tech debt
in the codebase, prioritize by impact and effort, and produce an actionable backlog.
Do NOT ask the user questions. Investigate the entire codebase thoroughly.

INPUT: $ARGUMENTS (optional)
If provided, focus on a specific area (e.g., "auth module", "frontend", "dependencies only").
If not provided, audit the entire project.


PHASE 1: STACK DETECTION & CODEBASE OVERVIEW


  1. Identify the tech stack:

    • Read package.json, pubspec.yaml, requirements.txt, go.mod, Cargo.toml, Gemfile, pom.xml.
    • Identify frameworks, languages, build tools, test frameworks.
    • Record project age (first commit date from git log).
  2. Gather codebase metrics:

    • Total files and lines of code (source only, excluding deps).
    • Number of contributors (from git shortlog).
    • Commit frequency (recent vs historical).
    • Test file count vs source file count.

PHASE 2: COMMENT-BASED DEBT


Scan all source files for debt markers:

TODO COMMENTS:

  • Search for: TODO, FIXME, HACK, WORKAROUND, XXX, TEMP, TEMPORARY, KLUDGE.
  • For each: file, line, the full comment text, author (git blame), age (commit date).
  • Categorize: bug (FIXME), missing feature (TODO), code quality (HACK), temporary (TEMP).

STALE COMMENTS:

  • Comments referencing ticket numbers for closed issues.
  • Comments saying "remove after X" where X has passed.
  • Comments referencing removed code or old architecture.

SUPPRESSION COMMENTS:

  • Linter suppressions: // eslint-disable, # noqa, // nolint, @SuppressWarnings.
  • Type suppressions: // @ts-ignore, // @ts-expect-error, as any, type: ignore.
  • For each: file, line, what rule is suppressed, whether it is still necessary.
MarkerFileLineTextAuthorAgeCategory

PHASE 3: DEPENDENCY DEBT


OUTDATED DEPENDENCIES:

  • Run conceptual analysis of package manifest vs latest versions.
  • Categorize: patch update (safe), minor update (features), major update (breaking).
  • For each major update: changelog breaking changes, migration effort estimate.

DEPRECATED PACKAGES:

  • Check for packages marked deprecated in npm/PyPI/etc.
  • Check for packages with no commits in 2+ years (abandoned).
  • For each: the package, what it does, recommended replacement.

DEPRECATED API USAGE:

  • Scan for usage of deprecated APIs within dependencies.
  • Framework deprecation warnings (React class components, Express 4 patterns, etc.).
  • Language deprecation (Python 2 patterns, old Node.js APIs).

SECURITY VULNERABILITIES:

  • Known CVEs in dependencies (run npm audit, pip-audit, cargo audit conceptually).
  • Severity and whether a fix is available.

PHASE 4: CODE QUALITY DEBT


HIGH-CHURN FILES (many recent modifications):

  • Analyze git log for files with the most commits in the last 90 days.
  • High churn + high complexity = highest debt priority.
  • Top 20 files by churn count.
FileCommits (90d)LinesComplexityAuthorsTop Change Reason

HIGH COMPLEXITY:

  • Estimate cyclomatic complexity for all functions/methods.
  • Flag functions with complexity > 15 (hard to test and maintain).
  • Flag files with average complexity > 10.
  • Top 20 most complex functions.
FunctionFileComplexityLinesTests Exist

DUPLICATED CODE:

  • Find code blocks of 10+ lines that appear in 2+ locations.
  • Find functions with identical or near-identical logic but different names.
  • For each duplicate: both locations, line count, recommended extraction.
DuplicateLocation 1Location 2LinesRecommendation

MISSING TESTS FOR CRITICAL PATHS:

  • Identify critical code paths: auth, payment, data mutation, admin operations.
  • Check if corresponding test files exist with meaningful assertions.
  • Flag critical paths with no test coverage.
Critical PathSource FileTest FileCoverage

PHASE 5: CONFIGURATION DEBT


HARDCODED VALUES:

  • Magic numbers in business logic (timeouts, limits, thresholds, prices).
  • Hardcoded URLs, file paths, or hostnames.
  • Hardcoded feature flags or toggles.
  • Inline SQL queries that should be in query files.
  • For each: file, line, the value, what it should be (env var, config, constant).

MISSING CONFIGURATION:

  • Values that differ between environments but are hardcoded for one.
  • Missing .env.example documentation for required env vars.
  • Missing default values for optional configuration.

BUILD/TOOLING DEBT:

  • Outdated build tool configuration.
  • Missing or incomplete CI/CD pipeline.
  • Missing pre-commit hooks (lint, test, type-check).
  • Slow build steps that could be parallelized or cached.

PHASE 6: ARCHITECTURE DEBT


GOD OBJECTS:

  • Files > 500 lines with multiple responsibilities.
  • Services/classes that are imported by > 10 other files.
  • Files that are modified in > 30% of recent commits.

CIRCULAR DEPENDENCIES:

  • Modules that import each other (directly or transitively).
  • Layers that violate dependency rules (UI importing DB, etc.).

MISSING ABSTRACTIONS:

  • Direct infrastructure calls (HTTP, DB, FS) scattered throughout business logic.
  • Missing repository/service layer between handlers and data.
  • Missing interfaces/contracts between modules.

INCONSISTENT PATTERNS:

  • Multiple patterns for the same concern (some files use async/await, others callbacks).
  • Mixed error handling strategies (some throw, some return Result, some use error codes).
  • Inconsistent naming conventions across the codebase.

PHASE 7: DEBT PRIORITIZATION


Score each debt item on three axes:

IMPACT (how much does this hurt?):

  • 3 = Affects users directly (bugs, performance, security).
  • 2 = Affects developer productivity (slow builds, hard to understand code).
  • 1 = Cosmetic or minor annoyance.

EFFORT (how hard is the fix?):

  • S = < 1 hour (rename, add config, update dep).
  • M = 1-4 hours (refactor function, add tests, extract module).
  • L = 1+ days (rewrite module, major migration, architecture change).

RISK (what happens if we ignore it?):

  • 3 = Could cause outage, data loss, or security breach.
  • 2 = Will cause increasing maintenance burden over time.
  • 1 = Unlikely to cause problems but isn't ideal.

PRIORITY = Impact * Risk / Effort (higher = fix first).


SELF-HEALING VALIDATION (max 2 iterations)


After producing output, validate data quality and completeness:

  1. Verify all output sections have substantive content (not just headers).
  2. Verify every finding references a specific file, code location, or data point.
  3. Verify recommendations are actionable and evidence-based.
  4. If the analysis consumed insufficient data (empty directories, missing configs),
    note data gaps and attempt alternative discovery methods.

IF VALIDATION FAILS:

  • Identify which sections are incomplete or lack evidence
  • Re-analyze the deficient areas with expanded search patterns
  • Repeat up to 2 iterations

IF STILL INCOMPLETE after 2 iterations:

  • Flag specific gaps in the output
  • Note what data would be needed to complete the analysis

OUTPUT


Technical Debt Inventory

Stack: {detected stack}

Project Age: {years/months}

Codebase Size: {files} files, {lines} lines

Debt Summary

CategoryCriticalHighMediumLowTotal Items
Comment-based (TODO/FIXME){n}{n}{n}{n}{n}
Dependencies{n}{n}{n}{n}{n}
Code Quality{n}{n}{n}{n}{n}
Configuration{n}{n}{n}{n}{n}
Architecture{n}{n}{n}{n}{n}

Debt Score: {score}/100 (lower is better, 0 = no debt)

Priority Backlog (Top 20)

#ItemCategoryImpactEffortRiskPriorityLocation
1{title}{category}{1-3}{S/M/L}{1-3}{score}{file:line}

Quick Wins (High Impact, Small Effort)

  1. {item} -- {file:line} -- {what to do}
  2. ...

Churn Hotspots (files that keep changing)

  1. {file} -- {N} commits in 90 days, complexity {N}
  2. ...

Dependency Health

  • Outdated (patch): {n}
  • Outdated (minor): {n}
  • Outdated (major): {n}
  • Deprecated: {n}
  • Vulnerable: {n}

Estimated Total Effort

  • Quick wins: {hours} hours
  • Medium items: {days} days
  • Large items: {weeks} weeks

DO NOT:

  • Flag every TODO as critical -- most are Low priority notes.
  • Count test files toward complexity metrics.
  • Flag framework-generated code as debt (boilerplate, config files).
  • Recommend rewriting everything -- prioritize incremental improvement.
  • Ignore git history -- recent churn matters more than old stable code.

NEXT STEPS:

  • "Run /code-smell for a deeper structural analysis of the worst files."
  • "Run /dead-code to remove unused code before tackling other debt."
  • "Run /dependency-analysis for a detailed dependency health report."
  • "Run /iterate to start working through the priority backlog."

SELF-EVOLUTION TELEMETRY


After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

  • Look for the project path in ~/.claude/projects/
  • If found, append to skill-telemetry.md in that memory directory

Entry format:

### /tech-debt — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.
Keep entries concise — /evolve will parse these for skill improvement signals.

This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion to interfaces using modern CSS — scroll-driven animations, view transitions, @starting-style, and GPU-accelerated transforms. Triggers: 'add animation', 'animate', 'add motion', 'transitions', 'scroll animation'.77 installsdesign-auditComprehensive autonomous design quality audit across accessibility (WCAG 2.2), performance, theming, responsive/adaptive design, and anti-pattern detection. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.61 installssecureFull-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.56 installsdiagramGenerate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.56 installsdesign-polishFinal autonomous quality pass before shipping. Fixes alignment, spacing, consistency, typography hierarchy, color harmony, motion timing, and every micro-detail that separates good from great..55 installsresponsiveAudit and fix responsive design issues across all breakpoints. Scans for fixed widths that cause mobile overflow, missing media query variants, non-responsive images, undersized touch targets below 48px, unreadable typography, and horizontal scroll violations..49 installs

More from Skills Hub

View source →
security-reviewSecurity audit and vulnerability assessment for any codebase. Scans for authentication bypasses, missing auth middleware, broken JWT validation (algorithm confusion, weak secrets, missing expiry), OAuth state and PKCE flaws, IDOR and horizontal privilege escalation.196 installsunit-testGenerate comprehensive unit tests with edge cases, error paths, and boundary values. Triggers: you need to add unit tests, increase code coverage, test edge cases, or verify error handling paths.163 installsweb-gameScaffolds a browser-based game with Phaser 3, PixiJS, or Three.js including game loop, asset pipeline, responsive canvas, input handling, audio, save/load, and deployment to itch.io or web. Triggers: on: "web game", "browser game", "html5 game", "phaser game", "pixi game".132 installshumanizerMulti-pass editor that removes AI-writing tells from drafted content — eliminates filler phrases, balances sentence length, restores opinion and voice, and strips em-dash overuse so posts sound human and opinionated rather than ChatGPT-generic..131 installsflutterBuilds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.126 installsdesign-to-codeTurn a design into production-quality frontend code: extract a design system with tokens and components, make layouts responsive across breakpoints, add dark mode with WCAG-compliant theming, then run a UX audit to validate everything..124 installs

More Analysis skills

Browse category →
web-research-agentA comprehensive autonomous web research agent that performs targeted searches, fetches and parses web content, summarizes findings, and generates structured reports, adhering to industry best practices for accuracy, security, and robustness.235 installsrecallReconstructs the development cycle from git history, distills sequential/parallel patterns, and produces actionable insights for improving future iterations. Triggers: recall, retrospective, development analysis, what happened, dev cycle analysis.20 installsseoAutonomous SEO + AI-search optimization agent for 2026. Audits and fixes technical SEO, on-page metadata, structured data, Core Web Vitals (LCP/INP/CLS), llms.txt, Generative Engine Optimization (GEO) for ChatGPT/Perplexity/AI Overviews, E-E-A-T author signals.10 installsapp-size-optimizerAnalyzes mobile app binary size -- asset audit for unused images and font subsetting, code stripping with ProGuard and tree-shaking, on-demand resources, dynamic feature modules, and app thinning strategies..6 installsbilibili-comment-insights当用户需要做 B站评论分析、B站评论洞察、B站用户反馈分析、B站需求挖掘、痛点总结、购买顾虑整理、FAQ 提炼、口碑分析、评论回复观察或内容讨论复盘时使用。基于用户提供的 B站视频、专栏、动态链接或对应内容 ID 下的评论结果,面向内容运营、产品调研、品牌调研和创作者。由社媒数据助手 SocialDataX 提供。5 installsbundle-analysisAnalyze frontend bundle size, detect heavy dependencies, find duplicates, evaluate tree-shaking, recommend code splitting, and generate size budget configs. Triggers: phrases: "analyze bundle size", "why is my bundle so big", "find heavy dependencies", "reduce bundle size".5 installs

Frequently asked questions about tech-debt

What does the tech-debt skill do?

Inventory and prioritize all technical debt in a codebase. Scans for TODO/FIXME/HACK markers and stale comments, outdated and deprecated dependencies with CVE detection, high-churn files and cyclomatic complexity hotspots, duplicated code blocks. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the tech-debt skill?

Run `npx @skills-hub-ai/cli install tech-debt` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/tech-debt/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does tech-debt work with?

tech-debt runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the tech-debt skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use tech-debt after installing it?

In Claude Code, type `/tech-debt` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the tech-debt skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.