AddThisFeature

Feature Flags

Ship code without shipping the feature.

moderate Admin & Operations

What it adds

Runtime flags to enable features per environment, per user, or per percentage.

What your agent is told to do

4
  1. 1

    Support at minimum: on/off globally, on for specific users, and on for a percentage rollout.

  2. 2

    Evaluate flags server-side. A client-side flag ships the code to everyone.

  3. 3

    Give yourself an admin UI to flip flags without a deploy — that's the entire point.

  4. 4

    Make flag evaluation fast and cached; it will be called on every request.

Edge cases it handles

4
  • A flag lookup failure must fall back to a safe default (usually off), never crash the request.
  • Percentage rollouts must be STICKY per user — a user must not see the feature flicker on and off between requests.
  • Removing a flag must be a deliberate cleanup step, or you'll drown in dead flags.
  • Flags controlling access to paid features are NOT a substitute for real authorization.

Definition of done

8
  • Flags support global, per-user, and percentage rollout.
  • Evaluation happens server-side and is cached.
  • Percentage rollouts are sticky per user.
  • A lookup failure falls back safely rather than erroring.
  • Admins can flip flags without a deploy.
  • Flags are not used as authorization.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.