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.
npx agentmods add commands/juanmhidalgo/claude-plugins/tech-debtgit clone --depth 1 https://github.com/juanmhidalgo/claude-pluginsWrote 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/juanmhidalgo/claude-plugins/tech-debt)<a href="https://agentmods.dev/commands/juanmhidalgo/claude-plugins/tech-debt"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/tech-debt.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 | $0.00028 | $0.00911 |
| Opus 5 | $0.00014 | $0.00456 |
| Sonnet 5 | $0.00006 | $0.00182 |
| Haiku 4.5 | $0.00003 | $0.00091 |
Grade A, and why
tech-debt 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.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context
- Current branch: !
git branch --show-current - Argument: $ARGUMENTS
- Staged files: !
git diff --cached --name-only
Scope Detection
Determine the scope based on the argument:
- If
$ARGUMENTSisstaged→ analyze staged changes only - If
$ARGUMENTSis a branch name → use it as the base branch - If
$ARGUMENTSis empty → check if there are staged files:- If staged files exist → analyze staged changes
- Otherwise → default to branch comparison against
main(ormaster)
Pre-flight: Base Branch Staleness Check
Only for branch scope. Skip entirely for staged scope.
Before running the analysis, check if the local base branch is behind its remote. A stale base produces false findings by including already-merged commits in the diff.
-
Resolve the remote tracking ref:
git rev-parse --abbrev-ref <base>@{upstream}(falls back toorigin/<base>if no upstream is configured) -
If a remote ref exists, run
git rev-list --count <base>..<remote-ref>to count commits the local base is behind -
If the count is
0→ proceed silently -
If the count is
>0→ stop and warn the user:Your local
<base>is N commits behind<remote-ref>. The tech-debt analysis may include commits already merged upstream, producing false findings.Suggested:
git fetch origin <base>:<base>(or pull if checked out), then re-run.Proceed anyway? (yes / no)
-
If the remote ref cannot be resolved (no upstream, no
origin/<base>) → proceed silently; do not fail the command
Never auto-fetch or auto-pull — the user decides.
Instructions
Use Agent tool with subagent_type="code-review:tech-debt-reviewer" to analyze technical debt.
Pass the scope clearly in the agent prompt:
- For staged scope: Tell the agent to use
git diff --cachedand mention "staged" explicitly - For branch scope: Tell the agent the base branch to compare against
Analysis categories:
- Complexity — Functions >30 lines, deep nesting, god classes
- Duplication — Copy-pasted blocks, similar logic that could be abstracted
- Debt Markers — New TODO/FIXME/HACK/XXX/TEMP comments
- Test Gaps — New code without tests, weakened assertions
- Code Smells — Magic numbers, poor naming, long parameter lists, dead code
- Dependencies & Infrastructure — New deps, version pinning, ad-hoc reimplementation of shared patterns, undocumented config
- Maintainability — Missing docs on public APIs, implicit dependencies, tight coupling
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.
- 5d ago First seen · 94 lines · 28 tokens per session scan A 97dd737c0936
tech-debt is a command published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 10d ago), licensed MIT. It adds 28 tokens to every session and 911 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-31.
Other commands, from other repositories
brooks-audit
Run a Brooks-Lint architecture audit.
brooks-debt
Run a Brooks-Lint tech debt assessment.
brooks-health
Run a Brooks-Lint codebase health dashboard across all four dimensions.
brooks-review
Run a Brooks-Lint PR code review.
brooks-sweep
Run all Brooks-Lint analyses in one pass, auto-fix safe findings, confirm risky ones.
brooks-test
Run a Brooks-Lint test quality review.