/confidence:explore-metric [event-name or fact-table-name]from confidence
Generates a pre-filled Metric Explorer URL for any event or fact table, enabling one-click metric creation in Confidence UI. Use when exploring or creating metrics from events.
Ships in confidence. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate a pre-filled Metric Explorer URL for any event or fact table, so the user can preview and create metrics in the Confidence UI with one click.
Bridge the gap between raw event data and actionable experiment metrics. The user has events flowing — this skill helps them turn that data into a metric they can attach to experiments, by generating a ready-to-use Metric Explorer link with everything pre-filled.
Test: mcp__confidence-flags__getIdentityInfo (no args)
If not available, install it:
claude mcp add confidence-flags --transport http --url https://mcp.confidence.dev/mcp/flags
Before jumping to fact tables, ask the user what they're trying to understand. If the user provided a specific event or fact table as an argument, skip this step.
If no argument was provided, use AskUserQuestion:
What do you want to measure?
Examine the available fact tables and metrics to suggest the most relevant options. For example:
Use the answer to guide fact table selection and metric kind in subsequent steps.
If the user provides an event name (e.g., purchase-completed):
Call mcp__confidence-flags__listFactTables and search for a fact table matching that event name
If not found, check mcp__confidence-flags__getEventDefinition to verify the event exists. If the event definition exists but has no fact table, you MUST diagnose why:
Diagnosis 1 — Missing entity reference: Inspect the event definition's schema fields. If NO field has a semanticType with an entityReference, explain:
This event definition doesn't have an entity reference on any field. A fact table is only auto-created when at least one string field has a
semanticType.entityReference— this tells the system which field identifies the unit of analysis (e.g., visitor, user, organization).To fix this, update the event definition and add an entity reference to the identifier field (like
visitor_idoruser_id), or re-create the event with/confidence:instrument-events.
Diagnosis 2 — Auto creation not enabled: If the schema HAS entity references but still no fact table, explain:
Auto fact table creation may not be enabled for this account. You can create a fact table manually in the Confidence UI under Admin → Fact Tables.
If the user provides a fact table name (e.g., factTables/purchase-completed):
If the user answered the business question in Step 1:
mcp__confidence-flags__listFactTablesFrom the fact table, extract:
visitor_id → entities/visitor)Present:
───── Fact Table ──────────────────────────────────────────
Name: factTables/purchase-completed
Entity: visitor_id → Visitor
Measures: amount, item_count
Dimensions: currency, action
────────────────────────────────────────────────────────────
Use AskUserQuestion to let the user configure the metric. Suggest the best default based on the business question and available measures.
Metric kind:
Mark the recommended kind based on context:
If the user picks consumption, average, or a kind that needs a measure column, ask which measure to use (from the fact table's measures list) with the most relevant one marked "(Recommended)".
Do NOT include the exposure parameter in the generated URL.
The Metric Explorer requires the fact table's data partitions to overlap with the exposure table's data partitions. There is no MCP tool to verify this overlap (it requires the QueryAvailableTimeRange gRPC endpoint). Picking an exposure table blindly causes "No available time range for this metric" errors when the data doesn't overlap.
Instead, let the user select the experiment in the Metric Explorer UI, where the dropdown only shows experiments with valid data ranges.
Tell the user:
The link opens the Metric Explorer with your fact table and metric kind pre-filled. Select an experiment from the dropdown in the UI — it only shows experiments with overlapping data, so you won't hit time range errors.
Base URL: https://app.confidence.spotify.com/metrics/explorer
URL parameters:
| Param | URL key | Value |
|---|---|---|
| Fact table | factTable | factTables/{id} (URL-encoded) |
| Entity | entity | entities/{id} (URL-encoded) |
| Metric kind | kind | conversion, consumption, average, ratio, ctr |
| Measure column | measurement | column name (for consumption/average) |
| Aggregation | agg | count, sum, avg, min, max, countDistinct |
| Aggregation operator | aggOp | none (default), gte, gt, eq, lt, lte |
| Aggregation window | window | 3600s (1 hour, default for closed window) |
Kind → default aggregation mapping:
| Kind | Default agg | Default measure |
|---|---|---|
conversion | count | — (counts entities) |
consumption | sum | user-selected measure |
average | avg | user-selected measure |
count → use conversion kind | count | — |
URL encoding is CRITICAL. The / in resource names MUST be encoded as %2F. Without this, the URL breaks.
Examples of CORRECT encoding:
factTable=factTables%2Fpurchase-completed ✓entity=entities%2Fenk6xv5ido8wqotjxkcz ✓Examples of WRONG encoding (will break the UI):
factTable=factTables/purchase-completed ✗entity=entities/visitor ✗Always include these required params: factTable, entity, kind, agg, aggOp=none.
Do NOT include exposure in the URL. The Metric Explorer requires the fact table and exposure table data partitions to overlap, and there is no MCP tool or public API to verify this overlap (QueryAvailableTimeRange is behind an internal GraphQL BFF). Including an exposure table blindly causes "No available time range" errors. Let the user select the experiment in the UI dropdown, which only shows valid options.
Present the link:
───── Metric Explorer ────────────────────────────────────
📊 Revenue per visitor
Kind: consumption │ Measure: amount │ Agg: SUM
https://app.confidence.spotify.com/metrics/explorer?factTable=factTables%2Fpurchase-completed&entity=entities%2Fvisitor&kind=consumption&measurement=amount&agg=sum&aggOp=none
In the Metric Explorer:
1. Select an experiment from the dropdown
2. Click "Calculate" to preview the metric
3. Review the chart and diagnostics
4. Click "Create" to save it as a real metric
────────────────────────────────────────────────────────────
After presenting the first URL, ask:
Want to explore another metric on this fact table, or a different event?
Options:
factTables/x becomes factTables%2Fxexposure in the URL — there is no MCP tool or public API to verify that the exposure table's data partitions overlap with the fact table's data (QueryAvailableTimeRange is behind an internal GraphQL BFF at graphql-konfidens.spotify.com). Including an exposure table blindly causes "No available time range for this metric" errors. Let the user select the experiment in the Metric Explorer UI dropdown.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
metric-explorer, confidence, experiment-metrics, fact-tables
15 skills in this plugin
/analyze-projectAnalyze a user's project and propose a meaningful feature flag change using Confidence. Use when the user says /analyze-project, asks what to flag, wants flag suggestions, or asks "what should I feature-flag in my project?"/instrument-eventsAnalyze a project's codebase, identify what events to track alongside the metrics they'd power, create event definitions in Confidence with entity references (so fact tables are auto-created), add SDK track() calls, and verify the pipeline. Use when the user asks to instrument events, add tracking, set up event tracking, analyze what to track, or wants to measure experiment impact. For metric preview and creation, see the explore-metric skill./migrate-eppoMigrate feature flags from Eppo to Confidence SDK. Use when the user says /migrate-eppo, asks to migrate Eppo flags, or transform SDK code to Confidence./migrate-optimizelyMigrate Optimizely to Confidence — users/groups/roles/policies, Flag clients from env SDK keys, flag definitions, and OpenFeature code. Bare /migrate-optimizely (no args) starts plan access. Use when the user says /migrate-optimizely, /migrate-optimizely-plan-access, /migrate-optimizely-adjust-access, /migrate-optimizely-execute-access, /migrate-optimizely-plan-flags, /migrate-optimizely-adjust-flags, /migrate-optimizely-execute-flags, /migrate-optimizely-plan-code, /migrate-optimizely-adjust-code, /migrate-optimizely-execute-code, asks to migrate or adjust Optimizely users, teams, groups, roles, policies, clients, flags/rollouts/experiments, or transform Optimizely SDK code to Confidence./migrate-posthogMigrate feature flags from PostHog to Confidence SDK. Use when the user says /migrate-posthog, asks to migrate PostHog flags, or transform SDK code to Confidence./migrate-statsigMigrate feature flags from Statsig to Confidence SDK. Use when the user says /migrate-statsig, asks to migrate Statsig gates/configs/experiments, or transform SDK code to Confidence.Other plugins' skills for the same job
npx claudepluginhub spotify/confidence-ai-plugins --plugin confidence