tech-debt-analysis

tech-debt-analysis is a command for Claude Code from Insight-Services-APAC/ingenious. It costs 0 tokens per session (786 once invoked), scanned A, original, MIT.

A command that reads an entire codebase to find technical debt: design and implementation choices that make future changes harder, riskier, or slower.

In plain words
What is it for?
Use it to examine execution paths, data flow, module relationships, layering, abstractions, and violations of common design principles.
Why use it?
It helps reveal problems that quick searches may miss, such as tangled dependencies, repeated logic, and inconsistent architecture.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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 commands/insight-services-apac/ingenious/tech-debt-analysis
Clone the repo
git clone --depth 1 https://github.com/Insight-Services-APAC/ingenious

Made for: Claude Code.

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-analysis

README.md
[![agentmods](https://agentmods.dev/badge/commands/insight-services-apac/ingenious/tech-debt-analysis.svg)](https://agentmods.dev/commands/insight-services-apac/ingenious/tech-debt-analysis)
Your own site
<a href="https://agentmods.dev/commands/insight-services-apac/ingenious/tech-debt-analysis"><img src="https://agentmods.dev/badge/commands/insight-services-apac/ingenious/tech-debt-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 786 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.00000 $0.00786
Opus 5 $0.00000 $0.00393
Sonnet 5 $0.00000 $0.00157
Haiku 4.5 $0.00000 $0.00079

Measured yesterday against content hash ab64eb03d893, 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-analysis 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 yesterday.

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.

.claude/commands/analysis/tech-debt-analysis.md · 58 lines

What it actually says

Perform a deep manual analysis of the entire codebase to identify technical debt through comprehensive code reading and understanding.

Deep Code Reading & Analysis:

  1. Read every source file systematically - understand the complete codebase structure, logic flow, and implementation patterns
  2. Trace execution paths - follow code from entry points through all major workflows to understand system behavior
  3. Analyze data flow - understand how data moves through the system, transformations, and storage patterns
  4. Study dependency relationships - map out how modules, classes, and functions depend on each other

Architecture & Design Debt:

  1. Identify architectural inconsistencies - find places where the code doesn't follow established patterns
  2. Spot violation of SOLID principles - look for classes with multiple responsibilities, tight coupling, etc.
  3. Find abstraction leaks - identify where implementation details bleed through interfaces
  4. Discover missing abstractions - find repeated patterns that should be extracted into reusable components
  5. Analyze layering violations - find inappropriate cross-layer dependencies

Code Quality Issues:

  1. Complex functions/methods - identify overly long or complex logic that's hard to understand
  2. Poor naming - find confusing variable, function, or class names that don't express intent
  3. Code duplication - manually spot repeated logic that should be consolidated
  4. Inconsistent patterns - find places where similar problems are solved differently
  5. Magic numbers/strings - identify hardcoded values that should be constants or configuration

Maintainability Problems:

  1. Commented-out code - find dead code left in comments
  2. TODO/FIXME comments - catalog all deferred work and technical shortcuts
  3. Brittle code - identify fragile implementations that break easily with changes
  4. Over-engineering - find unnecessarily complex solutions to simple problems
  5. Under-engineering - find oversimplified code that will break under load or edge cases

Business Logic Issues:

  1. Domain model inconsistencies - find mismatches between code structure and business concepts
  2. Missing error handling - identify places where failures aren't properly handled
  3. Incomplete features - find half-implemented functionality or workarounds
  4. Performance anti-patterns - spot inefficient algorithms or data access patterns

Testing & Documentation Gaps:

  1. Untestable code - find tightly coupled code that's difficult to test
  2. Missing edge case handling - identify where the code doesn't handle boundary conditions
  3. Undocumented complex logic - find intricate business rules without explanation
  4. Inconsistent error messages - find user-facing errors that are confusing or unhelpful

Security & Data Handling:

  1. Input validation gaps - find places where user input isn't properly sanitized
  2. Information leakage - identify where sensitive data might be exposed
  3. Authentication/authorization issues - find inconsistent security checks
  4. Data integrity problems - spot places where data consistency isn't maintained

Output Format:

  • Codebase Overview: High-level understanding of system architecture and main components
  • Critical Issues: Most severe technical debt that poses immediate risks
  • Systemic Problems: Patterns of debt that appear throughout the codebase
  • Module-by-Module Analysis: Detailed breakdown of issues in each major component
  • Refactoring Opportunities: Concrete suggestions for improving code quality
  • Risk Assessment: Impact analysis of identified technical debt
  • Implementation Roadmap: Prioritized plan for addressing the most important issues

Read the code like a senior developer doing a thorough code review - question every design decision, look for edge cases, and think about long-term maintainability.

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. yesterday First seen · 58 lines · 0 tokens per session scan A ab64eb03d893

Subscribe to this mod's changes

tech-debt-analysis is a command published in the GitHub repository Insight-Services-APAC/ingenious (24 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 786 tokens. 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-09-04.