tech-debt

tech-debt is a command for Claude Code from w2ur/claude-code-setup. It costs 76 tokens per session (1,790 once invoked), scanned A, original, MIT.

A monthly technical-health review for all applications in a portfolio, followed by a deeper review of the applications the owner selects. The first phase ranks projects using recent activity, importance, scan age, and detected issues.

In plain words
What is it for?
Use it to scan all portfolio repositories, get a priority list, or perform a detailed review of selected apps for technical problems.
Why use it?
It replaces a broad, ad-hoc check with a repeatable way to find which codebases need attention first. The initial triage is read-only and does not apply fixes.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; positional $N argument.

Good fit Use it to scan all portfolio repositories, get a priority list, or perform a detailed review of selected apps for technical problems.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/w2ur/claude-code-setup/tech-debt
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/w2ur/claude-code-setup

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/w2ur/claude-code-setup/tech-debt/github.svg)](https://agentmods.dev/commands/w2ur/claude-code-setup/tech-debt)
Your own site
<a href="https://agentmods.dev/commands/w2ur/claude-code-setup/tech-debt"><img src="https://agentmods.dev/badge/commands/w2ur/claude-code-setup/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/w2ur/claude-code-setup/tech-debt"><img src="https://agentmods.dev/badge/commands/w2ur/claude-code-setup/tech-debt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 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,790 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.00076 $0.01790
Opus 5.5 $0.00030 $0.00716
Sonnet 5.5 $0.00015 $0.00358
Haiku 4.5 $0.00008 $0.00179

Measured 16d ago against content hash d438e16edff4, 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 16d 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.

commands/tech-debt.md · 175 lines

How it starts

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

Monthly technical health review. Two phases: triage everything, then deep-dive on your picks.

Mode Selection

  • If $0 is empty: run Phase 1 (triage all) → present priority list → ask owner to pick → run Phase 2 (deep review).
  • If $0 is --triage-only: run Phase 1 only, no fixes.
  • If $0 is app names (e.g., my-budget-app my-bias-app): skip Phase 1, run Phase 2 directly on those apps.

Phase 1 — Fast Triage (~1 min for all apps)

Phase 1 is fully deterministic, so it is a script and not model work (the scheduled-jobs skill: deterministic work gets a script, not an agent). Run it and present its output:

bash ~/.claude/scripts/tech-debt-triage.sh

It scans every git repo in ~/Dev (via dev-scanner.sh --json), scores each on four signals — commit activity, portfolio prominence (position in editorial.ts), time since last deep review (~/Dev/.tech-debt-rotation.json), and quick issues (npm outdated, npm audit, console.log count, .nvmrc) — and prints a ranked markdown table ready to show the owner. --json gives the same data machine-readable. It is read-only — it never writes the rotation tracker, because "last scan" means last deep review, not last triage.

The script owns the weights. Read them in tech-debt-triage.sh; never restate or re-implement them here — that is how the two drift apart.

Exit codes (the script's header is the source of truth): 0 ok · 1 ran but degraded (a required tool was missing, so the numbers are incomplete — say so before presenting them) · 2 could not run (git, the dev scanner or a uv-managed Python unavailable, or bad arguments) — report the triage as unknown and present no table.

Then ask: "Which apps do you want me to review in depth? (names or numbers, or 'top N')"

Wait for the owner's response before proceeding to Phase 2.


Phase 2 — Deep Review (selected apps only)

For each app the owner selected, run a thorough analysis:

2a. Dependencies Health

npm outdated 2>/dev/null
npm audit 2>/dev/null
# For Python: uv run --with pip-audit pip-audit

Read the full file on GitHub · 175 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. 16d ago Changed · +4 lines d438e16edff4
  2. 21d ago Changed · -5 lines 3be1e70cea01
  3. 1mo ago Changed · -7 lines 4e2498c3a2c2
  4. 1mo ago First seen · 183 lines · 76 tokens per session scan A fed41dbf75a2

Subscribe to this mod's changes

tech-debt is a command published in the GitHub repository w2ur/claude-code-setup (2 stars, last pushed 3d ago), licensed MIT. It adds 76 tokens to every session and 1,790 once invoked, about $0.0003 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.