AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Flag Monitoring

skill-growthbook-skills-flag-monitoring · by growthbook

Set up a monitored progressive rollout ("safe rollout") for a GrowthBook feature flag — combining a ramp schedule with guardrail metric monitoring, automated signals, and optional auto-rollback. Use when the user says "roll this out safely", "monitor the rollout with guardrail metrics", "set up a safe rollout", "I want to ramp this with automatic rollback if metrics regress", "configure monitorin…

No reviews yet
0 installs
12 views
0.0% view→install

Install

$ agentstack add skill-growthbook-skills-flag-monitoring

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-growthbook-skills-flag-monitoring)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Flag Monitoring? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

flag-monitoring

Set up and manage a monitored progressive rollout (also called a "safe rollout") for a GrowthBook feature flag. A safe rollout is a standard rollout rule with a multi-step ramp schedule and monitoringConfig attached — the monitoring watches guardrail metrics at each step and can signal or automatically trigger a rollback if regressions are detected.

All API calls go through the bundled helper: ${CLAUDE_PLUGIN_ROOT}/scripts/gb-call. It needs GB_API_KEY set in env or written to ~/.config/growthbook/.env by /growthbook:setup.

Required inputs for monitoring configuration

Before configuring, collect:

  • Datasource ID — the datasource that tracks exposure and metric events
  • Exposure query ID — which assignment query identifies users in the rollout
  • Guardrail metric IDs — at least one metric that must not regress (e.g., error rate, crash rate)
  • Signal metric IDs (optional) — leading-indicator metrics to watch, not hard gates
  • SRM action — what to do on a Sample Ratio Mismatch: "hold" (recommended — pause for inspection) or "rollback" (aggressive) or "warn"
  • Auto-rollback (autoUpdate in the monitored ramp payload, autoRollback in safe-rollout) — true means the system rolls back without human approval on guardrail failure; false holds for human review. Default to true unless the user has concerns about query cost or wants to control the cadence of monitoring snapshots manually
# Resolve datasource and exposure query IDs:
gb-call GET /api/v1/data-sources

# Resolve metric IDs — query both: fact metrics and legacy metrics are separate endpoints,
# and most orgs keep guardrail/signal metrics as fact metrics:
gb-call GET '/api/v1/fact-metrics?datasourceId=&limit=100'
gb-call GET '/api/v1/metrics?datasourceId=&limit=100'

Workflow

Path A — Create a monitored ramp (ramp structure + monitoring together)

Build the full ramp schedule payload with monitoringConfig included in a single PUT. This covers both new ramps and updating an existing draft's ramp before it's published.

1. Collect the ramp steps — see flag-ramp for step/interval design guidance.

2. Collect monitoring config (see Required inputs above):

gb-call GET /api/v1/data-sources
gb-call GET '/api/v1/fact-metrics?datasourceId=&limit=100'
gb-call GET '/api/v1/metrics?datasourceId=&limit=100'

3. PUT the full payload (steps + monitoring together):

echo '{
  "startActions": [
    { "targetType": "feature-rule", "targetId": "", "patch": { "coverage": 0 } }
  ],
  "steps": [
    {
      "interval": 86400,
      "monitored": true,
      "actions": [{ "targetType": "feature-rule", "targetId": "", "patch": { "coverage": 0.1 } }]
    },
    {
      "interval": 86400,
      "monitored": true,
      "holdConditions": { "requiresApproval": true },
      "actions": [{ "targetType": "feature-rule", "targetId": "", "patch": { "coverage": 0.5 } }]
    }
  ],
  "endActions": [
    { "targetType": "feature-rule", "targetId": "", "patch": { "coverage": 1.0 } }
  ],
  "monitoringConfig": {
    "datasourceId": "",
    "exposureQueryId": "",
    "guardrailMetricIds": [""],
    "signalMetricIds": [""],
    "autoUpdate": true,
    "srmAction": "hold",
    "noTrafficAction": "warn",
    "noTrafficGracePeriodHours": 24,
    "multipleExposureAction": "warn"
  }
}' | gb-call PUT /api/v2/features//revisions/new/rules//ramp-schedule -

startActions sets coverage to 0 (the rollback anchor). monitored: true on a step tells the ramp to wait for monitoring results before auto-advancing — it only has effect when monitoringConfig is present. The holdConditions.requiresApproval on step 2 adds a human gate after the interval elapses and monitoring clears.

autoUpdate: true rolls back automatically on guardrail failure. Mention autoUpdate: false only if the user wants to control monitoring cadence manually or is concerned about query costs.

Omit startDate unless the user explicitly requests a delayed start.

4. Hand off to flag-publish.

Path B — Check monitoring status or respond to signals

