[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71J46ZWT1EEZB2BJP69N27D":3,"skill-same:01M71J46ZWT1EEZB2BJP69N27D":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M71J46ZWT1EEZB2BJP69N27D","skill-metrics",null,"Aggregates the local observability event log (~\u002F.agents\u002Fobservability\u002Fevents.jsonl) and presents, read-only, per-skill invocation counts and notable events (fallback \u002F HITL rejection \u002F loop cap reached \u002F abort). Fires on \"show me the skill metrics,\" \"aggregate the observability results,\" \"which skills get used the most?\" Does not send anything.","ozzy-labs\u002Fskills","ozzy-labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F246109093?v=4","01M6H0M2K2PZXHWNHJJTWY20FY","01M71J2B6FZ5KPEXPR5VS1TX7Z",0,"MIT","https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fskill-metrics\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"metrics","skill metrics","results","cap","me","jsonl","log","show me","loop","only","local","send","aggregates","event","read-only","get","show","which","event log","observability","2026-11-10 10:12:30",false,"---\nname: skill-metrics\ndescription: Aggregates the local observability event log (~\u002F.agents\u002Fobservability\u002Fevents.jsonl) and presents, read-only, per-skill invocation counts and notable events (fallback \u002F HITL rejection \u002F loop cap reached \u002F abort). Fires on \"show me the skill metrics,\" \"aggregate the observability results,\" \"which skills get used the most?\" Does not send anything.\n---\n\n# skill-metrics - Aggregation and presentation of skill measurements\n\nAggregates the events accumulated by `skill-observability` in `~\u002F.agents\u002Fobservability\u002Fevents.jsonl`, and presents, read-only, **per-skill invocation counts + notable events**. The \"aggregation layer\" of the improvement loop.\n\n## Principles\n\n- **Read-only, no sending**: Only reads and presents events. Does not send externally, file issues, or edit files (except writing out a snapshot). Reflection (turning things into issues) is `lessons-triage`'s responsibility.\n- **Count-based reasoning + small-n guard**: Because a single author's low frequency doesn't reach statistical significance, **a rate is presented only when the denominator is at or above `min_n`** (default 5, overridable via env `SKILL_METRICS_MIN_N`). Below that, only the count is shown, not a rate (preventing the misleading impression of \"1\u002F1 = 100% abort rate\").\n- **fail-open**: Returns an empty rollup without erroring, even if the log is absent or unreadable.\n- **Separation of concerns from health**: `health` covers repo state; `skill-metrics` covers skill behavior.\n\n## Input\n\nArguments (all optional):\n\n- `--since=\u003CISO 8601>`: aggregate only events from this time onward\n- `--skill=\u003Cname>`: aggregate only a specific skill\n- `--snapshot`: writes the rollup out to `~\u002F.agents\u002Fobservability\u002Fsnapshots\u002F\u003CYYYY-Www>.json` (creates a baseline for trend comparison; what's written is the raw aggregation with the derived `trend` field excluded = a pure baseline)\n\n## Trend comparison (week-over-week)\n\nOn each run, the engine reads the **latest snapshot from before this week** found in `~\u002F.agents\u002Fobservability\u002Fsnapshots\u002F` (a prior-generation baseline written by a past `--snapshot`), and loads the diff against the current rollup into the `trend` field (`trend: null` if there's no prior generation). `--snapshot` writes out this week's baseline, and **the next run compares against it as the prior week**.\n\n- **Count deltas are always presented**: per-skill `invocations_delta` (change in invocation count), `signals[\u003Cname>]` (change in friction signals). Increases\u002Fdecreases are shown with a plus\u002Fminus sign.\n- **Rate deltas inherit the small-n guard**: `abort_rate_delta` only produces a number when **both generations'** denominators are at or above `min_n` (each rollup's `abort_rate` is non-null). If either side has n\u003C`min_n`, it's `abort_rate_delta: null` + `abort_rate_delta_suppressed: true` (only the count delta is shown, not the rate).\n- `trend.baseline_week` \u002F `trend.baseline_file` indicate the comparison-target snapshot (ISO year-week, **filename only** — no HOME absolute path is included, continuing the privacy stance), and `trend.baseline_window` shows the prior generation's aggregation window.\n- If there's only one generation of snapshot, the snapshots dir doesn't exist, or it can't be read, `trend: null` (fail-open; normal rollup presentation continues).\n\n## Steps\n\n1. Run the `skill-metrics.mjs` **in the same directory as this SKILL.md** via Bash to obtain the JSON rollup (pass arguments through as-is). In Claude Code this is `~\u002F.claude\u002Fskills\u002Fskill-metrics\u002Fskill-metrics.mjs` (dogfood: `\u003Crepo>\u002F.claude\u002Fskills\u002Fskill-metrics\u002Fskill-metrics.mjs`):\n\n   ```bash\n   node \u003Cthis skill's directory>\u002Fskill-metrics.mjs [--since=...] [--skill=...] [--snapshot]\n   ```\n\n2. Format the resulting JSON into something human-readable and present it. At minimum, include:\n   - **window**: the aggregation period (since \u002F until), total event count, session count\n   - **Per skill**: invocation count (`invocations`) and channel breakdown (`by_operation`: `invoke_agent` \u002F `slash_command`). If outcomes exist, counts of completed \u002F aborted \u002F fallback. For the abort rate (`abort_rate`), when `abort_rate_suppressed: true`, note explicitly \"hidden due to n\u003Cmin_n (count only)\"\n   - **signals**: counts of notable signals (`review.deep_to_quick_fallback` \u002F `usage_guard.fail_open` \u002F `hitl.rejected` \u002F `loop.hit_cap`, etc.)\n   - **notable**: a list of friction events (fallback \u002F HITL rejection \u002F loop cap \u002F abort)\n   - **trend** (when `trend` is non-null): the week-over-week (vs. `baseline_week`) invocation-count delta (`invocations_delta`) and friction-signal delta (`signals`). When `abort_rate_delta_suppressed: true`, note explicitly \"rate delta hidden due to n\u003Cmin_n (count delta only).\" When `trend: null` (first generation, no baseline), note \"no prior-week snapshot (comparison available from next time)\"\n3. If the data is empty (`events: 0`), note \"no events accumulated yet — the SessionEnd hook for `skill-observability` may not be wired\" (for hook wiring, see `skill-observability`'s SKILL.md, \"Enabling the SessionEnd hook\").\n\n## Example presentation format\n\n```text\nskill-metrics (window: 2026-06-20 to 2026-06-29 \u002F 142 events \u002F 18 sessions \u002F min_n=5)\n\nPer-skill invocations:\n  drive    12   (invoke_agent 3, slash_command 9)   abort: hidden due to n\u003C5 (count only)\n  review    8   (slash_command 8)\n  ship      6   (slash_command 6)\n\nNotable signals:\n  usage_guard.fail_open        2\n  review.deep_to_quick_fallback 1\n\nnotable:\n  [signal] review \u002F review.deep_to_quick_fallback (2026-06-28T...)\n  [signal] drive  \u002F usage_guard.fail_open          (2026-06-27T...)\n\nTrend (week-over-week \u002F baseline: 2026-W25):\n  drive    invocations +4    abort rate delta: hidden due to n\u003C5 (count delta only)\n  review   invocations -1    abort rate delta: -0.10\n  signals: usage_guard.fail_open +2 \u002F review.deep_to_quick_fallback +1\n```\n\n## Notes\n\n- Does not read `.env` files.\n- Does not speculatively supplement beyond what's in the event log (count-based reasoning).\n- Does not send externally or file issues (reflection is `lessons-triage`'s responsibility).\n","# skill-metrics - Aggregation and presentation of skill measurements\n\nAggregates the events accumulated by `skill-observability` in `~\u002F.agents\u002Fobservability\u002Fevents.jsonl`, and presents, read-only, **per-skill invocation counts + notable events**. The \"aggregation layer\" of the improvement loop.\n\n## Principles\n\n- **Read-only, no sending**: Only reads and presents events. Does not send externally, file issues, or edit files (except writing out a snapshot). Reflection (turning things into issues) is `lessons-triage`'s responsibility.\n- **Count-based reasoning + small-n guard**: Because a single author's low frequency doesn't reach statistical significance, **a rate is presented only when the denominator is at or above `min_n`** (default 5, overridable via env `SKILL_METRICS_MIN_N`). Below that, only the count is shown, not a rate (preventing the misleading impression of \"1\u002F1 = 100% abort rate\").\n- **fail-open**: Returns an empty rollup without erroring, even if the log is absent or unreadable.\n- **Separation of concerns from health**: `health` covers repo state; `skill-metrics` covers skill behavior.\n\n## Input\n\nArguments (all optional):\n\n- `--since=\u003CISO 8601>`: aggregate only events from this time onward\n- `--skill=\u003Cname>`: aggregate only a specific skill\n- `--snapshot`: writes the rollup out to `~\u002F.agents\u002Fobservability\u002Fsnapshots\u002F\u003CYYYY-Www>.json` (creates a baseline for trend comparison; what's written is the raw aggregation with the derived `trend` field excluded = a pure baseline)\n\n## Trend comparison (week-over-week)\n\nOn each run, the engine reads the **latest snapshot from before this week** found in `~\u002F.agents\u002Fobservability\u002Fsnapshots\u002F` (a prior-generation baseline written by a past `--snapshot`), and loads the diff against the current rollup into the `trend` field (`trend: null` if there's no prior generation). `--snapshot` writes out this week's baseline, and **the next run compares against it as the prior week**.\n\n- **Count deltas are always presented**: per-skill `invocations_delta` (change in invocation count), `signals[\u003Cname>]` (change in friction signals). Increases\u002Fdecreases are shown with a plus\u002Fminus sign.\n- **Rate deltas inherit the small-n guard**: `abort_rate_delta` only produces a number when **both generations'** denominators are at or above `min_n` (each rollup's `abort_rate` is non-null). If either side has n\u003C`min_n`, it's `abort_rate_delta: null` + `abort_rate_delta_suppressed: true` (only the count delta is shown, not the rate).\n- `trend.baseline_week` \u002F `trend.baseline_file` indicate the comparison-target snapshot (ISO year-week, **filename only** — no HOME absolute path is included, continuing the privacy stance), and `trend.baseline_window` shows the prior generation's aggregation window.\n- If there's only one generation of snapshot, the snapshots dir doesn't exist, or it can't be read, `trend: null` (fail-open; normal rollup presentation continues).\n\n## Steps\n\n1. Run the `skill-metrics.mjs` **in the same directory as this SKILL.md** via Bash to obtain the JSON rollup (pass arguments through as-is). In Claude Code this is `~\u002F.claude\u002Fskills\u002Fskill-metrics\u002Fskill-metrics.mjs` (dogfood: `\u003Crepo>\u002F.claude\u002Fskills\u002Fskill-metrics\u002Fskill-metrics.mjs`):\n\n   ```bash\n   node \u003Cthis skill's directory>\u002Fskill-metrics.mjs [--since=...] [--skill=...] [--snapshot]\n   ```\n\n2. Format the resulting JSON into something human-readable and present it. At minimum, include:\n   - **window**: the aggregation period (since \u002F until), total event count, session count\n   - **Per skill**: invocation count (`invocations`) and channel breakdown (`by_operation`: `invoke_agent` \u002F `slash_command`). If outcomes exist, counts of completed \u002F aborted \u002F fallback. For the abort rate (`abort_rate`), when `abort_rate_suppressed: true`, note explicitly \"hidden due to n\u003Cmin_n (count only)\"\n   - **signals**: counts of notable signals (`review.deep_to_quick_fallback` \u002F `usage_guard.fail_open` \u002F `hitl.rejected` \u002F `loop.hit_cap`, etc.)\n   - **notable**: a list of friction events (fallback \u002F HITL rejection \u002F loop cap \u002F abort)\n   - **trend** (when `trend` is non-null): the week-over-week (vs. `baseline_week`) invocation-count delta (`invocations_delta`) and friction-signal delta (`signals`). When `abort_rate_delta_suppressed: true`, note explicitly \"rate delta hidden due to n\u003Cmin_n (count delta only).\" When `trend: null` (first generation, no baseline), note \"no prior-week snapshot (comparison available from next time)\"\n3. If the data is empty (`events: 0`), note \"no events accumulated yet — the SessionEnd hook for `skill-observability` may not be wired\" (for hook wiring, see `skill-observability`'s SKILL.md, \"Enabling the SessionEnd hook\").\n\n## Example presentation format\n\n```text\nskill-metrics (window: 2026-06-20 to 2026-06-29 \u002F 142 events \u002F 18 sessions \u002F min_n=5)\n\nPer-skill invocations:\n  drive    12   (invoke_agent 3, slash_command 9)   abort: hidden due to n\u003C5 (count only)\n  review    8   (slash_command 8)\n  ship      6   (slash_command 6)\n\nNotable signals:\n  usage_guard.fail_open        2\n  review.deep_to_quick_fallback 1\n\nnotable:\n  [signal] review \u002F review.deep_to_quick_fallback (2026-06-28T...)\n  [signal] drive  \u002F usage_guard.fail_open          (2026-06-27T...)\n\nTrend (week-over-week \u002F baseline: 2026-W25):\n  drive    invocations +4    abort rate delta: hidden due to n\u003C5 (count delta only)\n  review   invocations -1    abort rate delta: -0.10\n  signals: usage_guard.fail_open +2 \u002F review.deep_to_quick_fallback +1\n```\n\n## Notes\n\n- Does not read `.env` files.\n- Does not speculatively supplement beyond what's in the event log (count-based reasoning).\n- Does not send externally or file issues (reflection is `lessons-triage`'s responsibility).\n",{"name":5,"description":7},"main","db212a47efe751fa1c42bd76e61dbfd8328e5b10",".agents\u002Fskills\u002Fskill-metrics","https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills","https:\u002F\u002Fgithub.com\u002Fozzy-labs","2026-07-13 06:49:42",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add ozzy-labs\u002Fskills --skill skill-metrics",{"tool":55,"command":56},"bunx","bunx skills add ozzy-labs\u002Fskills --skill skill-metrics",{"tool":58,"command":59},"pnpm","pnpm dlx skills add ozzy-labs\u002Fskills --skill skill-metrics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fskill-metrics\u002FSKILL.md",true,[63,69],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"skill-metrics.mjs","SCRIPT","脚本",14341,"https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fskill-metrics\u002Fskill-metrics.mjs",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"SKILL.claude-code.md","REFERENCE","参考文档",724,"https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fskill-metrics\u002FSKILL.claude-code.md",[76,101,127,149,168,174],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":38},"01M71J6R63H4E6ZE6KMDM4CT85","verify","An integrated skill that runs the combined validation of build \u002F typecheck \u002F test \u002F lint in one shot. The `verify.mjs` engine auto-discovers validation commands via a discovery chain (AGENTS.md's 「検証」 section → package.json scripts → justfile\u002FMakefile\u002Flefthook → language heuristics), executes them serially with their source attached, and returns a result summary. If a higher-priority stage produces a hit, only that stage is executed (no crossing stages).","https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fverify\u002FSKILL.md",[],[78,83,84,85,86,87,88,89,27,90,91,92,93,94,95,96,97,98,99,100],"combined","heuristics","chain","repo","discovery","section","lefthook","auto","package","stage","Bash","one","lint","dry","engine","with","test","typecheck",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":38},"01M71J6JW7SAY9PDKAWHG3SJCR","usage-guard","Monitors Claude Code's Usage Limit (5-hour = Current \u002F weekly = Weekly), pauses work when it exceeds 95%, and automatically resumes once the reset restores headroom. Bundles an engine form that a caller such as drive Reads at a checkpoint, and a standalone form, `\u002Fusage-guard \"\u003Ccontinuation command>\"`, that guards arbitrary work. Claude-only (depends on the OAuth usage-rate endpoint + ScheduleWakeup).","https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fusage-guard\u002FSKILL.md",[],[108,109,110,111,112,27,113,114,115,116,117,118,119,120,121,122,123,124,125,126],"usage","usage guard","guard","weekly","standalone","guards","when","code","reset","work","command","at","rate","status","endpoint","as","continuation","form","limit",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":38},"01M71J6FRG119REA1G0S99Q4GZ","topics","Selects GitHub topic candidates by having the `topics.mjs` engine perform constraint validation, popularity measurement, broad+narrow \u002F singular-plural comparison, and hardcoded ozzy-labs conventions, then applies them via `gh repo edit --add-topic` following the policy's `externally-visible` gate (default batch-confirm). Scope is limited to use within ozzy-labs.","https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftopics\u002FSKILL.md",[],[129,134,135,86,136,137,138,139,140,141,142,93,143,144,145,96,97,146,147,148],"measurement","scope","policy","default","true","gh","plural","use","comparison","apply","candidate","batch","candidates","github","via",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":38},"01M71J6DC27P4FDSP10SDT2PSN","skill-observability","Defines the skill observability event contract (event.schema.json) and emit substrate (obs-emit.mjs). The SSOT for the measurement layer of the skill improvement loop. Referenced by other skills and hooks.","https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fskill-observability\u002FSKILL.md",[],[37,156,134,157,158,159,31,160,161,162,26,163,164,165,166,167],"skill observability","improvement","skill improvement","for","hooks","contract","schema","false","substrate","json","improvement loop","layer",{"skillNo":169,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":170,"categories":171,"keywords":172,"publishedAt":38},"01M71J6AYECH1J94RAZ49QZ19Y","https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fskill-metrics\u002FSKILL.md",[],[19,18,37,36,35,34,33,32,31,173,30,29,28,138,27,26,25,93,24,23],"iso",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":38},"01M71J68TD0QFATGW3BBZVCWA2","ship","Runs verification, commit, and PR creation all at once. An integrated pipeline that runs verify (build + type + test + lint) → commit → PR creation in sequence against the changes.","https:\u002F\u002Fgithub.com\u002Fozzy-labs\u002Fskills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fship\u002FSKILL.md",[],[176,181,182,99,183,184,78,185,186,187,119,188,189,190,138,191,93,192,95],"type","verification","changes","pr","creation","build","pipeline","read","sequence","grep","pr creation","commit"]