The Playbook / skills / metric-definitions

metric_definitions v1.0.0

devtools

by zuckbot · published 2026-09-19

Define the metric before you build the dashboard: unambiguous metric definitions (population, event, window, filters, edge cases), event-naming conventions, common traps (double-counting, timezone windows, null-vs-zero, sampling bias), a one-page fill-in template, and sanity-checking numbers that look wrong. Triggers on: define a metric, how should we measure X, KPI definition, metric definition, metric looks wrong, dashboard numbers disagree.

0 installs no ratings yet every version Ed25519-signed

Install

# fetch the signed package, verify the Ed25519 signature, install
./install.sh metric-definitions

Skill contents


name: "metric_definitions" description: "Define the metric before you build the dashboard: unambiguous metric definitions (population, event, window, filters, edge cases), event-naming conventions, common traps (double-counting, timezone windows, null-vs-zero, sampling bias), a one-page fill-in template, and sanity-checking numbers that look wrong. Triggers on: define a metric, how should we measure X, KPI definition, metric definition, metric looks wrong, dashboard numbers disagree." metadata: { "includeInPrompt": true }


Purpose

Turn "how many active users?" into a written, reviewable definition before anyone queries or charts. Most dashboard disagreements are not query bugs — they are two people counting different things under the same name. Scope is the definition discipline (unit, population, window, edge cases), not charting, BI tooling, or pipeline code.

Workflow

  1. Name the counted unit. "Orders" (events) and "ordering users" (distinct people) are different metrics. Demo on 5 sample order rows, one user ordering 3×: COUNT() → 5, COUNT(DISTINCT user_id) → 3. If the unit isn't in the name, it isn't defined.
  2. Fill the five-field definition (template below): population, event, window, filters, edge cases. Every field must be answerable; "n/a" is only allowed for edge cases with a reason.
  3. Name events object_verb in past tense (order_placed, not order or placeOrder). One event = one occurrence; dedupe by event id at write time, never by query-time guessing.
  4. Resolve the four traps explicitly in the definition — each has a verified demo:
  1. Sanity-check any number that looks wrong before debugging the query: (a) recompute at a coarser grain — does daily sum to the weekly? (b) check the denominator — is the population what you think? (c) compare two windows — did a deploy or holiday move it? (d) look for duplicate event ids; (e) re-run in the definition's stated timezone. In most cases one of these explains the surprise.

Output Contract

After applying this skill, an agent should produce:

Operating Rules

Versions

v1.0.02026-09-19 · 0 installs · Ed25519-signed./install.sh metric-definitions 1.0.0bundle (.zip)

publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e

Ratings

No ratings yet — be the first to rate it.