/kit:statsfrom kit
Queries and renders ledger state including kit runs, waived gates, telemetry, and token costs. Proposes backlog rows from anomalies. Read-only except for anomaly proposal staging.
Ships in kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read-only, agent-callable observability over the ledgers devkit and its
neighbors (tide, tg-cleanup, learned-ledger) already write. The tool dir is
~/workspace/<owner>/dwarves-kit/lib/stats (run uv run stats <cmd>
there). Everything is read-only: the CLI never writes back to a source ledger; there
is no path through this skill that mutates anything.
Covers the ledgers stats reads: the devkit gate/proof/telemetry corpus, tide file-move state, tg-cleanup snapshots, the learning ledger. Additional trigger phrases: "waived gates", "telemetry", "how much am I spending on tokens", "kit runs", "kit lane telemetry", "ledger status", "render the ledger", "ledger dashboard", "share this as an artifact" (mid-ledger-conversation), "are my waived gates over threshold", "propose a backlog row from the ledger state".
Drives the read-only stats CLI (dwarves-kit/lib/stats) and renders the result as EITHER an in-terminal reply (bot-reply-formatting, tables + bar-fills) or a shareable web Artifact, both from the same one query; stats anomalies is the feedback-loop path, PROPOSE-only (stages a cc-backlog candidate, never files a board row). READ-ONLY by hard contract over every source ledger, the CLI never writes back to a source ledger; the one exception is stats anomalies --propose, whose ONLY write is the gitignored cc-backlog staging buffer.
For ad-hoc SQL exploration, drive stats query/stats show directly; this skill is the rendered-answer path. There is no persistent TUI/app or daemon here, only an on-demand agent-driven query + render + propose.
stats CLINever re-derive a ledger reading by grepping ~/.local/state/dwarves-kit/logs/ or
tide's sqlite or tg-cleanup's json yourself , that is a second, divergent data
source and breaks the whole point of the lens (the understanding-gate work already reuses
lane-telemetry for the kit read; re-implementing it here would drift). Always go through stats.
| The operator wants | Command |
|---|---|
| "show me the ledger state" / "kit runs" / "kit lane telemetry" | stats render kit_runs --surface terminal |
| "my waived gates" / "how many gates did we waive" | stats anomalies (the waived_gates anomaly checks SUM(kit_runs.gates_ovr) against waived_gates_max). This is waived gates only, never understanding debt: that lives in the | DEBT | ledger lines (bin/reflect debt list). For the raw numbers behind it, stats query "SELECT rid, gates_ovr FROM kit_runs WHERE gates_ovr > 0" --surface terminal |
| "any ledger anomalies" / "should I propose anything" | stats anomalies (report only) or stats anomalies --propose (stage a candidate row per fired anomaly into the cc-backlog staging buffer; never files a board row) |
| "is the pipeline ceremony" / "gate work vs what shipped" / "dispatches and tokens per run" | stats ceremony (add --json, --from/--to or --since-sha to compare windows); the ceremony_share anomaly shows in stats anomalies |
| "telemetry" (tide moves) | stats render tide_moves --surface terminal |
| "token cost" / "how much am I spending on tokens" | stats render tide_tier_b_calls --surface terminal (per-call cost/token rows); for a spike check specifically, stats anomalies |
| "ledger status" / a quick glance at everything | stats tables first (row counts per table), then render the table the operator actually cares about |
| "render the ledger" / "ledger dashboard" / "share this as an artifact" | the same render command with --surface artifact --out <tmp path>.html, then call the Artifact tool on that file |
| an ad-hoc cross-ledger question ("which runs correspond to which tide moves") | stats render --query "<read-only SQL JOIN>" --surface terminal |
Full table list + schema: lib/stats/README.md. stats tables also
lists what's materialized right now.
--surface terminal. This prints a bot-reply-formatting-shaped fenced code-block
table (right-aligned numerics, a bar-fill column for any *_pct/*_rate/*ratio*
column) , paste that output directly into your reply, do not re-summarize it into
prose first.--surface artifact --out <tmp-path>.html, then call the Artifact tool on the written file (self-contained
HTML, CSP-safe, no external requests , the file already satisfies the Artifact tool's
contract as-is).stats render
invocation, one row set); there is no divergent second read between them.--surface artifact for those rather than fighting the terminal table's width.cd ~/workspace/<owner>/dwarves-kit/lib/stats
# Quick look: "show me the ledger state"
uv run stats render kit_runs --surface terminal --limit 10
# Share: "send me the token-cost breakdown as an artifact"
uv run stats render tide_tier_b_calls --surface artifact --title "Token cost" \
--out /tmp/ledger-token-cost.html
# then: call the Artifact tool on /tmp/ledger-token-cost.html
# Ad-hoc cross-ledger question, terminal surface
uv run stats render --query \
"SELECT k.repo, count(*) AS n FROM kit_runs k GROUP BY 1 ORDER BY n DESC" \
--surface terminal --title "Runs per repo"
# Feedback loop: "any anomalies? propose a backlog row if so"
uv run stats anomalies --propose
If the db has never been built on this host, stats render (like show/query)
lazy-rebuilds from the source files first (existing lane-telemetry behavior, unchanged here); no extra
step needed.
This skill's canonical source is this file (skills/stats/SKILL.md; relocated
from lib/stats/skill/ -- at the old subsystem-internal
path it never installed, because install.sh globs skills/*/SKILL.md only).
It now installs automatically on both install paths (bash installer + plugin),
same as get-api-docs and skill-review. No symlink step needed; edit the
in-repo file.
stats anomalies --propose's only write is the
gitignored cc-backlog staging buffer, never a ledger, never a board).stats query/ledger show directly; this skill is the rendered-answer path, not a SQL console.stats anomalies --propose only STAGES a candidate;
promoting it to _meta/BACKLOG.md still goes through the existing board promote
human gate (ex add-backlog), same as any other cc-backlog candidate.stats anomalies' home field is a static per-detector guess, not derived from
data; waived-gates/misfire sums are GLOBAL across every repo in kit_runs, and ~44% of
kit_runs rows carry repo = "?" (unattributed) as of this writing. Treat a fired
anomaly's "home" as a starting guess for the operator to confirm, not a fact.state.sqlite on this host) reads identically to a
present-but-empty one; stats tables/anomalies cannot currently tell you which.
Full list + the other two (schema double-definition, lane-telemetry coupling):
lib/stats/README.md "Known tradeoffs".What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub consolelabs/devkit --plugin kit14 skills in this plugin
/backlog-reconcileUse to audit a repo's `_meta/BACKLOG.md` Active queue against reality, "audit the backlog", "reconcile the board", "is the board still true", "dọn backlog", "rà soát backlog", or a scheduled backlog-reconcile run. NOT for filing new items onto the board, NOT for a single known-stale row (just fix it), NOT for the kit's own FEATURES/workflow-paths pair (topology-drift)./ci-driftUse for the whole-estate CI audit, "audit the CI", "are the runners clean", "check the release pipeline", "ci drift", "stale workflows / secrets / runners", or a scheduled CI-audit cadence run. NOT for one failing run (/kit:debug), NOT for doc prose (doc-drift)./doc-driftUse for the whole-estate doc audit, "run the doc-drift loop", "audit the docs against the code", "are the docs still true", "doc drift sweep", "check every doc claim", or a scheduled doc-audit cadence run. NOT for diff-scoped doc sync inside a build cycle (/kit:docs), NOT for dated records like specs, research, retros, NOT for one known-wrong doc (just fix it)./gauntlet-proof-auditUse to audit the gauntlet records, "are the ROUNDS.md records honest", "verify the proof corpus", "check each run record against its evidence", "audit the gauntlet corpus", "is the gauntlet proof trustworthy", or a scheduled run. NOT for re-running probes or rounds (`/kit:gauntlet` itself), NOT for the corpus-level stats projection (`lib/gauntlet/stats.sh`), NOT for non-gauntlet records./get-api-docsFetch curated API documentation using Context Hub (chub) before coding against any external API. Use when the task involves calling a third-party API (Stripe, OpenAI, Airwallex, Notion, etc.) to prevent hallucinated parameters and deprecated endpoints./loop-engineeringUse to design or add a new bounded loop to the kit's SDLC orchestration ("design a new loop", "is this worth a loop"), or mentions the Karpathy loop / autoresearch / hill-climb / search-and-select prompt or parameter tuning. NOT for a one-off in-session Stop-hook goal (use goal-craft), NOT for the debug loop (already exists, use /kit:debug), NOT for building the loop's actual code.Other plugins' skills for the same job