statsig-create-cloud-metric
Installation
SKILL.md
Statsig Create Cloud Metric API
Quick Start
- Confirm the request is for a Cloud project.
- Collect required inputs: metric name, requested metric kind, and whether to dry run.
- Open shared contract guidance in references/create-metric-api.md.
- Open references/cloud-metric-creation.md.
- Map requested metric kind to API
typeenum using the Cloud reference. - Draft a curl request with STATSIG-API-KEY and JSON body.
Required Inputs
- Metric name (4-200 chars).
- Requested metric kind and API
typeenum. - Event definitions.
- Filters and optional rollup settings.
- unitTypes when required by the selected Cloud metric type.
Build the Request
- Always send
POST /console/v1/metrics. - Always include
Content-Type: application/jsonandSTATSIG-API-KEY. - Use
dryRun: truefor validation-first workflows. - Prefer heredoc payloads (
--data-binary @- <<'JSON') instead of inline-d '...'JSON when SQL filters include single quotes. - For Cloud metrics, set top-level fields such as
metricEvents,funnelEventList, andmetricComponentMetrics. - For criteria-based filters, only use API-supported
conditionenum values (see references/create-metric-api.md). Do not use aliases likeeq. - Confirm enum mapping and required fields from the Cloud reference before finalizing.
References
- Shared API contract and headers:
references/create-metric-api.md - Cloud metric creation details:
references/cloud-metric-creation.md
Related skills
More from statsig-io/agent-skills
statsig
Use the Statsig MCP to inspect and manage Statsig entities such as gates, experiments, dynamic configs, segments, metrics, audit logs, and results.
42statsig-dashboard
Create or read Statsig dashboards through the Console API. Use when building a valid `POST /console/v1/dashboards` body, reading `GET /console/v1/dashboards/{id}` into a create-compatible shape, or appending or replacing dashboard widgets through the related widget endpoints.
35