AddThisFeature

Feature Gating

Lock premium features behind a plan — without wrecking the free experience.

moderate Monetization

What it adds

A consistent way to gate features by plan, and to sell the upgrade at the moment of intent.

What your agent is told to do

4
  1. 1

    Find where plan/subscription state already lives on the user. Do not invent a second source of truth.

  2. 2

    Enforce every gate SERVER-SIDE. Hiding a button is not a gate, it is a hint — assume the user will call the endpoint directly.

  3. 3

    Add one reusable client-side gate component for the UI affordance.

  4. 4

    When a user hits a gate, show them what the feature does and what it costs. Do not just say no.

Edge cases it handles

4
  • A user who downgrades still has data created under the old plan. Decide explicitly what happens: keep it readable, block new writes.
  • A subscription expiring mid-session must take effect without a re-login.
  • Trial users, grandfathered users, and comped accounts all need handling.
  • The gate must never leak gated data in an API response, even when the UI hides it.

Definition of done

7
  • Every gate is enforced server-side, verified by calling the endpoint directly.
  • The UI gate is a single reusable component.
  • Hitting a gate explains the feature and its price and links to upgrade.
  • Downgrade behaviour for existing data is defined and implemented.
  • No gated data appears in any API response for an ungated user.
  • 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.