stats

A read-only report command for CoalWash that shows the project’s current resource-use band, break-even points, memory score, pending question state, and latest run trace.

In plain words
What is it for?
It is for checking CoalWash measurements, inherited settings, break-even figures, pending asks, and details from the most recent run.
Why use it?
It measures the project’s current state in one report, including how much loaded material is estimated to use and where excess content may exist.

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/thecolliery/coalwash/stats
Clone the repo
git clone --depth 1 https://github.com/TheColliery/CoalWash
Per session 38 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,540 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.00038 $0.01540
Opus 5 $0.00019 $0.00770
Sonnet 5 $0.00008 $0.00308
Haiku 4.5 $0.00004 $0.00154

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

Security

Grade A, and why

stats 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 2d 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/stats.md · 22 lines

How it starts

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

Produce the CoalWash stats report for this project, in the user's language. Tables only, minimal prose. Read-only measurement — the ONE exception is named below, and it is always observed BEFORE it can happen.

First, look at the transaction dir [project]/.claude/coalwash/ directly (a plain listing) for a journal.json — a dangling prior run, and it must be OBSERVED here before the next step can resolve it. Then run the gauge — the one-shot CLI from the engine scripts/lib/: node "[LIB]/cli.mjs" gauge --json (discover + measure + verdict + break-even, PLUS a recovery preflight that writes ONLY if the journal you just checked was there — never hand-compose the lib calls) — plus the state file ~/.claude/projects/<slug>/coalwash/state.json, and show:

  • Gauge: current band (LEAN/OBESE/FULL) · always-loaded footprint ~tok/session (label ~est) · Memory-BMI — informational only, footprint/measured-muscle, n/a if muscle is 0 — plus the certain-fat ~tok figure (mechFatFromText: exact-duplicate substance lines + excess blank runs; a lower bound — unread/unprovable content counts as muscle).
  • Inherited governance (from the gauge's inherited field, when non-zero): the per-session cost of governance files loaded from ABOVE this project — an umbrella CLAUDE.md and its imports. Show it as its own ~est figure and label it plainly: real context cost this project pays every session, deliberately outside its own footprint, BMI and band, because it is not this project's to wash or externalize. Zero/absent → omit the line. Never present it as reclaimable here.
  • Fat reading: the certain-fat ~est tokens measured this gauge (muscle = footprint minus that figure) · when the band is OBESE or FULL, the break-even payback numbers for BOTH halves FULL requires — (a) cutting the certain fat: fat/day at the stamped session rate · one-run cost · break-even days, and (b) reorganizing the RE-TIER envelope's demotable index mass, when one is configured: its own fat/day · break-even days. A store with certain fat but nothing demotable shows (a) only.
  • Adjudication rate (board #120 — the one direction nothing measured): false DELETES have two guards (the fidelity gate, the claim-strength outsider); false KEEPS had none, and no surface reported how often this tool actually cuts. Read it from data that already persists, no new state required — [project]/.claude/coalwash/keeps.json (the durable reject log: one {target, reason, date} per adjudicated keep) against the two bin manifests [project]/.claude/coalwash/fat-bin/index.json and .../store.old/index.json (one entry per banked cut, each carrying bytes and an origin of program-cut or wizard-cut). Show: keeps count + the oldest keep's date (a keep never expires and is never re-flagged absent new evidence, so an old one is a decision nobody has revisited) · cut count and total bytes per bin, split by origin · and the resulting rate as N kept / M cut. Counts and byte figures are deterministic — do NOT label them ~est. Name the floor honestly rather than reporting the count as lifetime truth: a bin is retention-bounded, so items swept past their horizon have left the index and the bin count is a LOWER BOUND on cuts ever made; the destroyed ones are in that bin's death.log, so cite it when the rate is being read as history rather than as current state. No keeps.json and no bin dirs → omit the line entirely; a store that has never been adjudicated has no rate, and printing 0 / 0 would read as a finding.
  • Lean floor (legacy, historical only): the leanFloorTokens/leanFloorAt fields, if ever stamped — no gauge has read them for the band since task #4 (1.0.0); show value + stamp date, or "never stamped", never as a live threshold.
  • Pending ask: an unconsumed band crossing awaiting the next Stop (which band, since when), or none — CoalWash asks once per crossing, never a repeating nag; there is no time-based snooze.
  • Sub-spawn bill (the 0o true-bill): from the project's state entry, subSpawns + subParcelTokensAccum — "subs this session: N spawns ≈ X tok parcel (~est)" (every sub spawned from this room re-carried the room's always-loaded parcel; the meter counts silently at the spawn site — main — since hooks never fire inside subs). Zero/absent → OMIT the line entirely, never print "0 spawns".
  • Last run: newest snap-[timestamp]/ in the transaction dir (= the last apply's snapshot, with date) and whether the pre-gauge check above found a dangling journal.json (an interrupted run). If it did, read the gauge's recover field and say which it is: resolved (rolled-back / cleaned / no-mutation — the gauge's one write exception did its job, nothing further needed) or UNRESOLVED and kept for you (partial, or none carrying an error — quote the error verbatim; the journal and snapshot are deliberately preserved, and a new /coalwash run writes its own journal at that same path and would overwrite it, so recommend reading it rather than re-running). No transaction dir → no run recorded.
  • Class-A estate (P1, report-only — COALWASH_BLUEPRINT.md §19): run node "[LIB]/cli.mjs" estate --json and show total estate size (this project's CC session transcripts + tool-results/subagents/other overflow) · the per-type byte rollup · the heuristic ~est reclaimable figure (entries older than the retention horizon) · machine-wide orphan-slug-dir count + bytes if any (a slug whose owning project path no longer exists — candidates, not confirmed). Byte figures are deterministic; the reclaimable figure is ~est, always labeled. This is MEASUREMENT ONLY — nothing is deleted, archived, or edited; name the honest ceiling verbatim: "P1 = report-only; P2 (retention/archive/restore) runs only through the estate wizard commands, never this read-only path." No estate found → omit the section entirely, never print a zero-line.

Read the full file on GitHub · 22 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. 2d ago First seen · 22 lines · 38 tokens per session scan A 23e3111ec172

Subscribe to this mod's changes

stats is a command published in the GitHub repository TheColliery/CoalWash (11 stars, last pushed 3d ago), licensed Apache-2.0. It adds 38 tokens to every session and 1,540 once invoked, about $0.0002 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-30.