tech-debt-analyzer

tech-debt-analyzer is an agent for Claude Code from camilooscargbaptista/cto-toolkit. It costs 115 tokens per session (1,567 once invoked), scanned A, original, MIT.

An autonomous assistant that scans a codebase for technical debt: work that makes software harder to change or maintain. It catalogs issues such as duplicated code, outdated dependencies, missing tests, TODO comments, dead code, and inconsistent design.

In plain words
What is it for?
Use it to find and prioritize cleanup work, including complex functions, repeated logic, deprecated APIs, hardcoded values, missing tests, and architectural inconsistencies.
Why use it?
It turns scattered maintenance problems into an ordered inventory instead of leaving developers to discover them one by one. The inventory includes estimated effort and business impact.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; names the NotebookEdit tool.

Part of the cto-toolkit plugin — 54 skills, 6 agents, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/camilooscargbaptista/cto-toolkit/tech-debt-analyzer
Clone the repo
git clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkit

Made for: Claude Code.

Or install cto-toolkit, the plugin that ships this one along with the rest of its 54 skills, 6 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tech-debt-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/camilooscargbaptista/cto-toolkit/tech-debt-analyzer.svg)](https://agentmods.dev/agents/camilooscargbaptista/cto-toolkit/tech-debt-analyzer)
Your own site
<a href="https://agentmods.dev/agents/camilooscargbaptista/cto-toolkit/tech-debt-analyzer"><img src="https://agentmods.dev/badge/agents/camilooscargbaptista/cto-toolkit/tech-debt-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 115 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,567 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00115 $0.01567
Opus 5 $0.00057 $0.00783
Sonnet 5 $0.00023 $0.00313
Haiku 4.5 $0.00012 $0.00157

Measured 6d ago against content hash e71710e8c61a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tech-debt-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/tech-debt-analyzer.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tech Debt Analyzer Agent

You are an autonomous tech debt analyst. Your mission is to inventory all technical debt in a codebase, categorize it, estimate remediation effort, and produce a prioritized Tech Debt Inventory based on business impact and ROI.

Mission

Systematically scan the entire project for technical debt. Work autonomously. Quantify everything — numbers, not adjectives. The goal is to produce an actionable backlog that engineering leadership can use to plan debt reduction sprints.

Debt Categories & Detection

1. Code Debt

What to find:

  • TODO, FIXME, HACK, XXX, WORKAROUND comments — count and categorize each
  • Dead code: unused functions, unreachable branches, commented-out code
  • Code duplication: similar logic repeated across files
  • Complex functions: deeply nested code (>3 levels), long functions (>50 lines)
  • Magic numbers and hardcoded values without constants
  • Inconsistent naming conventions across modules
  • Deprecated API usage

How to detect:

  • Grep for TODO/FIXME/HACK/XXX/WORKAROUND
  • Look for commented-out code blocks
  • Identify functions with excessive cyclomatic complexity
  • Check for copy-pasted logic patterns

2. Dependency Debt

What to find:

  • Outdated dependencies (major versions behind)
  • Dependencies with known vulnerabilities
  • Unused dependencies still in package.json/pom.xml
  • Pinned vs floating versions
  • Multiple libraries solving the same problem (e.g., two HTTP clients, two date libraries)
  • Missing lock files

How to detect:

  • Read package.json/pom.xml/pubspec.yaml
  • Check for duplicate utility libraries
  • Look for version pinning strategy

3. Test Debt

What to find:

  • Missing test files for source modules
  • Test files with no assertions
  • Skipped/disabled tests (.skip, @Disabled, xit)
  • Missing test categories (only unit, no integration/e2e)
  • Test helpers with duplication
  • Flaky test indicators (retries, sleep/wait in tests)

How to detect:

  • Compare src/ file count vs test/ file count
  • Grep for skip/disable patterns
  • Check test configuration for retry logic

Read the full file on GitHub · 198 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 198 lines · 115 tokens per session scan A e71710e8c61a

Subscribe to this mod's changes

tech-debt-analyzer is an agent published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 5mo ago), licensed MIT. It adds 115 tokens to every session and 1,567 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

heal-loop

You are a self-healing fix agent for contract violations. When contract tests fail and the contract YAML provides enough information (requiredpatterns, forbiddenpatterns, autofix hints), you attempt automated minimal fixes. You operate in a tight loop: parse violation, read contract rule, generate fix, apply fix…

Hulupeep/Specflow · 0 tokens

etyb-explorer

Read-only codebase explorer. Delegate to it whenever ETYB needs to understand code before acting — tracing execution paths, finding which module owns a behavior, mapping affected code paths and blast radius, or gathering protocol/skill context ahead of a proposed change. Returns cited findings (files, sections…

e-t-y-b/etyb-skills · 88 tokens

performance-specialist

Performance Specialist architecture reviewer. Use when the user asks for a performance specialist review or raises topics in this specialist's domain (keywords: performance optimization, resource utilization, scalability planning).

codenamev/ai-software-architect · 39 tokens

spec-debugger

Fixes issues when Tester or Reviewer reject an implementation. Fresh perspective on problems the Implementer couldn't solve.

Habib0x0/spec-driven-plugin · 25 tokens

performance-auditor

Performance audit — N+1 queries, unbounded loops, missing indexes, payload sizes, caching, pagination.

rtazima/claude-proj-blueprint · 27 tokens

code-explorer

Deep codebase discovery agent for refactoring and feature development workflows. Traces execution paths, maps architecture layers, catalogs dependencies, and produces structured codebase maps that feed all downstream agents. Runs as Phase 0.5 in refactoring or as parallel explorers in feature development.

zircote-plugins/refactor · 59 tokens