debt-map

debt-map is a command for Claude Code from komunite/kalfa. It costs 17 tokens per session (1,176 once invoked), scanned A, original, MIT.

A technical-debt mapping workflow for a codebase. Technical debt is work left undone or shortcuts in code that make future changes harder or riskier.

In plain words
What is it for?
Use it to find TODO and FIXME comments, complex or frequently changed files, deprecated APIs, unused exports, and other signs of code health problems.
Why use it?
It turns scattered warnings and difficult code into a ranked list of maintenance work.

Command for Claude Code

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/komunite/kalfa/debt-map
Clone the repo
git clone --depth 1 https://github.com/komunite/kalfa

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 debt-map

README.md
[![agentmods](https://agentmods.dev/badge/commands/komunite/kalfa/debt-map.svg)](https://agentmods.dev/commands/komunite/kalfa/debt-map)
Your own site
<a href="https://agentmods.dev/commands/komunite/kalfa/debt-map"><img src="https://agentmods.dev/badge/commands/komunite/kalfa/debt-map.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 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,176 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 $0.00017 $0.01176
Opus 5 $0.00009 $0.00588
Sonnet 5 $0.00003 $0.00235
Haiku 4.5 $0.00002 $0.00118

Measured 5d ago against content hash bdaacdac2d41, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debt-map 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 5d 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.

.claude/commands/debt-map.md · 117 lines

How it starts

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

Bir kod tabanını teknik borç için tara. Dosyaları karmaşıklık, test kapsamı, yaş ve bilinen sorunlara göre puanla. Önceliklendirilmiş borç ödeme planı çıkar.

Adımlar

Adım 1: Kapsamı tanımla

Kullanıcı bir dizin belirttiyse onu kullan. Aksi halde tüm projeyi tara (node_modules, .git, vendor, build dizinleri hariç).

Adım 2: Otomatik taramalar (paralel agent'lar)

Agent 1 — TODO/FIXME/HACK taraması:

  • TODO, FIXME, HACK, XXX, TEMP, WORKAROUND yorumlarını ara
  • Her biri için: dosya, satır, içerik, yaş (git blame)
  • Kategorize et: teknik borç, eksik özellik, bilinen hata, temizlik gerekli

Agent 2 — Karmaşıklık noktaları:

  • En büyük dosyaları bul (satır sayısına göre)
  • En derin iç içe geçmeye sahip dosyaları bul (karmaşıklık göstergesi)
  • En çok fonksiyon/metoda sahip dosyaları bul
  • En sık değiştirilen dosyaları belirle (git log --format='' --name-only | sort | uniq -c | sort -rn | head -20)
  • Çapraz referans: HEM karmaşık HEM sık değiştirilen dosyalar en yüksek önceliktir

Agent 3 — Kod sağlığı sinyalleri:

  • Kullanımdan kaldırılmış API kullanımını kontrol et (@deprecated, console.warn deprecation kalıpları için grep)
  • Kullanılmayan dışa aktarımları veya ölü kod kalıplarını bul
  • Bağımlılık sağlığını kontrol et (package.json / requirements.txt'deki güncel olmayan paketler)
  • Tekrarlanan kod kalıplarını ara (benzer fonksiyon imzaları, kopyala-yapıştır göstergeleri)

Adım 3: Her borç kalemini puanla

İki boyutta puanla:

Etki (ne kadar zarar veriyor):

  • 3 = Kullanıcıları etkiliyor, hatalara neden oluyor, özellikleri engelliyor
  • 2 = Geliştirmeyi yavaşlatıyor, değişiklikleri riskli yapıyor
  • 1 = Kod kokusu, okunabilirlik sorunu, stil endişesi

Çaba (düzeltmek ne kadar zor):

  • 3 = Büyük yeniden yapılandırma, birden fazla dosya, kırıcı değişiklikler
  • 2 = Orta düzey iş, tek alanla sınırlı
  • 1 = Hızlı düzeltme, bir saatin altında

Öncelik = Etki / Çaba — yüksek etki + düşük çaba = önce düzelt.

Adım 4: Borç haritasını oluştur

Read the full file on GitHub · 117 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. 5d ago First seen · 117 lines · 17 tokens per session scan A bdaacdac2d41

Subscribe to this mod's changes

debt-map is a command published in the GitHub repository komunite/kalfa (244 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 1,176 once invoked, about $0.0001 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-30.