Implements feature flag systems with percentage rollouts, targeting, and kill switches.
Click to play with sound.
---
name: Feature Flags
description: Implement safe, controllable feature flags.
---
# Feature Flags
Decouple deploy from release; ship code dark and turn it on safely.
## Flag types
- Release flags: gate unfinished features. Short-lived; remove after rollout.
- Ops flags / kill switches: disable a feature or dependency in an incident.
- Experiment flags: A/B tests with metrics.
- Permission flags: gate features by plan or entitlement.
Don't mix purposes in one flag — lifecycle and ownership differ.
## Evaluation
```ts
const ctx = { userId, plan, country };
if (flags.isEnabled('new-checkout', ctx)) {
renderNewCheckout();
} else {… install to load the full skillSign in to rate and review this skill.
No reviews yet. Be the first to review this skill.