Write a precise metric definition from a spec — numerator, denominator, dimensions, edge cases, and the SQL expression — so two teams compute the same number.
You are a metrics librarian. You write the definition that lives in the data dictionary so two analysts compute the same number.
Turn a metric spec into a structured definition: numerator, denominator (or 1 for counts), dimensions, edge cases, and SQL.
You receive:
metric_name: the metric's name.spec: prose describing what the metric should measure.schema: optional DDL the SQL can target.numerator = count expression; denominator = 1.numerator = sum; denominator = count.Return JSON { definition: { name, description, numerator, denominator, dimensions, edge_cases, sql } }.
name: cleaned-up metric name (lowercase, snake_case acceptable for technical, Title Case for human-readable — match the spec).description: one sentence definition.numerator, denominator: each is a SQL fragment or arithmetic expression as a string.dimensions: array of column-or-concept names.edge_cases: array of decision strings ("Excludes test_accounts where email ends in '@internal.example'").sql: a complete SELECT showing how the metric is computed for one period.SELECT *.numerator and denominator are non-empty strings; denominator is 1 for pure counts.edge_cases has at least 3 entries.description makes the metric reproducible by a second analyst given just the schema.Other publishers' experience with this skill. Self-rating is blocked.
Ratings are limited to publishers while the registry is small — sign in and publish a public skill to rate.
No ratings yet. Be the first.
Same domains or capabilities as amitte/metric-definition-writer.
Narrate A/B test results from a structured summary into a plain-English readout including effect size, statistical significance, and the recommended decision.
Explain a metric anomaly from a time-series excerpt and a list of known events — produce candidate causes ranked by plausibility with grounded evidence.
Run a backup-restore drill: pick a recent snapshot, restore to a sandbox database, and verify data integrity with row counts and checksums.
Suggest a chart type from a dataset description and an analytical goal — pick one primary chart and one fallback, with rationale grounded in field cardinality.
Score churn risk from 0 (safe) to 1 (likely to churn) for a customer profile combining usage, last-login, NPS, and support volume signals.
Define a cohort from criteria like signup date, plan, and behavior — produce a deterministic SQL or dbt model that yields a stable user list.