feature-flags

Manage RedisInsight feature flag creation, promotion, and removal across backend and frontend.

8.7k|482|Updated Jul 30, 2021
One-click install
npx skills add https://github.com/redis/RedisInsight --skill feature-flags-redis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-flags
Source: https://github.com/redis/RedisInsight/tree/main/.ai/skills/feature-flags
Command: npx skills add https://github.com/redis/RedisInsight --skill feature-flags-redis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Feature flags reduce deployment risk by letting RedisInsight roll out, hide, or experiment with functionality without shipping breaking changes to all users at once.

Core Features & Use Cases

  • Define flag behavior in a remote config: Create or update flags in features-config.json, including rollout percentage (perc), optional environment/build filters, and optional data payloads.
  • Select and register strategies in the backend: Use CommonFlagStrategy, WithDataFlagStrategy, or SwitchableFlagStrategy and register the flag in the feature-flag provider so the backend can serve it to the frontend.
  • Gate the UI and default state: Add the flag to the frontend enums and ensure default feature state exists so UI gating works consistently.
  • Promote and clean up flags safely: Move from dev-<name> to regular flags (or delete fully rolled-out flags) by updating enums, records, strategy registration, and removing gating code.

Quick Start

Create a new dev flag by adding it to redisinsight/api/config/features-config.json as dev-<name>, then registering it in the backend known features and strategy, and finally adding it to the frontend FeatureFlags enum with default state { flag: false } in the features slice.

Frequently Asked Questions about feature-flags

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

FAQPage Schema
How do I add a feature flag to control frontend gating and backend configuration?

To add a feature flag, update features-config.json with a version bump, register the flag and strategy provider in the backend, and sync the UI enums and default state to ensure consistent API-to-UI behavior.

What is the best way to manage gradual rollouts using percentage ranges in a remote config?

Gradual rollouts are managed by defining a rollout percentage (`perc`) within features-config.json, allowing you to incrementally expose functionality to users without shipping breaking changes to everyone at once.

Can I pass extra configuration payloads through feature flags for controlled experiments?

Yes, feature flags can carry optional `data` payloads. You implement this by selecting and registering the `WithDataFlagStrategy` in the backend provider so the frontend receives the extra configuration.

How do I promote a dev flag to a regular feature and clean up the gating code?

Promote a dev flag by moving it from `dev-<name>` to a regular flag in features-config.json, updating the KnownFeatures, strategy registration, frontend enums, and removing the obsolete UI gating code.

Does this feature flag workflow support environment and build filtering?

Yes, feature flags support optional environment and build filters. You configure these filters in features-config.json to restrict flag visibility based on specific deployment contexts or application builds.

Why do I need to update the features slice with a default state when adding a new flag?

Updating the features slice with a default state like `{ flag: false }` is required so the frontend UI gating works consistently with the backend API before the flag is explicitly toggled.