experiment-stop
experiment-stop
Stop a running experiment, optionally declaring a winning variation and ramping it to all eligible traffic via a temporary rollout. The endpoint is POST /api/v1/experiments/<id>/stop (a dedicated endpoint, not the generic update). All variation references are variation ID strings like var_abc123, not 0-based integer indexes.
All API calls go through the bundled helper: ${CLAUDE_PLUGIN_ROOT}/scripts/gb-call. It needs GB_API_KEY — set in your shell, or written to ~/.config/growthbook/.env by /growthbook:gb-setup. If unset or invalid, gb-call's error message points back at /growthbook:gb-setup.
Workflow
-
Fetch the current experiment.
gb-call GET /api/v1/experiments/<experiment-id>If the user gave a name instead of an ID ("stop the checkout test"), resolve it first —
qmatches against name, tracking key, description, and hypothesis, andstatus=runningkeeps the candidates to experiments this skill can act on:gb-call GET '/api/v1/experiments?q=checkout&status=running'