debt-ops-metrics

debt-ops-metrics is a skill for Claude Code, Codex from bcanfield/agentic-tech-debt. It costs 74 tokens per session (1,064 once invoked), scanned A, original, MIT.

A read-only report that summarizes technical-debt activity for the current Git repository, including registration, feedback actions, architecture decision records, and AI-authored entries.

In plain words
What is it for?
Use it when checking debt health, registry statistics, registration rates, feedback rates, ADR creation, or the share of debt entries written by AI.
Why use it?
It shows whether the repository is recording and addressing deferred work, without changing the activity log.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when checking debt health, registry statistics, registration rates, feedback rates, ADR creation, or the share of debt entries written by AI.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bcanfield/agentic-tech-debt/debt-ops-metrics
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.

Any agent
npx skills add bcanfield/agentic-tech-debt --skill debt-ops-metrics
Clone the repo
git clone --depth 1 https://github.com/bcanfield/agentic-tech-debt

Made for: Claude Code, Codex.

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 debt-ops-metrics

README.md
[![agentmods](https://agentmods.dev/badge/skills/bcanfield/agentic-tech-debt/debt-ops-metrics/github.svg)](https://agentmods.dev/skills/bcanfield/agentic-tech-debt/debt-ops-metrics)
Your own site
<a href="https://agentmods.dev/skills/bcanfield/agentic-tech-debt/debt-ops-metrics"><img src="https://agentmods.dev/badge/skills/bcanfield/agentic-tech-debt/debt-ops-metrics/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 debt-ops-metrics

Your own site · 80×15
<a href="https://agentmods.dev/skills/bcanfield/agentic-tech-debt/debt-ops-metrics"><img src="https://agentmods.dev/badge/skills/bcanfield/agentic-tech-debt/debt-ops-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,064 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00074 $0.01064
Opus 5 $0.00037 $0.00532
Sonnet 5 $0.00015 $0.00213
Haiku 4.5 $0.00007 $0.00106

Measured 9d ago against content hash 53205c0fcc77, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

debt-ops-metrics scanned grade A with 1 finding 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 9d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

REPO_HASH=$(python3 -c "import hashlib,subprocess;t=subprocess.run(['git','rev-parse','--show-toplevel'],capture_output=True,text=True).stdout.strip();print(hashlib.sha1(t.encode()).hexdigest()[:12] if t else '')")
copilot/skills/debt-ops-metrics/SKILL.md · 93 lines

How it starts

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

debt-ops-metrics

Read the hidden metrics log and tell the user whether the tripwires are tripping.

1. Find the log

The repo-hash is computed in Python (not shasum) so this is identical across macOS, Linux, and Windows — no BSD/GNU coreutils dependency.

REPO_HASH=$(python3 -c "import hashlib,subprocess;t=subprocess.run(['git','rev-parse','--show-toplevel'],capture_output=True,text=True).stdout.strip();print(hashlib.sha1(t.encode()).hexdigest()[:12] if t else '')")

# Hooks and skills share one deterministic cache base. Override with
# DEBT_OPS_CACHE; default is ~/.cache/debt-ops.
CACHE_DIR="${DEBT_OPS_CACHE:-$HOME/.cache/debt-ops}/cache/$REPO_HASH"

LOG="$CACHE_DIR/metrics.jsonl"
if [ -n "$REPO_HASH" ] && [ -f "$LOG" ]; then
  tail -n 500 "$LOG"
else
  echo "MISSING: no metrics.jsonl found for repo hash ${REPO_HASH:-<not-a-git-repo>}"
fi

If the file is missing or empty, tell the user no debt-ops activity has been logged for this repo yet and stop. On a skills-only tool (no hook adapter), only register and review events are logged — the per-edit edit/feedback/session events come from the hook adapter, so feedback metrics will be absent. Say so rather than reporting them as zero.

2. The log format

One JSON object per line. Event shapes:

  • {"event":"register","slug":"...","ai_authored":bool,"letter":"...","ts":"..."} — each capture
  • {"event":"review","total":N,"stale":N,"cold":N,"active":N,"ts":"..."} — each review
  • {"event":"edit","file":"...","registry_count":N,"ts":"..."} — every agent edit (hook adapter only)
  • {"event":"feedback","file":"...","result":"pass|fail","ts":"..."} — every quality-check fire (hook adapter only)
  • {"event":"session","registry_count":N,"adr_count":M,"ai_authored_count":K,"ts":"..."} — start of each session (hook adapter only)

Timestamps are ISO-8601 UTC.

3. Compute the tripwires

Filter to the last 7 days. Then compute what the available events support:

  • Captures / reviews — counts of event:register and event:review.
  • AI-authored share — share of register events with ai_authored:true.
  • Edits / sessions (hook adapter only) — counts of event:edit and event:session.
  • Registry growth (hook adapter only) — last registry_count minus first.
  • Feedback pass rate (hook adapter only)count(result:pass) / count(event:feedback).
  • FAIL → PASS rate (hook adapter only) — for each feedback with result:fail, look at the next feedback for the same file; count those that flipped to pass; divide by total fails. Below 50% means the agent isn't reliably acting on hook output — the architectural alarm bell.

Read the full file on GitHub · 93 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. 9d ago First seen · 93 lines · 74 tokens per session scan A 53205c0fcc77

Subscribe to this mod's changes

debt-ops-metrics is a skill published in the GitHub repository bcanfield/agentic-tech-debt (8 stars, last pushed today), licensed MIT. It adds 74 tokens to every session and 1,064 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.