create-feature-flag
Skill127 starsChanged 30 days agoApache-2.0View on GitHub
Create a new Harness FME feature flag and its per-environment definitions with a safe default, following the project's naming and tagging conventions. Use when asked to create a feature flag, add a flag, set up a new FME flag, or initialize flag targeting. Flag/definition writes only: does not gate application code (instrument-feature-flag) and is not a first-time onboarding entry point (feature-flag-onboarding). Do not use for updating existing flag targeting (update-flag-targeting), deep analysis of a single flag (explain-flag), listing/discovering flags (discover-feature-flags), flag lifecycle like archive/delete (manage-flag-lifecycle), segments (manage-segments), experiments (manage-experiments), pipeline rollouts (fme-pipeline), or removing flags from code (cleanup-feature-flags). Trigger phrases: create feature flag, add flag, new flag, set up flag, FME flag create, initialize flag.
In this repository76 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/harness.mdcCursor rule
- manage-rolesSkill
- manage-usersSkill
- create-agentSkill
- create-agent-templateSkill
- dbops-changesetSkill
- choose-metricSkill
- cleanup-feature-flagsSkill
- create-experimentSkill
- create-metricSkill
- discover-feature-flagsSkill
- explain-flagSkill
- feature-flag-onboardingSkill
- fme-pipelineSkill
- instrument-feature-flagSkill
- instrument-metricSkill
- manage-experimentsSkill
- manage-flag-lifecycleSkill
- manage-segmentsSkill
- review-experiment-resultsSkill
- update-flag-targetingSkill
- create-connectorSkill
- create-environmentSkill
- create-infrastructureSkill
- create-secretSkill
- create-serviceSkill
- ai-operationsSkill
- analyze-costsSkill
- audit-reportSkill
- chaos-code-risk-scanSkill
- chaos-dr-testSkill
- chaos-experimentSkill
- create-policySkill
- deployment-readinessSkill
- dora-metricsSkill
- gitops-statusSkill
- incident-responseSkill
- manage-idpSkill
- manage-slosSkill
- optimize-pipelineSkill
- pr-analysisSkill
- scorecard-reviewSkill
- security-reportSkill
- sei-analyticsSkill
- template-usageSkill
- create-pipelineSkill
- create-pipeline-v1Skill
- create-templateSkill
- create-triggerSkill
- debug-pipelineSkill
- manage-freeze-windowsSkill
- migrate-pipelineSkill
- run-pipelineSkill
- create-sbomSkill
- enforce-sbomSkill
- manage-artifactsSkill
- manage-cdeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
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
- Very specific: line 28
Create a new Harness FME feature flag and optionally its per-environment definitions with safe defaults, following the project's existing …
- Very specific: line 48
Follow scope-establishment.md.
- Distinctive: line 57
Name: Follow the convention (let API validate.
- Distinctive: line 58
Traffic type: Must exist in traffic types list.
- Very specific: line 59
Treatments: Default on/off or user-specified.
- Very specific: line 61
Environments to initialize: Default = all non-production.
- Distinctive: line 62
Tags, description: Follow the convention. Include linked ticket if provided.
- Distinctive: line 63
Owners: Never auto-pick from convention alone.
- Distinctive: line 69
Follow write-safety.md. Show the plan:
- Distinctive: line 78
STOP and wait for explicit confirmation.
- Distinctive: line 109
Write calls: 1 flag create + N definition creates (sequential, not parallel).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create Feature Flag
Create a new Harness FME feature flag and optionally its per-environment definitions with safe defaults, following the project's existing conventions. Related: update-flag-targeting (ramp), manage-experiments (A/B test).
Tools
Works through the Harness MCP server or the Harness CLI; names are from tool-map.md.
| Operation | MCP | CLI |
| List flags | harness_list · fme_feature_flag · size: 50 · compact: false | harness list feature_flag --json --limit 50 |
| Get flag | harness_get · fme_feature_flag · params.feature_flag_name | harness get feature_flag <name> --json |
| List environments | harness_list · fme_environment · compact: false | harness list fme_environment --json |
| List traffic types | harness_list · fme_traffic_type · compact: false | harness list traffic_type --json |
| Get definition | harness_get · fme_feature_flag_definition · params: { feature_flag_name, environment_id } | harness get feature_flag:definition <flag> --env <env-id> --json |
| Create flag | harness_create · fme_feature_flag · body: { name, trafficType, description?, tags?, owners? } | harness create feature_flag <name> --traffic-type <type> --set description="..." plus --add tags.<name> per tag, or -f flag.json with the full approved body (CLI's tags/owners are collection fields — --set tags=[...] isn't valid syntax) |
| Create definition | harness_create · fme_feature_flag_definition · params: { feature_flag_name, environment_id } · body: { treatments, defaultTreatment, defaultRule, comment? } | harness create feature_flag:definition <flag> --env <env-id> -f def.json |
Instructions
Phase 1: Scope
Follow scope-establishment.md. Restate: Working in org=..., project=....
Phase 2: Explore conventions
List flags (≤50) to infer naming pattern (kebab-case, prefixes), common tags, and usual traffic type. List traffic types. List environments and note isProduction. Optionally get definition from 1–2 similar flags to learn treatment names. Summarize conventions in 3 bullets.
Phase 3: Propose
Based on conventions and user's purpose, propose. When delegated, preserve the caller's confirmed traffic type, treatments/config/safe default, purpose and description/ticket; verify them against live prerequisites instead of replacing them with convention-derived defaults:
- Name: Follow the convention (let API validate; don't invent character rules).
- Traffic type: Must exist in traffic types list.
- Treatments: Default
on/offor user-specified. Nevercontrol(reserved; see concepts.md). - Safe default: See targeting-recipes.md for the definition body.
- Environments to initialize: Default = all non-production. Production only if asked. Delegated integration:
/instrument-feature-flagand/feature-flag-onboardingmust supply one confirmed environment; initialize only that environment. If selection is missing, STOP and ask—never fall back to all non-production on the caller's behalf. - Tags, description: Follow the convention. Include linked ticket if provided.
- Owners: Never auto-pick from convention alone. Show the owners found on similar flags as candidates and ask the user to explicitly confirm who the owner(s) should be for this flag before including them in the plan.
Name collision check: Get flag in the confirmed scope. If the flag exists during a delegated create, return the collision and verified existing IDs/state to the caller without mutation; ask whether to reuse it or choose a different name. Do not continue into targeting changes or silently reuse it. For standalone creation, offer /update-flag-targeting or a newly approved name. A 404 still requires correct scope/identifier/access before creation.
Phase 4: Plan and confirm
Follow write-safety.md. Show the plan:
Plan: Create feature flag `<name>` — <purpose>
Flag metadata: name, traffic type, description, tags, owners
Initial definitions:
| Environment | isProduction | Targeting |
| <env-name> | No | 100% <defaultTreatment> (everyone gets safe/off treatment) |
Production: <"No definitions" or list production envs>STOP and wait for explicit confirmation.
Phase 5: Execute
Create flag. Then create definition for each environment (non-production first). Audit comment: "create-feature-flag: initial definition with safe default — <ticket or purpose>".
If a definition create fails partway through, report exactly which environments succeeded and which failed — don't assume state; get flag and get definition for each target environment to read back what's actually live. Resume from that live state: create only the missing/failed definitions, don't delete and restart the whole flag. Only offer to delete the flag if the user asks for a clean restart. On 400 validation error, fix per schema-validation-loop.md.
Phase 6: Verify
Get flag and get definition for each environment. Restate:
Created flag `<name>` (<trafficType>).
- In <env1>, <env2>: everyone gets `<defaultTreatment>`.
- Production / other environments: no definition, SDKs return `control`.This skill creates flag metadata and definitions only — it does not touch application code. For code gating, hand off to /instrument-feature-flag; for further targeting changes, /update-flag-targeting; for A/B tests, /manage-experiments.
Return to caller: if this skill was invoked as a delegated step (e.g. by /instrument-feature-flag or /feature-flag-onboarding), return the created flag/environment/definition identifiers and this verification to that caller and stop here — do not continue into code integration or targeting changes yourself, and do not re-invoke the caller.
Examples
- "Create a feature flag for the new checkout flow" — Infer conventions, propose name, create flag + non-prod definitions.
- "Add a dark mode flag for users in dev and staging" — Create flag, initialize dev and staging only.
- "Set up a flag for FME-1234 with treatments
v1andv2" — Use ticket in tags/description, create flag with custom treatments. - "I need a feature flag" — Ask for purpose, infer conventions, propose name and traffic type.
Performance Notes
- Convention inference: ~3–5 read-only calls (flags list, traffic types, environments, optional definitions sample, collision check).
- Write calls: 1 flag create + N definition creates (sequential, not parallel).
- Pagination: See tool-map.md.
Troubleshooting
| Problem | Solution |
| 409 "flag already exists" | Re-read state. When delegated, return the collision to the caller without mutation and require a reuse/new-name decision; otherwise offer /update-flag-targeting or a newly approved name. |
| 400 "invalid name" or "invalid traffic type" | Use the API message to correct. Don't invent character rules. |
| User wants to update existing flag | STOP. Route to /update-flag-targeting. |
See tool-map.md for generic errors.
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.

