flowglad-feature-gating

Gate premium features with Flowglad checkFeatureAccess for client and server.

2|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/flowglad/skills --skill flowglad-feature-gating
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flowglad-feature-gating
Source: https://github.com/flowglad/skills/tree/main/skills/feature-gating
Command: npx skills add https://github.com/flowglad/skills --skill flowglad-feature-gating

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a robust pattern to gate premium features behind Flowglad entitlements, ensuring users only access what their subscription allows.

Core Features & Use Cases

  • Client-side gating using a billing hook and checkFeatureAccess to show or hide UI based on entitlement.
  • Server-side enforcement for API routes and sensitive actions to prevent bypassing UI checks.
  • Reusable patterns: a FeatureGate component and a withFeatureAccess HOC to reduce boilerplate and maintain consistent behavior.
  • Slug-based feature identifiers to ensure environment-agnostic gating.

Quick Start

Show me how to gate a 'premium' feature in a Flowglad-enabled app using the FeatureGate component and server-side checks.

Frequently Asked Questions about flowglad-feature-gating

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I gate premium features based on subscription entitlements?▼

You can gate premium features by checking subscription entitlements using checkFeatureAccess, applying slug-based identifiers to control UI visibility and server-side API access securely.

What is the best way to prevent users from bypassing client-side feature gates?▼

To prevent bypassing client-side feature gates, implement server-side enforcement for API routes and sensitive actions, ensuring subscription entitlements are validated before processing requests.

How do I reduce boilerplate when hiding UI components behind a feature flag?▼

Reduce boilerplate by using reusable patterns like a FeatureGate component and a withFeatureAccess HOC, which provide consistent behavior for hiding UI components behind a feature flag.

Do I need a Flowglad integration to use slug-based feature gating?▼

Yes, you need an existing Flowglad integration in your project to use slug-based feature gating, as it relies on Flowglad's checkFeatureAccess to verify subscription entitlements.

How do I manage loading states and redirects for gated premium features?▼

Manage loading states and safe redirects for gated premium features by following provided guidance within the gating patterns, ensuring smooth transitions when subscription access is denied.