
Feature Flag System
This implements a complete feature flag system for controlling rollouts, A/B tests, and kill switches. You get flag evaluation with rules based on user attributes, percentages, and time windows, plus variant support for experiments. The references include a TypeScript service, React hooks, analytics integration, and even an admin UI. Honestly, this is the kind of thing you'd normally reach for LaunchDarkly or Split for, but if you need flags without the SaaS dependency or want full control over the data, this gives you a solid foundation. Just don't forget the cleanup part, abandoned flags pile up fast.
- skills.sh installs
- 445
- GitHub stars
- 379
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill feature-flag-system --agent claude-codeInstalls into .claude/skills of the current project.
Files
Feature Flag System
Table of Contents
Overview
Implement feature flags to decouple deployment from release, enable gradual rollouts, A/B testing, and provide emergency kill switches.
When to Use
- Gradual feature rollouts
- A/B testing and experiments
- Canary deployments
- Beta features for specific users
- Emergency kill switches
- Trunk-based development
- Dark launching
- Operational flags (maintenance mode)
- User-specific features
Quick Start
Minimal working example:
interface FlagConfig {
key: string;
enabled: boolean;
description: string;
rules?: FlagRule[];
variants?: FlagVariant[];
createdAt: Date;
updatedAt: Date;
}
interface FlagRule {
type: "user" | "percentage" | "attribute" | "datetime";
operator: "in" | "equals" | "contains" | "gt" | "lt" | "between";
attribute?: string;
values: any[];
}
interface FlagVariant {
key: string;
weight: number;
value: any;
}
Sponsors
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Categories
- Testing & QA, AI & Agent Building
- First seen
- Jun 3, 2026
More from aj-geddes/useful-ai-prompts
All 258- Infrastructure Cost Optimization445
- Capacity Planning444
- Container Registry Management444
- Third Party Integration443
- Continuous Testing441
- Dependency Tracking440
- Artifact Management439
- Graceful Shutdown439
- Blue Green Deployment437
- Disaster Recovery Testing437
- Release Planning436
- Intermittent Issue Debugging433
- Server Side Rendering433
- Mocking Stubbing432
- Data Migration Scripts430
- Correlation Tracing429
- Synthetic Monitoring427
- Canary Deployment426
- Service Mesh Implementation426
- Azure Functions424
- Data Replication Setup424
- Graphql Implementation424
- Polyglot Integration424
- Distributed Tracing418