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

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to find TODO and FIXME comments, complex or frequently changed files, deprecated APIs, unused exports, and other signs of code health problems.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/komunite/kalfa/debt-map
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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debt-map

Your own site · 80×15
<a href="https://agentmods.dev/commands/komunite/kalfa/debt-map"><img src="https://agentmods.dev/badge/commands/komunite/kalfa/debt-map.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.00017 $0.01176
Opus 5.5 $0.00007 $0.00470
Sonnet 5.5 $0.00003 $0.00235
Haiku 4.5 $0.00002 $0.00118

Measured 3mo ago against content hash bdaacdac2d41, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (246 stars, last pushed 7mo ago), licensed MIT. It adds 17 tokens to every session and 1,176 once invoked, about $0.0001 per session on Opus 5.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.

Related

debt-map compared with commands from other repositories

debt-map next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
debt-mapkomunite/kalfaCommand2467mo agoMITA17Claude Code
optimizersmith-horn/skillsmithCommand78todaynoneA0Claude Code
sniff-bloatersJordanGunn/nunchuckCommand910mo agoMITA0Claude Code, Cursor
checklistgithub/spec-kitCommand153ktodayMITA13Claude Code
clarifygithub/spec-kitCommand153ktodayMITA27Claude Code
analyzegithub/spec-kitCommand153ktodayMITA26Claude Code
specifygithub/spec-kitCommand153ktodayMITA13Claude Code