Design and implement feature flags — flag types (release/experiment/ops/permission), lifecycle (create→target→rollout→cleanup), gradual rollout strategy, kill switch pattern, and flag hygiene. Use when asked to "add a feature flag", "gradual rollout", "kill switch", "LaunchDarkly", "Unleash", "GrowthBook", "dark launch", "flag cleanup", "percentage rollout", or "canary release via flags". Do NOT use for: deployment canaries managed at infra level (Kubernetes, load balancer weights). Do NOT use for: A/B test statistical analysis — flags gate traffic, stats belong in analytics.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Design and implement feature flags — flag types (release/experiment/ops/permission), lifecycle (create→target→rollout→cleanup), gradual rollout strategy, kill switch pattern, and flag hygiene. Use when asked to "add a feature flag", "gradual rollout", "kill switch", "LaunchDarkly", "Unleash", "GrowthBook", "dark launch", "flag cleanup", "percentage rollout", or "canary release via flags". Do NOT use for: deployment canaries managed at infra level (Kubernetes, load balancer weights). Do NOT use for: A/B test statistical analysis — flags gate traffic, stats belong in analytics.
Day 0: Internal users only (flag ON for employee accounts)
Day 1: 1% — catch crashes before they scale
Day 2: 5% — confirm p99 latency unchanged
Day 3: 25% — validate at meaningful traffic
Day 5: 100% — complete rollout
Day 7+: Remove flag + dead code path
Monitor error rate and p99 latency at each step. Roll back by flipping flag to 0% — no deploy needed.
Kill Switch Pattern
An ops flag that is ON by default — flipping it OFF disables the feature.
Context attributes to expose: user.id (stable, for consistent bucketing), user.plan, user.country, request.env.
Never target by email — IDs ensure consistent bucketing across sessions.
Testing with Flags
Inject flag state directly into functions — never call the SDK in unit tests.
// Both paths must be testedit('new checkout when flag ON', () =>expect(checkout(cart, { newCheckoutFlow: true })).toMatchNewShape());
it('legacy checkout when flag OFF', () =>expect(checkout(cart, { newCheckoutFlow: false })).toMatchLegacyShape());
// Integration: mock the clientconst mockClient = { variation: jest.fn().mockResolvedValue(true) };
A flag with only the ON path tested breaks silently when rolled back.