metric-definition-and-data-quality

$npx mdskill add Significant-Gravitas/skills-catalog/metric-definition-and-data-quality

Run this before trusting a KPI, anomaly, cohort, funnel, or experiment result.

SKILL.md

.github/skills/metric-definition-and-data-qualityView on GitHub ↗
---
name: "metric-definition-and-data-quality"
description: "Test metric definitions and source data for freshness, coverage, duplicates, missing values, impossible values, and drift."
triggers: ["data quality", "metric definition", "validate data", "analytics audit", "bad data"]
version: "1"
---

# Metric definition and data quality

Run this before trusting a KPI, anomaly, cohort, funnel, or experiment result.

## Pin the expected shape

Record the source, covered period, extraction time, expected grain, primary or
compound key, required fields, field types, allowed ranges, timezone, and known
late-arrival window. State the metric formula and population separately from the
file schema.

## Test in order

1. **Freshness:** latest event and extract time against the expected delay.
2. **Coverage:** first and last dates, missing intervals, source partitions, and
   control totals.
3. **Schema:** missing, renamed, added, or changed-type fields.
4. **Uniqueness:** exact duplicates and duplicate keys.
5. **Completeness:** null and blank rates by required field and period.
6. **Validity:** negative durations, impossible dates, out-of-range rates,
   inconsistent currencies, and broken state order.
7. **Consistency:** totals across independent supplied sources and stable metric
   definitions across periods.
8. **Join quality:** matched, unmatched-left, unmatched-right, and many-to-many
   row multiplication.

## Report the effect

For each issue give the check, expected result, observed result, affected rows
and periods, likely metric impact, severity, and owner. Show results before and
after any proposed exclusion. Do not drop a bad row silently.

Use `blocked` when the issue can change the answer enough to affect the stated
decision. Use `provisional` when the result remains useful with a clear bound.

## Safety rules

Never repair values by guess, backfill from an unrelated period, deduplicate on
name alone, or hide a failed check. Avoid exposing raw personal or sensitive
fields in the report. Treat a pipeline change as a possible cause of a metric
move until an independent source confirms the business change.

More from Significant-Gravitas/skills-catalog

SkillDescription
account-health-and-qbrsUse when a support account wobbles or a quarterly business review looms: read the health signals, run the success plan, and prep the review from evidence.
accounts-receivable-follow-upReview open receivables and draft factual, staged payment follow-ups without inventing status or contacting a customer.
ad-copy-variantsWrite ad variants that each test one idea, within platform limits and supported claims.
alex-getting-startedUse on the first conversation with Alex, or whenever their memory has no product preferences yet: learn what the user is building and who for, where specs, roadmap and numbers live, who decides dates and scope, and get them to a first real product deliverable.
alliance-co-commercializationUse when a strategic alliance needs joint selling governance: operating model, joint targeting, steering prep, and milestone accountability.
anika-getting-startedUse on the first conversation with Anika, or whenever their memory has no partnership preferences yet: learn which partners and alliances the user owns, what motion they run, and get one real partner read on screen in the same session.
assure-partner-led-deliveryUse when partners deliver client work in your name: own the in-flight book, run the weekly delivery review, and rescue engagements before clients feel it.
automate-finance-reportingUse to connect a number source, map an export into the finance ledger, or QA a sheet: the column mapping, the dedupe key, the load summary, and the checks that must pass before a read ships.
billing-refunds-and-exceptionsUse when money is on the table: verify the charge, check the policy, and stage a refund or exception draft that stops at the owner's yes.
board-and-investor-metrics-briefPrepare a concise board or investor metrics brief with definitions, sources, comparisons, drivers, risks, and decisions needed.