agentleFS
youcislayoucisla/Agent-Foundry/skills/core/measure-first/SKILL.md

measure-first

Skill1 starsChanged 23 days agoMITView on GitHub

Before planning any change, query live data (DB, API, analytics, logs)

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before creating any plan or roadmap

    line 23
  2. Distinctive:

    Before deciding what to fix first

    line 24
  3. Distinctive:

    When asked to build a new feature (should we invest here?)

    line 25
  4. Distinctive:

    When the user says "our problem is X" (measure it first)

    line 26
  5. Distinctive:

    Ask: what is the single number that tells us if the product is working?

    line 32
  6. Distinctive:

    If 86% of cases die at step 1, the funnel is the bottleneck — not the dashboard polish.

    line 60
  7. Distinctive:

    Keep the refresh command explicit.

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Measure First

The plan is only as good as the data it's based on. Static analysis reveals code structure; live data reveals where users actually churn.

When to Use

Activates on any prompt containing "plan", "fix", "improve", "build", "redesign", "add feature", "optimize", "priority".

  • Before creating any plan or roadmap
  • Before deciding what to fix first
  • When asked to build a new feature (should we invest here?)
  • When the user says "our problem is X" (measure it first)

Procedure

1 — Identify the metrics that matter

Ask: what is the single number that tells us if the product is working?

  • For a funnel product: activation rate (users who complete step N)
  • For billing: conversion rate, LTV, churn
  • For a content product: retention, time-to-value

2 — Query live data

Connect to whatever live sources are available:

  • Database (SQL, direct Postgres, Supabase, etc.)
  • Analytics provider (if connected via API)
  • Logs (Sentry, edge function logs, app logs)
  • Usage metrics (API rate limits, active users, event counts)

Sample queries:

-- Funnel: how many users complete each step?
select event, count(*), count(distinct user_id)
from funnel_events
where created_at > now() - interval '30 days'
group by 1;

-- State distribution: where are users stuck?
select status, count(*) from cases group by 1;

3 — Let the data reorder the plan

If 86% of cases die at step 1, the funnel is the bottleneck — not the dashboard polish. Sequence the plan accordingly.

4 — Document the bottleneck finding

Measured: [what we found]
Implication: [phase sequence change]
Sources: [DB query / API / logs]

Anti-patterns

Planning based on the order things were requested. The user asked for feature X but the data says Y is the bottleneck — fix Y first.

  • Planning from the requested order instead of measured impact.
  • Citing a dashboard number without its date and query.
  • Optimizing a path only a handful of users reach.

Composes With

  • verify-first — uses live data as one triangle source
  • bottleneck-gating — uses this measurement to set phase gates
  • pushback-when-wrong — delivers the "your order is wrong" message

References

  • benchmark

Verification Checklist

  • The decisive metric and its time window are named.
  • The number came from a query or live source.
  • The bottleneck finding records what, implication, and source.
  • The plan order matches the measured bottleneck.
  • Confounders and missing data are stated.

Benchmark Gate

  • Record samples as JSONL with the workload config beside them. A trace without its config is not reproducible.
  • Warm up first, drop the first measured sample, and separate wall time from provider-reported time.
  • A regression requires both a ratio above 1.05 and an absolute delta of at least 0.8 ms. Either alone fails on noise.
  • Keep the refresh command explicit. Never let a candidate baseline overwrite the committed one silently.
  • Store success and failure latency separately; a slow failure must not inflate the success estimate.
  • Key every measurement by model, load bucket, and format version. Pooling across any of them is meaningless.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.