feature-flags

Design feature flag systems with targeting rules, gradual rollouts, and kill switches.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill feature-flags-kalilurrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-flags
Source: https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts/tree/main/01-software-dev/feature-flags
Command: npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill feature-flags-kalilurrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Shipping new code to all users at once is risky, and rolling back a bad release often requires a full redeploy. This Skill designs a feature flag system that decouples deployment from release, enabling gradual rollouts, A/B experiments, and instant emergency disables. ## Core Features & Use Cases - Flag Type Taxonomy: Defines release, experiment, ops, and permission flags with distinct lifecycles and cleanup policies (90-day removal rule). - Targeting & Rollouts: Implements percentage-based rollouts via consistent hashing, whitelists, and attribute-based rules, with a staged Day 1 to Day 35 rollout plan. - Kill Switches & Monitoring: Provides admin endpoints for emergency disable, auto-disable on high error rates, Prometheus evaluation metrics, and stale flag detection. - Use Case: A team launching a new checkout flow enables it for internal users first, ramps to 5% then 75% of traffic, monitors error rates, and removes the flag code after full rollout. ## Quick Start Design a feature flag system for my checkout redesign with a gradual rollout plan and an emergency kill switch.

Frequently Asked Questions about feature-flags

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

FAQPage Schema
How do I implement a percentage-based feature flag rollout?

Use consistent hashing: hash the flag name plus user ID with MD5, take modulo 100, and compare against the rollout percentage. This guarantees the same user always gets the same result as you ramp from 5% to 100%.

What are the different types of feature flags?

There are four types: release toggles (temporary, removed after rollout), experiment flags (A/B tests with variant assignment), ops flags (permanent, like maintenance mode), and permission flags (permanent, gating premium features).

Should I use LaunchDarkly or a database-backed feature flag system?

Database-backed flags work for simple needs using a table with enabled, rollout_percentage, and whitelist columns. LaunchDarkly suits larger systems needing managed targeting rules, SDKs, and server-side evaluation with user context attributes.

How do I build a kill switch for a feature flag?

Create an admin-only endpoint that sets the flag to disabled, resets rollout percentage to zero, clears the cached config, and writes an audit log entry. You can also auto-disable flags when error rates exceed a threshold like 10%.

When should feature flags be removed from code?

Release toggles must be removed within 90 days of reaching 100% rollout. Run monthly stale flag detection by grepping the codebase for flag references and comparing against flags stored in the database.

Why is my feature flag evaluation slowing down requests?

Evaluation must stay under 10ms, so querying the database per request is too slow. Cache flag configurations in memory or Redis and invalidate the cache whenever a flag state changes.