Product Metrics skill for Codex

A north star, a metric tree and unarguable definitions. Codex tests north star candidates against value, leading-ness and gameability, builds a metric tree down to inputs a single team can move, and adds guardrails for quality and cost. Each metric gets a definition card covering event, denominator, window, time zone and exclusions, with a SQL query that skips incomplete cohorts, so two analysts reach the same number.

  • Product Management
  • $product-metrics
  • 154 lines
  • 2 files
  • ~1,550 tokens
  • MIT
  • Updated

Install

curl -fsSL codexskills.dev/install.sh \  | sh -s -- product-metrics

Installs to ~/.agents/skills/product-metrics/ for every project on this machine.

104-line POSIX script. No sudo, no telemetry. Read install.sh

Use it in Codex

Start a prompt with $product-metrics, or pick it from /skills. You can also just describe the task: Codex reads the description below and loads the playbook when your request matches.

What Codex reads before loading it

Designs product metric systems - a north star metric that reflects delivered customer value, a metric tree decomposing it into input metrics teams can move, guardrail metrics, and precise definitions (event, filter, window, denominator) with SQL or analytics-tool queries to compute them. Audits existing dashboards for vanity metrics and ambiguous definitions. Use when asked to choose a north star metric, build a metric tree or KPI framework, define activation, retention or engagement, or decide which metrics a team should own.

Use it when

  • A team needs a north star or KPI framework it can own
  • Activation, retention or engagement mean different things to different people
  • A dashboard is full of numbers no decision depends on
  • Input metrics are needed for OKRs or roadmap items

Use something else when

How to check the result

A definition card is specific enough to write SQL without questions, every metric tree leaf has an owner, and computed values reconcile with an independent source.

The mistake it prevents

Picking a north star that can rise without customers getting more value, such as signups or raw daily active users.

~/.agents/skills/product-metrics/SKILL.md

--- name: product-metrics description: Designs product metric systems - a north star metric that reflects delivered customer value, a metric tree decomposing it into input metrics teams… license: MIT ---

A metric system is done when one north star reflects value customers actually receive, every team owns input metrics that plausibly move it, guardrails catch damage, and each metric has a definition precise enough that two analysts writing SQL independently get the same number.

North star metric

Criteria, all required:

  • Measures value delivered to the customer, not value extracted (revenue, pageviews).
  • Leading indicator of revenue or retention, not a lagging financial number.
  • Moves within weeks when the product improves.
  • Countable from data the team has or can instrument.
  • Understandable by everyone in one sentence.
Product typeNorth star patternExample
Collaboration SaaSActive teams doing the core actionWeekly active teams with 3+ members editing
MarketplaceSuccessful transactionsWeekly completed bookings
Consumer contentEngaged consumptionWeekly users with 3+ sessions of 5+ min
Dev tool / APISuccessful usage in productionWeekly accounts with 1k+ successful API calls
Fintech / paymentsValue movedMonthly payment volume from active merchants

Reject candidates that fail the “can we game it without helping users?” test. Signups, downloads and raw DAU fail. Always pair the north star with at least two guardrails.

Metric tree

Decompose the north star into multiplicative or additive drivers until each leaf is something one team can change with product work.

Weekly active teams (north star)
├── New active teams
│   ├── Signups (marketing)
│   ├── Activation rate: % of new workspaces with 3+ members editing in 7 days (onboarding)
│   └── Time to first shared doc (onboarding)
├── Retained active teams
│   ├── Week-4 team retention (core)
│   └── Feature adoption: % active teams using comments weekly (collaboration)
└── Resurrected teams
    └── Reactivation rate after 28 days dormant (lifecycle)
Guardrails: support tickets per 100 teams, p95 editor latency, unsubscribe rate

For each leaf: owner team, current value, target, and the hypothesis connecting it to its parent. Leaves with no owner or no plausible lever get cut.

Writing a definition

Every metric gets a definition card. Ambiguity hides in each of these fields:

### Activation rate (7-day)
Numerator: workspaces created in the cohort week with >= 3 distinct users who fired
  `document_edited` within 7 x 24 h of workspace creation
