Recommend primary/guardrail metrics for an experiment or rollout, judged against a good-metric checklist. Checks existing metrics and event health, surfaces auto-created guardrails. Doesn't create or attach metrics — see create-metric / instrument-metric / manage-experiments. Trigger phrases: choose/pick a metric, primary metric, guardrail metric, what to monitor.
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Recommend metrics for an FME experiment or feature-flag rollout: which is primary, which are guardrails/supporting, and which existing candidates are healthy enough to trust, judged against what makes a good metric. Related: /manage-experiments attaches metrics to experiments; /create-metric creates new metrics; /instrument-metric adds tracking calls.
Works through the Harness MCP server or the Harness CLI; names are from tool-map.md.
| Operation | MCP | CLI |
|---|---|---|
| Get flag | harness_get · fme_feature_flag · params: { feature_flag_name } | harness get feature_flag <name> --json |
| Get experiment | harness_get · fme_experiment · params: { experiment_id } | harness get experiment <id> --json |
| List metrics | harness_list · fme_metric · filters: { traffic_type_id?, name?, limit } · compact: false | harness list metric --traffic-type-id <id> --name <substring> --json |
| List traffic types | harness_list · fme_traffic_type · compact: false | harness list traffic_type --json |
| List event types | harness_list · fme_event_type · filters: { traffic_type?, name? } · compact: false | harness list event_type --traffic-type <name or id> --name <substring> --json |
| Get event type | harness_get · fme_event_type · params: { event_type_id } | harness get event_type <event-name> --json |
See scope-establishment.md. Confirm organization and project before any list or get operation.
Ask (if not already stated): is this for an experiment (A/B test) or a feature-flag rollout being monitored for safety? The recommendation logic differs (Phase 5).
For an experiment, get the hypothesis before recommending anything: "if this succeeds, [what] will increase/decrease?" The primary metric must directly measure that hypothesis, not just be topically related.
Stop condition: if it's an experiment and the user hasn't stated a hypothesis, ask for one before recommending a primary metric. Don't infer it from the flag name.
If the experiment exists, Get experiment to read keyMetrics / supportingMetrics so you don't propose duplicates. Workspace-wide GUARDRAIL / ALERT metrics are added automatically and don't appear in these lists. If the experiment doesn't exist yet, skip this check and proceed on the hypothesis alone.
To narrow the metric list, get the flag's traffic type: Get flag returns trafficType with id and name. If you don't have the flag name, List traffic types and ask which one applies — a metric on a different traffic type won't collect data for the experiment or rollout.
List metrics with full definitions, narrowed by the traffic type from Phase 4 and a name substring if the hypothesis gives an obvious keyword. Request ~30 rows unless the hypothesis points to a specific name. A total exceeding returned rows proves more pages remain, but equality does not prove completeness: MCP can fall back to page length when the API total is absent. Set an explicit filters.limit/filters.offset and follow pagination for metrics, traffic types and event inventories. Say "no suitable metric in the examined subset," not "no suitable metric exists"; finish pagination (or ask to narrow a costly inventory) before making a project-wide absence claim.
Read name, description, aggregation, spread, format, isPositive, baseEventTypes[].eventTypeId for each. Judge candidates against What makes a good metric, not health alone.
Metric creation doesn't validate any event reference, so a metric can look complete while its event is a typo, was renamed, or has gone idle. For each candidate you're about to recommend, Get event type for every event reference it uses — baseEventTypes, and filterEventType/triggerEventType if set, not just the base event, since a stale filter or trigger event silently changes which units get counted even if the base event is healthy. The response has only id and trafficTypes — check the returned trafficTypes includes the candidate's traffic type. Event types are listed only if an event arrived in the last 30 days, project-wide across all environments — this isn't a "currently flowing" guarantee for any one environment. An exact-get 404 means no matching event is visible in this scope/window — check scope and spelling, then whether a previously working flow has simply been idle. It does not prove the event was never instrumented. Absence from a filtered or partial list is inconclusive. Ask whether the flow has run recently before concluding the metric needs re-instrumentation or modifying any code; if confirmed idle rather than broken, say so instead of handing off to instrument-metric by default. Don't health-check metrics you're explicitly ruling out.
For rollout monitoring, surface auto-created - Split Agents metrics as ready-made guardrails.
Experiment:
spread: PER (ACROSS metrics get no significance test and can't decide an experiment). One of each secondary type is usually enough; every extra metric adds noise. A primary with no events produces no result. The metric's traffic type must match the flag's traffic type, and the subject key used in track() must be the same key getTreatment uses for this flag (attribution fact) — the event's name does not need to, and usually shouldn't, match the flag's name. If no existing metric qualifies, recommend /create-metric (and /instrument-metric first if the event doesn't exist yet) rather than forcing a loose fit.supportingMetrics (category SUPPORTING in results) — not to be confused with workspace-wide GUARDRAIL category metrics, which apply automatically to every experiment. See concepts.md for the distinction.keyMetrics, all others → supportingMetrics. Attaching them is a separate step; see /manage-experiments.Feature-flag rollout monitoring:
## Recommended Metrics
- Primary: <name> — <why it measures the hypothesis> [healthy/at-risk]
- Guardrail: <name> — <what it protects against> [healthy/at-risk]
- Supporting: <name> — <what it corroborates> [healthy/at-risk]
## Gaps
<any hypothesis/rollout aspect with no healthy metric>
For each gap, give a concrete starting spec (event, aggregation, format, isPositive from the intent table) for /create-metric. If the app repo is available, offer candidates via [Suggest metrics from code](../../../references/fme/metric-design.md#suggest-metrics-from-code).Flag every at-risk metric explicitly rather than silently omitting it — the user may know it's about to be re-instrumented.
| Symptom | Cause | Fix |
|---|---|---|
| Experiment doesn't exist yet | Phase 3 fails with 404 | Skip Phase 3, tell the user you're recommending from inventory and hypothesis alone, proceed |
| No metrics survive health check | Referenced events are not visible in the current scope/window | Confirm scope, exact names, traffic types, and recent activity first. Idle events do not imply missing instrumentation or justify duplicate metrics. Route to /instrument-metric only for a confirmed gap/investigation; report candidates as at-risk, not decision-ready |
| User proposes >5 metrics for a rollout | Large guardrail set increases false-positive rollback risk | Push back — ask which 2-3 matter most |
harness/harness-ai
ac52a15
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.