Before taking any action, open the feature page — it shows ramp step progress, guardrail and signal metric health, experiment-level health checks (SRM, multiple exposures, no traffic), and full metric performance drilldowns with effect sizes and confidence intervals. The API /status endpoint gives you the decision, but the UI gives you the context to make it:

# macOS:
open /features/
# Linux:
xdg-open /features/

Check status via API (for scripted pipelines or when the user wants a quick decision signal):

gb-call GET /api/v1/ramp-schedules//status

Returns decision ("advance" / "hold" / "rollback" / "waiting"), guardrail health, and whether the current step is awaiting approval. Get ` from the flag's rule (rampScheduleId`) or:

gb-call GET '/api/v1/ramp-schedules?featureId='

Approve a monitored hold-for-approval step (after interval elapsed and monitoring shows healthy):

gb-call POST /api/v1/ramp-schedules//actions/approve-step

Returns 400 if monitoring hasn't produced fresh healthy results yet or the interval is still counting — poll /status first.

Advance past a monitoring hold (decision is "hold" and you've reviewed the signals and accept the risk):

echo '{}' | gb-call POST /api/v1/ramp-schedules//actions/advance -

Roll back on guardrail failure (when decision: "rollback" or guardrails are failing):

echo '{"reason":""}' | gb-call POST /api/v1/ramp-schedules//actions/rollback -

Emergency stop (fastest — disable the flag environment via flag-toggle, no ramp schedule ID needed).

Open the UI for a visual health dashboard:

# macOS:
open /features/
# Linux:
xdg-open /features/

For the full live ramp management action reference (pause, resume, complete, restart), see flag-ramp Path D.

Guardrails

  • Draft version threading. If a version number is already in context from a previous write skill in this session, use it explicitly instead of new. Fall back to new when starting fresh.
  • Check the target environment is enabled. If the flag is disabled in the target env, the ramp will do nothing — warn and route to flag-toggle first.
  • autoUpdate controls auto-rollback in the monitored ramp schedule's monitoringConfig. Defaults to true (rolls back automatically on guardrail failure).
  • startDate is optional — omit it unless the user explicitly wants a delayed start. Most teams start ramps via user action after verifying the publish succeeded.
  • cutoffDate is niche — don't mention it unless the user asks.
  • At least one guardrail metric is required. Monitoring without a guardrail is just observation — if the user can't provide a guardrail metric, recommend using an unmonitored ramp (flag-ramp) instead.
  • Metrics must be on the same datasource. The datasourceId in monitoringConfig must match the datasource where the guardrail metrics are defined. If they're on different datasources, the API will reject the configuration.
  • autoUpdate: true means the system rolls back without human approval. Mention autoUpdate: false only if the user wants to control monitoring cadence manually or is concerned about query costs.
  • For monitored steps with holdConditions.requiresApproval: each step pause requires explicit human sign-off before the ramp advances.
  • SRM action defaults matter. "rollback" on SRM is aggressive. "hold" is safer — the ramp pauses for human inspection. Recommend "hold" for SRM unless the user explicitly wants aggressive protection.

Cross-links

This skill orchestrates:

  • flag-ramp — for the structural ramp schedule (steps, intervals, start/cutoff dates). Consult flag-ramp for building custom step sequences.
  • flag-schedule — for time-gating the start of the ramp (setting startDate on the ramp schedule).
  • flag-targeting — for setting targeting conditions on the rule that's being ramped.
  • flag-toggle — for emergency kill-switch if monitoring signals a critical issue.

Endpoints used

Draft (pre-publish):

  • GET /api/v2/features/:id — fetch flag and current rules
  • GET /api/v1/data-sources — resolve datasource IDs
  • GET /api/v1/fact-metrics?datasourceId=…, GET /api/v1/metrics?datasourceId=… — resolve guardrail and signal metric IDs (fact metrics and legacy metrics are separate endpoints)
  • PUT /api/v2/features/:id/revisions/new/rules/:ruleId/ramp-schedule — create/update ramp schedule with monitoringConfig

Live ramp management:

  • GET /api/v1/ramp-schedules — list (featureId, ruleId filters)
  • GET /api/v1/ramp-schedules/:id/status — real-time health, decision, per-metric effects
  • POST /api/v1/ramp-schedules/:id/actions/approve-step
  • POST /api/v1/ramp-schedules/:id/actions/advance (body: optional { force: true })
  • POST /api/v1/ramp-schedules/:id/actions/rollback (body: { reason: string })
  • See flag-ramp Path D for the full action reference (pause, resume, complete, restart)

Handoffs

  • flag-ramp — for managing ramp step structure without monitoring
  • flag-toggle — for emergency kill-switch during a live monitored rollout
  • flag-targeting — to configure rule conditions before setting up monitoring
  • flag-publish — to publish the draft and activate the monitored rollout

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.