statsig-create-cloud-metric
Create Statsig Cloud metrics via the Console API POST /console/v1/metrics. Use when drafting or executing Create Metric requests for Cloud projects, including required fields and metric type differences.
How do I install this agent skill?
npx skills add https://github.com/statsig-io/agent-skills --skill statsig-create-cloud-metricIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides technical documentation and instructions for creating Cloud metrics via the Statsig Console API. It includes payload specifications, enum mappings, and guidance on using shell commands securely, such as employing environment variables for credentials and heredocs to prevent command injection from user-supplied SQL filters.
- Socketpass
No alerts
- Snykfail
Risk: HIGH · 1 issue
- Runlayerfail
2/3 files flagged
- ZeroLeakspass
Score: 93/100 · 2 sections analyzed
What does this agent skill do?
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
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/statsig-io/agent-skills/statsig-create-cloud-metric">View statsig-create-cloud-metric on skillZs</a>