Feature flags
Use this skill for remote and version-gated feature flags.
When to use
- Adding or migrating a remote / version-gated feature flag
- Writing or updating a flag selector
- Gating UI or hooks on a flag boolean
- Reviewing a PR that introduces or changes flag evaluation
Workflow
- Evaluate the flag in a selector. Return a boolean.
- Map a non-standard remote shape to
{ enabled, minimumVersion }before the shared helper. - Consume that boolean in UI or hooks. Do not re-run version math there.
- Cover the selector with collocated tests (enabled, disabled, invalid, fallback).