metrics
Skill2 starsChanged 34 days agoMITView on GitHub
Mine transcript data for the current repo and report token usage, cost, cache performance, and model-routing recommendations. Triggers — "craft:metrics", "show usage metrics", "mine transcripts", "report token cost", "usage report for this repo".
21 other projects use a version of this.
Adopted by
Most recently taken up by
- zedarvates/frugal-skillstheir own version, first seen Nov 8, 2026
- AsiaOstrich/EngramGraphtheir own version, first seen Nov 8, 2026
- SatanshuMishra/interphasetheir own version, first seen Nov 1, 2026
- hiper2d/werewolf-ai-party-gametheir own version, first seen Nov 1, 2026
- AsiaOstrich/universal-dev-standardstheir own version, first seen Nov 1, 2026
- vijaysuperpositionist/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use docgen, knowledge-graph and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
prsolansSkilldocgen
Generate professional contract/agreement PDFs (and .docx CLM templates) from a declarative YAML config using the yaml-doc-generator tool ("docgen"). Use this whenever the user wants to create, manufacture, or mock up agreement documents — an MSA, NDA, SaaS/subscription agreement, amendment, exhibit, SOW, renewal notice, loan/credit agreement, fund/investment doc, BAA/DPA, government contract, or a whole document FAMILY between named parties — especially demo/test documents to load into Docusign Navigator/CLM or to feed an agreement-lifecycle agent. Triggers include "generate an MSA/NDA/agreement", "make demo contracts", "create a document family for <party> and <party>", "use docgen", or "use the yaml-doc-generator". Produces real PDFs with parties, clauses, and a manifest of critical dates (renewal/expiration).
Also in 3 projects that use this
ddehartSkillknowledge-graph
Search, capture, and query the claude-code-plugins knowledge graph. Use when asked to "capture this", "add this to the graph", "what do we know about X", "update the graph", "check the graph for X", or when a decision, pattern, or non-obvious fact surfaces mid-session that's worth recording. Also: "log an observation", "what patterns do we have about skill triggering", "any decisions on the knowledge-commons plugin", "what do we know about the commit-creator agent".
Also in 3 projects that use this
rajnavakotiSkillscan
Run the AI dashboard scanner and generate the HTML report.
Also in 3 projects that use this
MicrosoftSkillretrospective
Review how work went and improve the next round. USE WHEN asked for a retro, delays, or process lessons. DO NOT USE for code review or transcript replay.
Also in 3 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 3 projects that use this
BlockSkillplan
Draft a TDD, PRD, or lightweight plan in the conversation without committing it.
Also in 5 projects that use this
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- google-gemini/gemini-cli★ 109ksame name
- ZimoLiao/scholaraio★ 585same name
- menkesu/awesome-pm-skills★ 441same name
- ai-analyst-lab/ai-analyst★ 304same name
- AsiaOstrich/universal-dev-standards★ 84same name
- BULDEE/ai-craftsman-superpowers★ 35same name
- hiper2d/werewolf-ai-party-game★ 21same name
- ariaxhan/kernel-claude★ 15same name
- The-Utopia-Studio/skills★ 6same name
- AsiaOstrich/EngramGraph★ 4same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- architectureSkill
- decisionsSkill
- designSkill
- documentationSkill
- impact-triageSkill
- implementationSkill
- initSkill
- integrateSkill
- lessonsSkill
- planningSkill
- promote-configSkill
- proposeSkill
- pruneSkill
- refactoringSkill
- requirementsSkill
- reviewSkill
- runSkill
- tuneSkill
- validationSkill
- workspaceSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Before invoking the miner, confirm the environment and resolve where transcripts would live.
- Distinctive: line 35
If the test fails, surface a diagnostic and stop — the plugin installation is incomplete.
- Distinctive: line 50
Run the miner with zero arguments (or forward any flags the user explicitly supplied):
- Distinctive: line 96
Never refresh to silence an *uninvestigated* drift flag — that converts the alarm into the regression.
- Distinctive: line 103
After the bin exits 0, report:
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
craft:metrics — usage-telemetry front door
Standalone session-owned skill. You (the session) probe the current repo's transcript directory, invoke the miner, and report the output paths. No worker agent is spawned. This skill is ADVISORY — an absent, empty, or malformed transcript directory produces a recorded no-op and exits 0; it is never a blocker.
Input: $ARGUMENTS (zero-argument; optional pass-through flags accepted if the user supplies
them — see Step 1).
Shell entry:
scripts/mine-transcripts.shis a shell convenience wrapper around the same miner for direct terminal use (e.g.bash scripts/mine-transcripts.sh). It is equivalent to invoking this skill but bypasses the skill preamble checks.
Preamble — read-only probe
Before invoking the miner, confirm the environment and resolve where transcripts would live.
1. Plugin root
Confirm ${CLAUDE_PLUGIN_ROOT} is set and the entrypoint exists:
test -f "${CRAFT_ROOT:-${CLAUDE_PLUGIN_ROOT}}/engine/bin/usage-mine.js"If the test fails, surface a diagnostic and stop — the plugin installation is incomplete.
2. Transcript directory
The miner resolves the transcript directory for the current working directory internally
(cwd → dashes mapping). You do not need to construct or validate the path yourself.
An absent or empty directory is within the miner's advisory contract — it writes a
no-data report and exits 0. Never abort the skill on a missing directory.
Procedure
Step 1 — Mine
Run the miner with zero arguments (or forward any flags the user explicitly supplied):
node "${CRAFT_ROOT:-${CLAUDE_PLUGIN_ROOT}}/engine/bin/usage-mine.js"Optional flags (pass through verbatim when the user supplies them):
| Flag | Purpose |
--dir <path> | Override the resolved transcript directory |
--baseline <path> | Baseline report for delta comparison and drift detection — e.g. the committed docs/contributing/metrics-baseline.report.json snapshot |
--threshold <n> | Relative-delta threshold for the drift signal (default 0.25); only used when --baseline is also supplied |
--since <date> | Restrict to transcripts on or after this date |
--prices <path> | Custom pricing table (JSON) |
--no-inline | Exclude the main-loop usage group (included by default) |
Passing --baseline docs/contributing/metrics-baseline.report.json compares the current run against the
committed snapshot: report.json gains a drift array flagging any (phase, dimension) pair
whose per-occurrence mean token cost or duration moved beyond --threshold relative to the
baseline's mean — corpus-size-invariant, so re-mining a grown corpus is not drift; a phase
with no baseline activity carries a null delta (rendered "new") — and report.md gains a
"Phases drifted since baseline" section when any phase drifted. This is a prompt-regression
signal only — advisory, never a gate (see error semantics below).
The bin writes two artefacts inside the repo and exits 0 in all handled cases:
report.json— machine-readable usage summary (consumed bycraft:tuneand by the workflow-improvement loop)report.md— human-readable narrative (cache performance, cost breakdown, model-routing recommendations)
Refreshing the committed baseline
docs/contributing/metrics-baseline.report.json is the drift reference. Refreshing it is a
deliberate, reviewed act — never a side effect of running the miner:
- Refresh when the prompt surface changed on purpose — a run that edited
skills/oragents/lands with intentionally different per-phase economics, and drift measured against the pre-change baseline would flag the intended shift forever. The integrate phase offers this step when the merged run touched those paths. - Re-mine over the full transcript corpus, then copy
report.jsonoverdocs/contributing/metrics-baseline.report.jsonand commit it in the same PR/change that altered the prompts (chore(metrics): refresh drift baseline), so the diff review sees old-vs-new economics side by side. - Never refresh to silence an uninvestigated drift flag — that converts the alarm into the regression.
Done
After the bin exits 0, report:
- Artefact paths:
report.jsonandreport.md(relative to the repo root) - One-line summary: surface the cache-creation hotspot and the top model-routing
recommendation read from the bin's stdout or from
report.json(e.g. "Highest cache-creation overhead:implementationphase — consider an explicit checkpoint. Top recommendation: routereviewerto a lighter model tier.")
Downstream consumers of report.json:
- Workflow improvement — review the cache and cost breakdown to tune phase ordering, checkpoint placement, and model-routing hints across the craft pipeline.
craft:tune— the tuner readsreport.jsonto propose model-routing, skip, and turn-budget patches to an existing named manifest.
Error semantics
| Condition | Behaviour |
| Absent transcript directory | Advisory no-op: miner writes a zero-data report, exits 0; skill reports the no-data report paths and continues |
| Empty transcript directory | Same as absent — recorded no-op, exit 0 |
| Malformed transcript files | Miner skips unparseable entries; exits 0 with a partial report; skill surfaces a warning from the bin's stderr and reports the partial paths |
--dir path out of bounds | Miner enforces path containment, writes a no-data report, exits 0; skill reports the paths and continues |
| Plugin root missing | STOP; surface "engine/bin/usage-mine.js not found — check CLAUDE_PLUGIN_ROOT"; do not invoke the bin |
| Bin stderr output | Surface stderr diagnostic as a warning; report what artefacts are available and continue — the miner always exits 0 |
--baseline absent or unreadable | Drift is advisory: report.drift is empty and no "Phases drifted" section is rendered; exits 0 and continues — never a gate |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

