feature-flag
Skill2 starsChanged 4 months agoMITView on GitHub
Gate a feature or code path behind a feature flag — using the project's flag system (LaunchDarkly, Unleash, a config/env toggle) — so it can be shipped dark and rolled out or rolled back without a deploy. Use when the user says "put this behind a feature flag", "add a feature toggle", "gate this feature", "make this configurable on/off", or "ship this dark".
- Reads credentials
4 other projects use a version of this.
Adopted by
Most recently taken up by
- speakeasy-api/gramtheir own version, first seen Nov 13, 2026
- elastic/docs-buildertheir own version, first seen Nov 4, 2026
- Automattic/pocket-casts-iostheir own version, first seen Oct 8, 2026
- njt2810/claude-code-frameworktheir own version, first seen Sep 10, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- Automattic/pocket-casts-ios★ 1.8ksame name
- speakeasy-api/gram★ 278same name
- elastic/docs-builder★ 26same name
- njt2810/claude-code-framework★ 1same name
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 repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Use the project's existing flag system and naming.
- Distinctive: line 30
Default to the safe/old behavior and fail to that default if the flag can't be evaluated — never let an unreachable flag service enable an …
- Distinctive: line 31
Keep both branches working and behavior-preserving when off.
- Distinctive: line 33
After wiring, summarize the flag name, where it's gated, its default, the targeting context, and the cleanup step to remove it post-rollout.
“Common” is measured: kept by at least 6 in 10 of the 4 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
Flag system signals
!grep -rilE "launchdarkly|ld-client|unleash|flagsmith|split\\.io|posthog|growthbook|featureFlags?|isEnabled\\(|@FeatureFlag" --include='*.*' . 2>/dev/null | grep -vE 'node_modules|\.git|dist|build' | head -10
!ls .env.example config 2>/dev/null && grep -iE "FLAG|FEATURE|ENABLE_" .env.example 2>/dev/null | head
Instructions
Gate the feature in $ARGUMENTS behind a flag. If the flag name or the boundary to gate isn't clear, confirm before editing. Use the project's existing flag mechanism — don't introduce a new flag platform unprompted.
Method
- Find the existing flag convention. From the signals above, identify whether the project uses a flag service (LaunchDarkly/Unleash/Flagsmith/Split/GrowthBook), a config/env toggle, or nothing yet. Mirror how flags are named, defined, and read. If there's no system and the user wants something simple, propose a minimal config/env-based toggle and confirm before adding a dependency.
- Gate at the right seam. Wrap the smallest boundary that cleanly switches the behavior — a route, a component, a branch in a service — so both paths are clear. Keep the old path intact and reachable when the flag is off; the flag should choose between two working states, not leave a half-built one.
- Default off and fail safe. A new flag defaults to its safe/old behavior, and if the flag service is unreachable the evaluation falls back to that default (never crashes or silently enables an unfinished feature). Evaluate the flag with the right context (user/tenant/environment) where the system supports targeting.
- Register the flag wherever the project tracks them (the flag dashboard config, a constants/enum file,
.env.example) so it's discoverable and not a magic string. Use one canonical name. - Plan for removal. A flag is temporary scaffolding — note that once the feature is fully rolled out, both the flag check and the dead old path should be removed (the
dead-code/refactorskills can do that later). Avoid deep nesting of multiple flags.
Rules
- Use the project's existing flag system and naming; only add a new mechanism (and dependency) with the user's go-ahead.
- Default to the safe/old behavior and fail to that default if the flag can't be evaluated — never let an unreachable flag service enable an unfinished feature or break the request.
- Keep both branches working and behavior-preserving when off; the flag selects between states, it doesn't ship broken code behind a false.
- Make the flag discoverable (registered/named in one place), not a bare hardcoded string scattered around.
- After wiring, summarize the flag name, where it's gated, its default, the targeting context, and the cleanup step to remove it post-rollout.
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.

