Detailed implementations in the references/ directory:
Guide
Contents
Feature Flag Service (TypeScript)
Feature Flag Service (TypeScript)
React Hook for Feature Flags
React Hook for Feature Flags
Feature Flag with Analytics
Feature Flag with Analytics
LaunchDarkly-Style SDK
LaunchDarkly-Style SDK
Admin UI for Feature Flags
Admin UI for Feature Flags
Best Practices
✅ DO
Use descriptive flag names
Document flag purpose and lifecycle
Implement gradual rollouts
Track flag evaluations
Clean up old flags regularly
Use feature flags for experiments
Implement kill switches for critical features
Test both enabled and disabled states
Use consistent hashing for stable rollouts
Provide admin UI for non-technical users
❌ DON'T
Use flags for permanent configuration
Accumulate technical debt with old flags
Skip flag cleanup
Make flags too granular
Hard-code flag checks everywhere
Skip analytics and monitoring
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: aj-geddes-useful-ai-prompts-feature-flag-system3description: Feature Flag System4---56# Feature Flag System78## Table of Contents910- [Overview](#overview)11- [When to Use](#when-to-use)12- [Quick Start](#quick-start)13- [Reference Guides](#reference-guides)14- [Best Practices](#best-practices)1516## Overview1718Implement feature flags to decouple deployment from release, enable gradual rollouts, A/B testing, and provide emergency kill switches.1920## When to Use2122- Gradual feature rollouts23- A/B testing and experiments24- Canary deployments25- Beta features for specific users26- Emergency kill switches27- Trunk-based development28- Dark launching29- Operational flags (maintenance mode)30- User-specific features3132## Quick Start3334Minimal working example:3536```typescript37interface FlagConfig {38 key: string;39 enabled: boolean;40 description: string;41 rules?: FlagRule[];42 variants?: FlagVariant[];43 createdAt: Date;44 updatedAt: Date;45}4647interface FlagRule {48 type: "user" | "percentage" | "attribute" | "datetime";49 operator: "in" | "equals" | "contains" | "gt" | "lt" | "between";50 attribute?: string;51 values: any[];52}5354interface FlagVariant {55 key: string;56 weight: number;57 value: any;58}5960interface EvaluationContext {61 userId?: string;62// ... (see reference guides for full implementation)63```6465## Reference Guides6667Detailed implementations in the `references/` directory:6869| Guide | Contents |70|---|---|71| [Feature Flag Service (TypeScript)](references/feature-flag-service-typescript.md) | Feature Flag Service (TypeScript) |72| [React Hook for Feature Flags](references/react-hook-for-feature-flags.md) | React Hook for Feature Flags |73| [Feature Flag with Analytics](references/feature-flag-with-analytics.md) | Feature Flag with Analytics |74| [LaunchDarkly-Style SDK](references/launchdarkly-style-sdk.md) | LaunchDarkly-Style SDK |75| [Admin UI for Feature Flags](references/admin-ui-for-feature-flags.md) | Admin UI for Feature Flags |7677## Best Practices7879### ✅ DO8081- Use descriptive flag names82- Document flag purpose and lifecycle83- Implement gradual rollouts84- Track flag evaluations85- Clean up old flags regularly86- Use feature flags for experiments87- Implement kill switches for critical features88- Test both enabled and disabled states89- Use consistent hashing for stable rollouts90- Provide admin UI for non-technical users9192### ❌ DON'T9394- Use flags for permanent configuration95- Accumulate technical debt with old flags96- Skip flag cleanup97- Make flags too granular98- Hard-code flag checks everywhere99- Skip analytics and monitoring100101---102> Converted and distributed by [TomeVault](https://tomevault.io/claim/aj-geddes) — claim your Tome and manage your conversions.103<!-- tomevault:4.0:skill_md:2026-04-11 -->
Run npx skillmds@latest add tomevault-io/aj-geddes-useful-ai-prompts-feature-flag-system in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Feature Flag System It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.