aj-geddes avatar

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-code

Installs 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
1manutej avatarmlops-workflowsmanutej/luxor-claude-marketplaceComprehensive MLOps workflows for the complete ML lifecycle - experiment tracking, model registry, deployment patterns, monitoring, A/B testing, and production 445skills.sh installs
2rshankras avatargrowthrshankras/claude-code-apple-skillsGrowth skills for indie Apple developers — user acquisition, analytics interpretation, press/media outreach, community building, and indie business operations. 435skills.sh installs
3evoscientist avatarpaper-planningevoscientist/evoskillsGuides pre-writing planning for academic papers with 4 structured steps: story design (task-challenge-insight-contribution-advantage), experiment planning (comp428skills.sh installs
4manojbajaj95 avatardata-and-funnel-analyticsmanojbajaj95/claude-gtm-pluginAnalytics tracking, interpretation, funnel analysis, product metrics, and ROI measurement. Use when setting up GA4/GTM tracking, interpreting analytics data, an426skills.sh installs
5kernel avatarkernel-typescript-sdkkernel/skillsBuild Kernel browser automation in TypeScript with server-side Playwright or CDP, including profiles, proxies, and reliable session cleanup.425skills.sh installs
6neurofoo avatarfeynmanneurofoo/agent-skillsFeynman Technique for deep learning—explain a concept simply, identify gaps, fill them, then refine. Use when learning something new, testing understanding, or 422skills.sh installs