Denominator: workspaces created in the cohort week, excluding internal and test
  workspaces (is_internal = false, email domain not in test list)
Grain: cohort week (Monday 00:00 UTC start)
Source: warehouse table analytics.events, analytics.workspaces
Known caveats: users who join via SSO auto-provisioning fire no invite events
Owner: Onboarding squad | Reviewed: 2026-10-01

Questions to resolve for every metric: which event exactly, what counts as a user (account, person, device), time zone, window length and anchor, exclusions (internal, bots, test, refunds), and whether it is cohort-based or period-based.

Query example

-- 7-day activation by weekly signup cohort (Postgres/BigQuery-style SQL; adjust date functions)
with cohort as (
  select id as workspace_id, created_at,
         date_trunc('week', created_at) as cohort_week
  from workspaces
  where not is_internal
),
editors as (
  select c.workspace_id, count(distinct e.user_id) as editors
  from cohort c
  join events e
    on e.workspace_id = c.workspace_id
   and e.event_name = 'document_edited'
   and e.occurred_at <  c.created_at + interval '7 days'
  group by 1
)
select c.cohort_week,
       count(*) as workspaces,
       avg(case when coalesce(ed.editors, 0) >= 3 then 1.0 else 0 end) as activation_rate
from cohort c
left join editors ed using (workspace_id)
where c.cohort_week <= current_date - interval '14 days'  -- only complete cohorts
group by 1
order by 1;

Exclude incomplete cohorts; partial cohorts make the latest week look worse. For funnel and retention query patterns in depth, see $sql-for-analytics.

Workflow

- [ ] 1. Read the strategy, business model and existing dashboards/metric docs
- [ ] 2. Inspect the event schema or tracking plan (repo or warehouse) to see what is measurable
- [ ] 3. Propose 2-3 north star candidates; test each against the criteria
- [ ] 4. Build the metric tree down to team-owned leaves
- [ ] 5. Add guardrails for quality, cost, trust and speed
- [ ] 6. Write definition cards; compute baselines where data access allows
- [ ] 7. List instrumentation gaps; hand them to $analytics-tracking-plan

In Codex, warehouse access usually requires credentials and network; if neither is available, write the queries and definitions and ask the user to run them, rather than guessing baselines.

Auditing existing metrics

Flag each dashboard metric as one of:

FlagMeaningAction
VanityOnly goes up (cumulative signups, total users)Replace with rate or active count
AmbiguousDefinition missing or disputedWrite a definition card
OrphanNo owner, no decision uses itRemove from team dashboards
Lagging onlyRevenue, churn with no leading inputsAdd input metrics
HealthyDefined, owned, used in a decisionKeep

Gotchas

  • Ratios hide volume: activation rising because signups collapsed is not success. Show numerator and denominator.
  • Changing a definition breaks trends. Version definitions and backfill or annotate.
  • Averages hide distributions. Use medians or percentiles for time and money metrics.
  • Goodhart’s law: once a team is paid on a metric, guardrails matter more than ever.
  • DAU/MAU ratios suit daily-use products only; a payroll tool used monthly is healthy at a low ratio.
  • Never present a baseline you did not compute; mark it “unknown”.

Verification

Hand two definition cards to a fresh read and ask whether the SQL could be written without questions. Check that every leaf in the tree has an owner and a plausible lever, every north star candidate passes all criteria, at least two guardrails exist, and computed numbers reconcile with an independent source (billing system, admin console counts) within a few percent.

What the zip contains

SKILL.md plus the interface file below. Nothing runs on install.

agents/openai.yamlgenerated from this page

Gives the Codex app a display name, a one-line description and a starter prompt for this skill.

interface:
  display_name: "Product Metrics"
  short_description: "A north star, a metric tree and unarguable definitions"
  default_prompt: "$product-metrics Help us pick a north star metric for our collaboration app and build the metric tree"

About this skill

Written and maintained by the Codex Skills editors to the same editorial standard as every skill here: a selective description, a real workflow, known pitfalls and a way to verify the work. First published , last updated . MIT licensed. Something wrong or out of date? Tell us.

esc