flag-create

Installation
SKILL.md

flag-create

Create a new feature flag in GrowthBook. We always set {enabled: false} for every environment explicitly in the payload, so the flag ships disabled regardless of the org's default-state-for-new-environments setting — the user must enable it after creation. Feature keys are permanent; pick the name carefully.

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 it's missing or invalid, gb-call's error message points back at /growthbook:gb-setup.

Workflow

  1. Confirm intent. Restate what the flag will gate in one sentence. Stop if the user wants to run an A/B test (route to the appropriate experiment skill based on what's already in scope) or a rule on an existing flag (route to flag-rules).

  2. Check the key isn't taken.

    gb-call GET /api/v2/feature-keys
    

    Verify the proposed key isn't already in the returned list. If it is, propose a variant; the API will reject the collision and the key cannot be renamed afterward.

  3. Pick a value type. One of string, number, boolean, json. Default to boolean for an on/off gate. Use string or json only when the flag carries config (variant copy, threshold values, structured payload).

Installs
46
GitHub Stars
21
First Seen
Jun 2, 2026
flag-create — growthbook/skills