feature-flag
Skill25 starsChanged 19 days agoApache-2.0View on GitHub
Registers a feature flag as additive-only and verifies the flag-off path still matches the previous default. Use whenever adding or extending a feature flag, editing FeatureFlags.cs, changing feature_flags in assembler.yml, gating a code path behind a FEATURE_* environment variable, or enabling a flag in an environment. Do not skip this skill for flag work even if the user does not name it.
We split this skill into the rules it gives an agent
10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Read this skill before you add any of these:
- Very specific: line 32
Follow the test pattern in tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs
- Distinctive: line 40
Do not move, hide, relocate, or delete existing output when you introduce the flag.
- Very specific: line 46
Add a typed property on FeatureFlags.
- Distinctive: line 47
Add YAML keys only in the environments that opt in.
- Very specific: line 48
Do not turn the flag on in prod as part of creating it.
- Very specific: line 52
Put the if (flag) around new code.
- Distinctive: line 62
If anything that already shipped is missing, moved, or changed when the flag is off, stop.
- Distinctive: line 74
Do not ship a flag whose existing behavior lives only on the new path.
- Distinctive: line 76
Do not treat "the new path has it" as coverage for the old path.
“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
Feature Flag Skill
A feature flag is additive. Flag off keeps the previous default. Flag on adds new behavior only.
When to use
Read this skill before you add any of these:
- A typed flag on
FeatureFlags - A
feature_flagsYAML key - A
FEATURE_*environment override - An
if (flag)around a code path
How flags work
- Typed flags live in
src/Elastic.Documentation.Configuration/Builder/FeatureFlags.cs - Keys normalize to kebab-case. The env override is
FEATURE_<UPPER_SNAKE> - Per-environment YAML keys live under
feature_flagsinconfig/assembler.ymlasUPPER_SNAKE - Flags stay off unless listed. Do not enable a new flag in
prodwhen you create it PublishEnvironment.ToFeatureFlags()insrc/Elastic.Documentation.Configuration/Assembler/PublishEnvironment.csloads YAML keys throughSet()- Follow the test pattern in
tests/Elastic.Documentation.Build.Tests/FeatureFlagsTests.cs
Steps
1. Additive means
Flag off equals the previous default in behavior. Flag on adds new behavior only.
Do not move, hide, relocate, or delete existing output when you introduce the flag.
New behavior is a new panel, a new build step, or a new field. It is not a relocated copy of something that already shipped.
2. Register the flag
- Add a typed property on
FeatureFlags. The default stays false. - Add YAML keys only in the environments that opt in.
- Do not turn the flag on in
prodas part of creating it.
3. Gate only the new path
Put the if (flag) around new code. Leave the existing branch as it was.
Shared markup, layout, and data wiring that the old path still needs stay outside the flag.
4. Verify additivity before you finish
This step is required. Do not skip it.
- List every existing surface the change touches. Include render paths, CLI output, build steps, API payloads, mobile and desktop, and assembler vs isolated builds.
- For each surface, compare the flag-off branch to the pre-change code or output.
- If anything that already shipped is missing, moved, or changed when the flag is off, stop. Restore it on the default path.
5. Prove it with tests
- The flag defaults to false.
- Flag-off preserves existing behavior.
- Flag-on shows the new behavior.
- Sibling flags stay unchanged.
- Prod, or the default environment, does not enable the new flag.
6. Stop conditions
Do not ship a flag whose existing behavior lives only on the new path.
Do not treat "the new path has it" as coverage for the old path.
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★ 275same name
- Pradnyeshp/Claude-Skills★ 2same 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 repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- src/Elastic.ApiExplorer/AGENTS.mdAGENTS.md
- src/Elastic.Documentation.Site/AGENTS.mdAGENTS.md
- src/Elastic.Markdown/AGENTS.mdAGENTS.md
- src/services/search/Elastic.Documentation.Search.Contract/AGENTS.mdAGENTS.md
- commitSkill
- issueSkill
- lintSkill
- mcp-searchSkill
- prSkill
- style-reviewSkill
- testSkill
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.

