---
name: "growthbook-ab-testing-feature-flags"
description: "Run statistically sound A/B tests and feature rollouts using self-hosted GrowthBook."
metadata:
  author: "GrowthBook"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "run ab test growthbook"
  - "setup growthbook sdk"
  - "tracking callback growthbook"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# GrowthBook Open-Source Feature Flags & A/B Testing

Configures GrowthBook: GrowthBook SDK instance, experiment definitions (variations, weights), tracking callbacks, targeting attributes (country, browser), and analyzing Bayesian statistical significance in GrowthBook UI.

## When to Invoke
Invoke this skill whenever you need to:
- run ab test growthbook
- setup growthbook sdk
- tracking callback growthbook

## Execution SOP & Rules
1. Initialize SDK: const gb = new GrowthBook({ apiHost: '...', clientKey: '...', trackingCallback: ... }).
2. Load features: await gb.loadFeatures({ autoRefresh: true }).
3. Run experiment: const { value } = gb.run({ key: 'pricing-test', variations: ['Control', 'Variant A'] });
4. Send exposure event in trackingCallback to warehouse for automated statistical analysis.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
