tech-debt

tech-debt is a command for Claude Code from juanmhidalgo/claude-plugins. It costs 28 tokens per session (1,687 once invoked), scanned A, original, MIT.

A code-review command that checks staged changes or a branch difference for technical-debt and maintainability problems. Technical debt is code that makes future changes harder or riskier.

In plain words
What is it for?
Use it before merging staged work or a branch to identify difficult-to-maintain code and related improvements.
Why use it?
It helps find design and maintenance issues before they become more expensive to fix, without treating ordinary bugs or security issues as its focus.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the NotebookEdit tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the code-review plugin — 6 skills, 14 commands, 14 agents, 1 hook shipped together

Good fit Use it before merging staged work or a branch to identify difficult-to-maintain code and related improvements.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add juanmhidalgo/claude-plugins
Claude Code
/plugin install code-review

Made for: Claude Code.

Or install code-review, the plugin that ships this one along with the rest of its 6 skills, 14 commands, 14 agents, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/tech-debt/github.svg)](https://agentmods.dev/commands/juanmhidalgo/claude-plugins/tech-debt)
Your own site
<a href="https://agentmods.dev/commands/juanmhidalgo/claude-plugins/tech-debt"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/tech-debt/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 tech-debt

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 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,687 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.00028 $0.01687
Opus 5.5 $0.00011 $0.00675
Sonnet 5.5 $0.00006 $0.00337
Haiku 4.5 $0.00003 $0.00169

Measured 26d ago against content hash 9026e6b1a694, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 26d 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.

code-review/commands/tech-debt.md · 155 lines

How it starts

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

Context

  • Current branch: !git branch --show-current
  • Arguments: !bash "${CLAUDE_PLUGIN_ROOT}/scripts/args.sh" '$ARGUMENTS'
  • All arguments: $ARGUMENTS
  • Staged files: !git diff --cached --name-only

Scope Detection

The Arguments line is the parsed form of what the user typed: one JSON object with pane, spec, effort and positional. Read its fields; do not parse the raw arguments yourself. This command uses positional[0] and pane only; an effort or spec the user typed is not an error, just unused.

Determine the scope from positional[0]:

  • If it is staged → analyze staged changes only
  • If it is a branch name → use it as the base branch
  • If positional is empty → check if there are staged files:
    • If staged files exist → analyze staged changes
    • Otherwise → default to branch comparison against main (or master)

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.

  1. Resolve the remote tracking ref: git rev-parse --abbrev-ref <base>@{upstream} (falls back to origin/<base> if no upstream is configured)

  2. If a remote ref exists, run git rev-list --count <base>..<remote-ref> to count commits the local base is behind

  3. If the count is 0 → proceed silently

  4. 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)

  5. 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.

Herdr pane

Run this review in a Herdr pane when pane is true, or when pane is null and review_in_pane is configured true (${user_config.review_in_pane}). pane: false always wins: it is what the pane session itself receives. In the pane, run in collect mode: follow ${CLAUDE_PLUGIN_ROOT}/references/herdr-pane.md instead of the Instructions below. It falls back to the normal run outside Herdr.

Read the full file on GitHub · 155 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. 26d ago Changed · +5 lines 9026e6b1a694
  2. 1mo ago Changed · +18 lines 29fa3259bee7
  3. 2mo ago Changed · +38 lines a8f77f6039e6
  4. 3mo ago First seen · 94 lines · 28 tokens per session scan A 97dd737c0936

Subscribe to this mod's changes

tech-debt is a command published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 18d ago), licensed MIT. It adds 28 tokens to every session and 1,687 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-31.

Related

tech-debt compared with commands from other repositories

tech-debt next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tech-debtjuanmhidalgo/claude-pluginsCommand818d agoMITA28Claude Code
planazrtydxb/procoderCommand21222d agoApache-2.0A27Claude Code
auditazrtydxb/procoderCommand21222d agoApache-2.0A27Claude Code
testazrtydxb/procoderCommand21222d agoApache-2.0A20Claude Code
sm-buffScienceIsNeato/slop-mopCommand164d agoApache-2.0A0Claude Code
standardssamibs/skillfoundryCommand132mo agoMITA0Claude Code
refactoring-strategistsamibs/skillfoundryCommand132mo agoMITA0Claude Code