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.
git clone --depth 1 https://github.com/fatihkan/badiWrote 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.
[](https://agentmods.dev/commands/fatihkan/badi/debt-map)<a href="https://agentmods.dev/commands/fatihkan/badi/debt-map"><img src="https://agentmods.dev/badge/commands/fatihkan/badi/debt-map.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01002 |
| Opus 5 | $0.00000 | $0.00501 |
| Sonnet 5 | $0.00000 | $0.00200 |
| Haiku 4.5 | $0.00000 | $0.00100 |
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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Technical debt mapping command. Systematically detects and prioritizes technical debt in the codebase.
Required Tools
- Grep (code scan)
- Glob (file discovery)
- Read (file reading)
- Bash (complexity analysis, git blame)
- Write (report writing)
Procedure (4 Steps)
Step 1: Define the Scope
Ask the user:
- Whole project: Scan the complete codebase
- Module: A specific module or directory
- Layer: A specific layer (API, UI, database, etc.)
Record the scope:
- Directories to scan
- File types to include
- Directories to exclude (node_modules, vendor, dist, build, etc.)
Step 2: 3 Parallel Scans
Scan A: TODO/FIXME Inventory
- Scan and categorize
TODOtags - Scan
FIXMEtags (needing urgent attention) - Scan
HACKtags (temporary fixes) - Scan
WORKAROUNDtags (known-issue workarounds) - Scan
DEPRECATEDtags (should no longer be used) - Scan
XXXandBUGtags - For each finding record file path, line number, and context
- Date them via git blame and highlight the old ones
Scan B: Complexity Analysis
- Detect 500+ line files (oversized)
- Find 100+ line functions (overlong)
- Find 3+ level nested conditionals (deep nesting)
- Files with too many imports/dependencies
- Duplicated code blocks (copy-paste detection)
- Functions with 5+ parameters
- Deep inheritance hierarchies (3+ levels)
- God class / god function detection
Scan C: Staleness and Dead Code Detection
- Unused exports/functions
- Deprecated API usage (per language and framework)
- Outdated dependencies
- Incompatible version pairings
- Removed or unsupported libraries
- Old configuration formats
- Commented-out code blocks (zombie code)
- Undying feature flags
Step 3: Scoring
Compute a score per debt item:
Impact Score (1-5):
- 5: Production-outage risk, security vulnerability
- 4: Performance degradation, data inconsistency
- 3: Significantly slows development
- 2: Reduces readability and maintainability
- 1: Cosmetic issue, minor inconsistency
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.
- today First seen · 122 lines · 0 tokens per session scan A 794314cbb30f
debt-map is a command published in the GitHub repository fatihkan/badi (7 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,002 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-06.
Other commands, from other repositories
sonarqube
Analyze SonarCloud quality issues for a specific PR.
review-pr
Perform a comprehensive code review of a pull request.
pr
Analyze changes, detect scope issues, and create a well-structured PR.
refactor
Analyze code for SOLID violations and suggest targeted improvements.
audit-codebase
Codebase health audit scoring 7 categories with progression plan.
git-worktree-clean
Clean up stale git worktrees with merged branch detection and disk usage report.