metrics

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

A read-only report that summarizes the health of a debt-operations setup from its metrics log. Debt operations means tracking and managing accumulated maintenance work in a codebase.

In plain words
What is it for?
Use it to review registration rates, feedback actions, architecture decision records, and the share of changes written by AI.
Why use it?
It shows whether key tracking signals are working without changing the recorded data.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the debt-ops plugin — 4 skills, 4 hooks shipped together

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 skills/bcanfield/agentic-tech-debt/metrics
Any agent
npx skills add bcanfield/agentic-tech-debt --skill metrics
Clone the repo
git clone --depth 1 https://github.com/bcanfield/agentic-tech-debt

Made for: Claude Code, Codex.

Or install debt-ops, the plugin that ships this one along with the rest of its 4 skills, 4 hooks.

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 metrics

README.md
[![agentmods](https://agentmods.dev/badge/skills/bcanfield/agentic-tech-debt/metrics.svg)](https://agentmods.dev/skills/bcanfield/agentic-tech-debt/metrics)
Your own site
<a href="https://agentmods.dev/skills/bcanfield/agentic-tech-debt/metrics"><img src="https://agentmods.dev/badge/skills/bcanfield/agentic-tech-debt/metrics.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 972 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.00072 $0.00972
Opus 5 $0.00036 $0.00486
Sonnet 5 $0.00014 $0.00194
Haiku 4.5 $0.00007 $0.00097

Measured 5d ago against content hash e801584fcc19, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

claude-code/skills/metrics/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 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 v1's tripwires are tripping.

1. Find the log

TOPLEVEL=$(git rev-parse --show-toplevel)
REPO_HASH=$(printf '%s' "$TOPLEVEL" | shasum | cut -c1-12)

# Locate this repo's plugin cache. CLAUDE_PLUGIN_DATA is set in hook
# subprocesses but NOT in the skill's bash env, so glob the standard
# Claude Code plugin-data dirs and fall back to the legacy cache path.
CACHE_DIR=""
for D in \
    ${CLAUDE_PLUGIN_DATA:+"$CLAUDE_PLUGIN_DATA/cache/$REPO_HASH"} \
    "$HOME/.claude/plugins/data"/debt-ops*/cache/"$REPO_HASH" \
    "$HOME/.cache/debt-ops/cache/$REPO_HASH"; do
  [ -d "$D" ] && { CACHE_DIR="$D"; break; }
done

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

If the file is missing or empty, tell the user the hooks haven't fired yet in this repo and stop.

2. The log format

One JSON object per line, three event shapes:

  • {"event":"edit","file":"...","registry_count":N,"ts":"..."} — every agent edit
  • {"event":"feedback","file":"...","result":"pass|fail","ts":"..."} — every quality-check fire
  • {"event":"session","registry_count":N,"adr_count":M,"ai_authored_count":K,"ts":"..."} — start of each session

Timestamps are ISO-8601 UTC.

3. Compute the tripwires

Filter to the last 7 days. Then compute:

  • Edits / sessions — counts of event:edit and event:session.
  • Registry growth — last registry_count minus first (across either edit or session events). >0 means Discipline 1 is firing.
  • ADR growth — last adr_count minus first (session events only).
  • AI-authored share trend — first vs. last session percentage (ai_authored_count / registry_count, when registry_count>0).
  • Feedback pass ratecount(result:pass) / count(event:feedback).
  • FAIL → PASS rate — for each feedback event with result:fail, look at the next feedback event for the same file. Count those that flipped to pass. Divide by total fails. Below 50% means Claude isn't reliably acting on hook output — the architectural alarm bell.

Read the full file on GitHub · 92 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. 5d ago First seen · 92 lines · 72 tokens per session scan A e801584fcc19

Subscribe to this mod's changes

metrics is a skill published in the GitHub repository bcanfield/agentic-tech-debt (8 stars, last pushed today), licensed MIT. It adds 72 tokens to every session and 972 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.

Related

Other skills, from other repositories

codex-thread-orchestration

Use when running Arcgentic V2 in Codex and the current thread must orchestrate fixed Planner, Developer, Test, and Auditor role threads.

Arch1eSUN/Arcgentic · 37 tokens

claude-code-session-broker

Use when running Arcgentic V2 in Claude Code and fixed Planner, Developer, and Auditor role sessions must be coordinated through a broker.

Arch1eSUN/Arcgentic · 35 tokens

arcgentic

Use when the user says Arcgentic, asks to use Arcgentic, or wants an idea taken through a complete plan → development → self-audit → external audit workflow in Codex.

Arch1eSUN/Arcgentic · 43 tokens

audit-round

External-audit role for arcgentic rounds. Loaded when arcgentic state.yaml is in awaitingaudit or auditinprogress, OR when the user explicitly requests an external audit of a finished round, OR when reviewing a handoff doc + commit chain against the round's declared scope. Produces a PASS / NEEDSFIX / AUDITINCOMPLETE…

Arch1eSUN/Arcgentic · 117 tokens

orchestrate-round

Main-session orchestrator for arcgentic rounds. Use when in single-session mode, when a project-level session mode must drive dispatch order, or when manually advancing the state machine. Dispatches role sub-agents, verifies structured outputs, and owns PASS-only close-round execution.

Arch1eSUN/Arcgentic · 60 tokens

using-arcgentic

Entry skill for the arcgentic plugin — establishes the four-role workflow (planning / dev+self-audit / external-audit / reference-tracking), the round state machine, and when to switch roles or dispatch sub-agents. Use when starting any session in a project that has .agentic-rounds/state.yaml present, OR when the user…

Arch1eSUN/Arcgentic · 91 tokens