feature-flags
Skill157 starsChanged 3 months agoMITView on GitHub
Feature flag lifecycle patterns: release flags, ops kill switches, experiment toggles, and permission gating. PRD-gated — use only when PRD or architecture explicitly requires gradual rollout, A/B testing, or kill switches.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- marcus/sidecartheir own version, first seen Oct 4, 2026
- growthbook/skillstheir own version, first seen Sep 30, 2026
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Sep 28, 2026
- 2867203296/hermes-agenttheir own version, first seen Aug 19, 2026
- rshankras/claude-code-apple-skillstheir own version, first seen Jul 16, 2026
- shinzoxD/knackboxtheir own version, first seen Jul 10, 2026
Used with
Projects with it also use data-visualization and git-workflow.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkilldata-visualization
Create effective data visualizations with Python (matplotlib, seaborn, plotly). Use when building charts, choosing the right chart type for a dataset, creating publication-quality figures, or applying design principles like accessibility and color theory.
Also in 3 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 3 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- getsentry/sentry★ 45ksame name
- marcus/sidecar★ 1.1ksame name
- rshankras/claude-code-apple-skills★ 777same name
- wshaddix/dotnet-skills★ 79same name
- ahmed3elshaer/everything-claude-code-mobile★ 66same name
- growthbook/skills★ 23same name
- roanbrasil/engineer-grade-agent-skills★ 8same name
- YepAPI/skills★ 8same name
- Cure-Consulting-Group/ProductEngineeringSkills★ 3same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- github-pages/agents.mdAGENTS.md
- adrSkill
- agent-protocolsSkill
- angular-idiomsSkill
- api-documentationSkill
- axum-idiomsSkill
- browser-automationSkill
- chaos-testingSkill
- ci-cdSkill
- cli-developmentSkill
- code-auditSkill
- code-reviewSkill
- cpp-idiomsSkill
- csharp-idiomsSkill
- data-engineeringSkill
- debugging-protocolSkill
- django-idiomsSkill
- dotnet-idiomsSkill
- elixir-idiomsSkill
- embedded-systemsSkill
- flutter-idiomsSkill
- frontend-designSkill
- git-commit-integritySkill
- go-idiomsSkill
- guardrailsSkill
- hono-idiomsSkill
- incident-responseSkill
- java-idiomsSkill
- javascript-idiomsSkill
- kotlin-idiomsSkill
- laravel-idiomsSkill
- logging-implementationSkill
- ml-engineeringSkill
- mobile-designSkill
- mobile-testingSkill
- nextjs-idiomsSkill
- parallel-dispatchSkill
- payment-integrationSkill
- perf-optimizationSkill
- php-idiomsSkill
- postgres-idiomsSkill
- python-idiomsSkill
- rails-idiomsSkill
- react-idiomsSkill
- refactoring-patternsSkill
- research-methodologySkill
- ruby-idiomsSkill
- rust-idiomsSkill
- security-auditSkill
- sequential-thinkingSkill
- spring-boot-idiomsSkill
- sql-idiomsSkill
- structured-specSkill
- supply-chain-securitySkill
- swift-idiomsSkill
- testability-patternsSkill
- testing-strategySkill
- typescript-idiomsSkill
- vue-idiomsSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 89
Every flag must have an owner (the team or developer responsible for its lifecycle)
- Distinctive: line 90
Every release flag has a maximum lifespan of 90 days
- Distinctive: line 91
When a release flag reaches 100% rollout, create a ticket immediately to remove it
- Distinctive: line 93
Experiment flags: must be removed when the experiment concludes
- Distinctive: line 104
Do not write tests that enumerate every possible flag combination
- Very specific: line 105
Use a test-only flag override mechanism (e.g., flags.Override(ctx, "flag", true)) — never branch test logic on environment variables
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Feature Flags Principles
[!CAUTION] Do NOT implement feature flags unless explicitly required.
Feature flags add real operational complexity: flag evaluation infrastructure, lifecycle management, and a multiplicative increase in test permutations. The cost is non-trivial for solo developers or simple projects.
Only introduce feature flags when the PRD or technical architecture document explicitly specifies one of:
- Gradual / percentage rollout of a risky feature
- A/B testing or experimentation
- Emergency kill switches for production code paths
- Feature entitlement gating by user tier or permission
If none of these are specified, deploy code directly. Do not introduce flags speculatively.
When to Use Feature Flags
Feature flags decouple deployment from release. Code ships to production but stays dormant until the flag enables it. This is valuable for:
| Use case | Flag type | Example |
| Gradual rollout | Release flag | new-checkout-flow: 0→5→25→100% |
| Emergency kill switch | Ops flag | use-legacy-payment-provider |
| A/B test / experiment | Experiment flag | button-color-blue-vs-green |
| Tier / permission gating | Permission flag | pro-tier-analytics |
Infrastructure Requirements
[!IMPORTANT] The flag evaluation backend must be specified in the technical architecture document before implementation begins. Do NOT choose a provider independently — ask the user which infrastructure to use.
| Approach | When to use | Notes |
| Managed SaaS | Teams > 5, multi-environment, complex targeting | LaunchDarkly, Flagsmith, Unleash Cloud |
| Self-hosted | Full control, no SaaS dependency | Unleash (OSS), Flagsmith (OSS) |
| Firebase Remote Config | Mobile apps in the Firebase ecosystem | Firebase SDK required |
| Static config (YAML / env) | Solo dev, simple on/off, single environment | Loaded at startup; no runtime targeting |
Flag configuration is infrastructure — it must be provisioned before code references it.
Flag Evaluation Rules
- Evaluate server-side for security-sensitive features (never trust the client)
- Evaluate at request boundary — never inside pure business logic functions
- Default to disabled — if the flag service is unreachable, the flag is off (fail closed)
- Wrap flag checks once — in a service method or middleware, not scattered across business logic
Pattern:
// ✅ Flag evaluation at the boundary (handler or service entry point)
func (s *Service) CreateOrder(ctx context.Context, req Request) (Response, error) {
useNewPricing := s.flags.IsEnabled(ctx, "new-pricing-engine", req.UserID)
if useNewPricing {
return s.handleWithNewPricing(ctx, req)
}
return s.handleWithLegacyPricing(ctx, req)
}
// ❌ Flag evaluation buried inside business logic
func calculateDiscount(items []Item) float64 {
if flags.IsEnabled("new-discount-rules") { ... } // NO
}Flag Lifecycle Rules
Flags are temporary by design. Flag debt accumulates fast and becomes a maintenance burden.
- Every flag must have an owner (the team or developer responsible for its lifecycle)
- Every release flag has a maximum lifespan of 90 days
- When a release flag reaches 100% rollout, create a ticket immediately to remove it
- Ops (kill switch) flags can be permanent but must be documented as such
- Experiment flags must be removed when the experiment concludes
- Review all flags in sprint planning — any flag past its expiry date is tech debt
Testing with Feature Flags
Feature flags multiply test permutations. Keep tests tractable:
- Unit tests test each branch independently (flag on + flag off)
- Integration tests default the flag to its production-expected state (usually fully on or off)
- Do not write tests that enumerate every possible flag combination
- Use a test-only flag override mechanism (e.g.,
flags.Override(ctx, "flag", true)) — never branch test logic on environment variables
CI/CD Checklist (Feature Flags)
- Flag infrastructure specified in technical architecture document?
- Flag backend provisioned and accessible by the application?
- Every flag has an owner and expiry date set?
- Flag evaluation is server-side for security-sensitive paths?
- Default state is
disabled(fail closed)? - Unit tests cover both flag-on and flag-off code paths?
- Removal ticket created once flag reaches 100% rollout?
Related Principles
- CI/CD Principles @.agents/skills/ci-cd/SKILL.md (deployment vs release concept)
- Architectural Patterns — Testability-First Design @architectural-pattern.md
- Core Design Principles @core-design-principles.md (YAGNI)
- Security Mandate @security-mandate.md (server-side evaluation)
- Rule Priority @.agents/rules/rule-priority.md
- Configuration Management Principles @.agents/rules/configuration-management-principles.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

