skill-usage-report
Skill396 starsChanged 6 months agoMITView on GitHub
Engine half of the skill-usage telemetry loop (owner spec 2026-07-19: "show when the skill is last used, and how many times… recommend disable, or user would disable themself"). Cloud half: AU#93 (skill_usage rollup + POST /api/skills/usage + last-used in the assignments GET). Two pieces, both offline-first and fail-open: 1. hooks/log-usage.py — a PostToolUse hook on the Skill tool. Appends {"slug","ts"} to <workspace>/state/skill-usage-log.jsonl on every skill invocation. Never blocks, never fails the invocation. Registered in the core's settings.json with "async": true…
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- FlorianBruniaux/cc-skill-usagetheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- FlorianBruniaux/cc-skill-usage★ 8same name
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 repository73 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-activitySkill
- agent-registrySkill
- agent-room-opsSkill
- answer-formatSkill
- audio-transcribeSkill
- bee-actionsSkill
- bot2bot-postSkill
- call-diagnosticsSkill
- claude-codexSkill
- claude-geminiSkill
- claude-piSkill
- claude-routerSkill
- collaboration-intelligenceSkill
- connect-appsSkill
- context-dropSkill
- context-reconstructSkill
- db-browserSkill
- deal-finderSkill
- doc-ingestSkill
- electron-overlay-dimmingSkill
- email-findSkill
- engine-conflict-resolveSkill
- gemini-ttsSkill
- image-generationSkill
- import-claude-contextSkill
- local-workspace-serverSkill
- macos-toolsSkill
- macos-useSkill
- make-viral-videoSkill
- marketplaceSkill
- media-transcriptSkill
- meeting-prepSkill
- meeting-schedulerSkill
- mention-gateSkill
- model-switchSkill
- morning-briefingSkill
- ms365-connectSkill
- observeSkill
- obsidian-vaultSkill
- openai-ttsSkill
- open-sutando-refSkill
- overlay-appsSkill
- phone-conversationSkill
- proactive-loopSkill
- pr-shepherd-contractSkill
- quota-trackerSkill
- regression-searchSkill
- relaySkill
- releaseSkill
- report-feedbackSkill
- review-preflightSkill
- room-collabSkill
- schedule-cronsSkill
- screen-companionSkill
- screen-recordSkill
- self-diagnoseSkill
- self-upgradeSkill
- session-recapSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Run on a gated sub-daily cron (crons.json):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
skill-usage-report
Engine half of the skill-usage telemetry loop (owner spec 2026-07-19: "show
when the skill is last used, and how many times… recommend disable, or user
would disable themself"). Cloud half: AU#93 (skill_usage rollup +
POST /api/skills/usage + last-used in the assignments GET).
Two pieces, both offline-first and fail-open:
hooks/log-usage.py— aPostToolUsehook on theSkilltool. Appends{"slug","ts"}to<workspace>/state/skill-usage-log.jsonlon every skill invocation. Never blocks, never fails the invocation. Registered in the core'ssettings.jsonwith"async": true— this is a fire-and-forget usage logger, so it must run off the Skill critical path (async keeps interpreter startup + file I/O out of every skill invocation's latency):Resolve that settings file through the path helper rather than a literal home-relative path — the core config dir is configurable per clone, and on a packaged install it is not under
$HOMEat all:SETTINGS="$(bash scripts/sutando-config.sh claude-sutando-config-dir)/settings.json"{"PostToolUse": [{"matcher": "Skill", "hooks": [{"type": "command", "async": true, "command": "python3 '<repo>/skills/skill-usage-report/hooks/log-usage.py'"}]}]}scripts/report-usage.py— drains the log, aggregates per slug, and POSTs one batched report ({agentId, events:[{slug,count,lastUsedAt}]}).agentId=$AGENT_MXID(the ag2space identity — same key the EquipPanel and assignments API use).- Bearer from vault key
AG2_CLOUD_TOKEN. - Cloud origin is declared in
manifest.json'sconfigblock (the config-only manifest convention — seeskills/MANIFEST.md), not invented as an env-only setting. Resolution order is$AG2_CLOUD_ORIGIN override > manifest default > CLOUD_FALLBACK, so the manifest is the single place to change the default. - Rename-before-POST so events arriving mid-report are never lost; fold-back on failure so nothing is dropped. Always exits 0.
Run on a gated sub-daily cron (crons.json):
The cron needs
AGENT_MXIDin the environment. Read it from the channel env under the resolved core config dir — never a home-relative literal, which is wrong on any clone that configures the config dir elsewhere:{"name": "skill-usage-report", "cron": "*/30 * * * *", "prompt": "Run: bash scripts/cron-gate.sh skill-usage-report env $(grep AGENT_MXID \"$(bash scripts/sutando-config.sh claude-sutando-config-dir)/channels/ag2space/.env\" 2>/dev/null) python3 skills/skill-usage-report/scripts/report-usage.py — drains the local skill-usage log to AU (AU#93). Deferred when owner tasks are queued."}
Expected behavior before equips exist
The cloud endpoint only accepts usage for skills currently equipped to
this agent (skill_assignments row for (user, agent, skill)) — everything
else counts as skipped in the response. Until the owner equips skills to
this agent's mxid, reports will be all-skipped; the local log still drains.
This is by design (unequipped usage is meaningless for the prune-unused
feature and would accumulate junk rows).
Iteration log
- v0.1.0 — 2026-07-19 — initial ship alongside AU#93. Slug is taken from the
Skill tool's input (
skillparam), bare-name-normalized (stripsplugin:/path-scope prefixes). Local log is the offline-first buffer; the reporter is idempotent-safe to re-run (server folds counts additively and uses GREATEST on timestamps, so a duplicated batch inflates counts but can never move last-used backwards; the rename-claim makes duplicates unlikely). - v0.1.1 — 2026-07-19 — review fixes (PR #2180 blocking findings): (1)
pending-only recovery — a crash between the rename-claim and fold-back left
.reportingwith no active log; the next run then crashed onlog.open. Recovery now renames pending back when the active log is absent. (2) >100 distinct slugs were silently dropped (aggregate sliced to MAX_EVENTS but the claimed file was deleted whole). Reports now send in chunks of 100; on mid-run failure the unsent remainder is folded back into the active log as count-carrying records ({"slug","ts","count"}— the aggregator honorscount), so nothing is ever lost.
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.

