growthbook-flags

Implements GrowthBook feature flags for tenant-level rollouts and A/B tests in React applications.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/gengirish/dropflow --skill growthbook-flags-gengirish
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: growthbook-flags
Source: https://github.com/gengirish/dropflow/tree/main/.cursor/skills/growthbook-flags
Command: npx skills add https://github.com/gengirish/dropflow --skill growthbook-flags-gengirish

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @growthbook/growthbook-react, @growthbook/growthbook.

What problem does it solve? Controlling which features each tenant sees requires a consistent feature flag system, and wiring up GrowthBook across client components, server routes, and plan-based targeting is error-prone without a reference implementation. ## Core Features & Use Cases - Provider Setup: Configures GrowthBookProvider with tenant attributes (tenantId, plan) and streaming updates in a Next.js app. - Client and Server Evaluation: Uses useFeatureIsOn and useFeatureValue hooks in components, plus a server-side GrowthBook instance for API routes. - Plan-Based Targeting: Maps tenant plans (STARTER, GROWTH, ENTERPRISE) to feature availability, with a DB-backed fallback using tenant workflowConfigJson. - Use Case: Gate a new bulk-order-actions UI behind a flag, roll it out only to GROWTH-plan tenants, and read max-export-rows as a numeric flag value with a safe default. ## Quick Start Set up GrowthBook feature flags in the web app with tenant-level targeting and gate the bulk order actions feature behind a flag.

Frequently Asked Questions about growthbook-flags

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add GrowthBook feature flags to a React app?▼

Install @growthbook/growthbook-react, create a GrowthBook instance with your apiHost and clientKey, wrap your app in GrowthBookProvider, and call gb.init with streaming enabled. Then use useFeatureIsOn or useFeatureValue hooks in client components.

How to evaluate feature flags server-side in Next.js API routes?▼

Create a GrowthBook instance from @growthbook/growthbook with server keys, set attributes like tenantId, await gb.init(), then call gb.isOn(flag). Always call gb.destroy() afterward to release resources.

Can GrowthBook target features by tenant plan?▼

Yes, pass plan as a targeting attribute via gb.setAttributes alongside tenantId. In the GrowthBook dashboard, create rules mapping plans like STARTER, GROWTH, and ENTERPRISE to different feature sets.

GrowthBook vs a simple database-backed feature flag approach?▼

GrowthBook provides targeting rules, streaming updates, and A/B testing with a 9KB SDK and no post-init network requests. For simpler needs, store feature toggles in a tenant JSON config column and check them with a helper function.

Why does my GrowthBook flag return the default value?▼

Flags return defaults when gb.init() has not completed, attributes are not set before evaluation, or the flag key does not match the dashboard. Verify the kebab-case flag name and confirm attributes are set before init.