metric-definition — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited metric-definition (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use whenever a metric is being created, re-defined, or disputed. Triggers:
Most metric arguments are actually definition arguments. Force the question into a spec.
| Input | Why it matters |
|---|---|
| Metric name | What stakeholders call it |
| Business question | What decision the metric supports |
| Owner | Who is accountable for accuracy |
| Source tables | Where the underlying data lives |
| Grain | Per user / session / day / order |
# Metric Spec: <Metric Name>
## Identifier
- **Canonical name:** <snake_case_name>
- **Display name:** <Human Readable>
- **Owner:** <name / team>
- **Last updated:** <YYYY-MM-DD>
- **Status:** <draft | active | deprecated>
## Definition
**Business question:** <What decision does this support?>
**Plain English:** <One sentence anyone in the company can understand.>
**Formula:**<pseudo-math or English formula>
**Grain:** <per user | per session | per day | per order>
## Source
- **Primary table:** `<warehouse.schema.table>`
- **Event(s):** `<event_name>`
- **Refresh cadence:** <daily | hourly | streaming>
- **Latency:** <e.g., T+1 day>
## Canonical SQL (Snowflake)
\`\`\`sql
select
date_trunc('week', event_at) as week,
count(distinct user_id) as <metric_name>
from <table>
where event_name = '<event>'
and is_internal_user = false
and event_at >= '<start>'
group by 1
order by 1;
\`\`\`
## Inclusions / Exclusions
- **Includes:** <e.g., paid + free users>
- **Excludes:** <e.g., internal users, bots, soft-deleted accounts, test orgs>
## Edge cases
- <e.g., refunded transactions are excluded if refund occurred within reporting period>
- <e.g., multi-device users counted once via user_id>
- <e.g., all timestamps in UTC>
## Guardrails
- <guardrail_metric_1>: must not drop > <threshold>
- <guardrail_metric_2>: must not exceed <threshold>
## Known caveats
- <e.g., pre-2026 data uses a different event schema; do not compare>
- <e.g., mobile clients have a 24h sync delay>
## Canonical visualization
<e.g., 12-week rolling line chart, weekly snapshots, with prior-year overlay>
## Anti-patterns (do NOT do this)
- Do not redefine this metric in dashboards without updating this spec
- Do not aggregate this metric across teams that filter for different segments
- Do not present this metric without its guardrails
## Related metrics
- <metric>: related but distinct, defined as <how>
- <metric>: composes with this one for <decision>
## Change log
- 2026-04-01 — Excluded test_org_ids per data-quality audit
- 2026-01-15 — Initial definitiondau_b2b and dau_b2c both derive from dau_base).data-quality-audit — verify source table quality before finalizingmodular-sql-ctes — structure the canonical SQL cleanlystakeholder-readout — communicate metric definitions to stakeholders~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.