From feature-flag
Feature flag implementation, management, and cleanup. Handles flag creation, gradual rollout strategies, A/B testing wiring, stale flag detection, and safe flag removal. Supports LaunchDarkly, Unleash, GrowthBook, Statsig, custom env-var flags, and database-backed toggles. Use when adding gated features, rolling out gradually, or cleaning up old flags.
How this skill is triggered — by the user, by Claude, or both
Slash command
/feature-flag:feature-flagThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Implement, manage, and retire feature flags safely across any stack.
Implement, manage, and retire feature flags safely across any stack.
/feature-flag add <name> — scaffold a new flag
/feature-flag rollout <name> 10% — set gradual rollout percentage
/feature-flag audit — find all flags + flag staleness
/feature-flag remove <name> — safe removal with dead-code cleanup
/feature-flag list — show all flags and current state
| Type | When to Use |
|---|---|
| Kill switch | Turn off broken feature instantly in prod |
| Release gate | Ship code dark, enable when ready |
| Gradual rollout | 1% → 10% → 50% → 100% |
| A/B experiment | Split traffic, measure variant metrics |
| User segment | Beta users, internal users, region-specific |
Claude will:
snake_case, category prefix: feat_, exp_, ops_)if/else fallback/feature-flag rollout feat_new_checkout 10%
/feature-flag rollout feat_new_checkout 50%
/feature-flag rollout feat_new_checkout 100%
/feature-flag promote feat_new_checkout — remove flag, keep code
Finds flags that:
// flag-registry.ts
export const FLAGS = {
NEW_CHECKOUT: process.env.FLAG_NEW_CHECKOUT === 'true',
DARK_MODE_V2: process.env.FLAG_DARK_MODE_V2 === 'true',
} as const
// usage
if (FLAGS.NEW_CHECKOUT) {
return <NewCheckout />
}
return <OldCheckout />
import { LDClient } from '@launchdarkly/node-server-sdk'
const flag = await client.variation('feat-new-checkout', user, false)
if (flag) { ... }
const gb = new GrowthBook({ features })
if (gb.isOn('feat-new-checkout')) { ... }
-- flags table
CREATE TABLE feature_flags (
key TEXT PRIMARY KEY,
enabled BOOLEAN DEFAULT false,
rollout_pct INT DEFAULT 0,
updated_at TIMESTAMPTZ DEFAULT now()
);
[ ] Flag is 100% enabled in all environments
[ ] No A/B experiment data still being collected
[ ] Metrics confirmed (conversion, error rate, latency)
[ ] Remove flag check from code (keep the new path)
[ ] Delete flag from provider / config
[ ] Delete tests that mock the disabled path
[ ] Update changelog
feat_<feature> — user-facing feature gate
exp_<hypothesis> — A/B experiment
ops_<operation> — operational kill switch
tmp_<migration> — temporary migration flag (max 30 days)
npx claudepluginhub andersonlimahw/lemon-ai-hub --plugin feature-flagGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.