tech-debt

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

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.

agentmods
npx agentmods add commands/w2ur/claude-code-setup/tech-debt
Clone the repo
git clone --depth 1 https://github.com/w2ur/claude-code-setup
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,688 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00076 $0.01688
Opus 5 $0.00038 $0.00844
Sonnet 5 $0.00015 $0.00338
Haiku 4.5 $0.00008 $0.00169

Measured yesterday against content hash fed41dbf75a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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 · 183 lines

How it starts

The opening of the file, as written. The whole thing — 183 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 (CLAUDE.md: deterministic work gets a script, no model). 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 the four signals below, 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.

Signal Source Weight
A — commit activity git log --since="30 days ago" 2 if >10, 1 if 1–10, 0 if none
B — portfolio prominence position of repo: '<name>' in editorial.ts (Layer 3, M12) 2 if in the first 6, 1 if present later, 0 if absent
C — time since last deep review ~/Dev/.tech-debt-rotation.json 3 never, 2 if >60d, 1 if 30–60d, 0 if <30d
D — quick issues npm outdated, npm audit, console.log count, .nvmrc +1 per high/critical vuln, +1 if >5 outdated, +1 if >3 console.log

Do not re-implement these signals inline. The script is the single source of truth for the scoring; restating the weights here in runnable form is exactly how the two drift apart.

Exit codes: 0 clean · 2 ran but degraded (a required tool was missing, so the numbers are incomplete — say so before presenting them) · 1 hard error.

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

Read the full file on GitHub · 183 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. yesterday 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 9d ago), licensed MIT. It adds 76 tokens to every session and 1,688 once invoked, about $0.0004 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.