Remove a launched Harness FME feature flag from application code, keeping the treatment FME serves today, and open a pull request. Use when asked to remove a flag from code, hardcode the winning treatment after a rollout, or pay down flag debt for a specific flag. Do not use for finding stale flags (discover-feature-flags) or archiving and deleting flags in FME (manage-flag-lifecycle). Trigger phrases: remove flag from code, hardcode treatment, flag cleanup, flag debt, clean up feature flag.
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Remove one launched FME flag from application code and keep the branch FME serves today. The work ends with a PR. FME is read-only here; archive happens later in manage-flag-lifecycle.
Related: discover-feature-flags finds candidates (stale audit); manage-flag-lifecycle archives after the change deploys.
Works through the Harness MCP server or the Harness CLI; names are from tool-map.md.
| Operation | MCP | CLI |
|---|---|---|
| List environments | harness_list · fme_environment · compact: false | harness list fme_environment --json |
| Get flag | harness_get · fme_feature_flag · params: { feature_flag_name } | harness get feature_flag <flag> --json |
| List flag definitions | harness_list · fme_feature_flag_definition · params: { feature_flag_name } · filters: { offset: 0, limit: 100 } · compact: false | harness list feature_flag:definition <flag> --json |
| List experiments | harness_list · fme_experiment · filters: { parent_type: "FEATURE_FLAG", parent_name, status: ["ACTIVE", "PAUSED"], offset: 0, limit: 100 } (apply pagination completeness checks) · compact: false | harness list experiment --parent-type FEATURE_FLAG --parent-name <flag> --status ACTIVE --json, then again with --status PAUSED |
Load readiness.md before giving a verdict. Load sdk-patterns.md before searching code.
Follow scope-establishment.md. Fully paginate List environments per pagination before confirming the critical environments: by default those with isProduction, plus any the user adds. The critical set must be non-empty and explicitly confirmed back to the user before any later phase. If no environment is marked isProduction and the user hasn't named any, STOP and ask which environments are critical — do not treat an empty critical set as vacuously ready.
If the user named a flag, Get flag to confirm it exists and note its status and rolloutStatus. If they want candidates instead, hand off to discover-feature-flags (stale audit) and come back with one flag.
filters.limit: 100 and advancing filters.offset until a short page (size is ignored). Incomplete coverage stops code removal; it cannot establish a missing definition or the live forward treatment. Resolve the forward treatment for each critical environment per readiness.md. If any call site uses WithConfig, also resolve and compare each critical environment's configurations value for that treatment — identical treatment names with differing configs are blocked, not ready.Never infer the forward treatment from the code's default or fallback value.
In the application repo, identify the SDK and search for the flag key, batch calls, flag sets, config-file entries and tests per sdk-patterns.md. For each hit, record file:line, which branch is the forward one, and any side effects (tracking, metrics, logging).
"prefix-" + id, `flag-${id}`), the verdict is blocked. Stop and ask the user how to proceed; automated removal can't be complete.Show:
If the forward treatment is control or a killed defaultTreatment, say plainly that the newer code path will be deleted. Edit nothing until the user explicitly confirms this plan.
WithConfig is used. Remove the dead branches, plus any flag-only constants, wrappers, imports, tests, fixtures, localhost or offline entries, and docs. Don't refactor unrelated code.Confirm with the user before pushing or opening the PR. Use the repo's normal tooling and its own PR template and conventions (for example .github/pull_request_template.md or CONTRIBUTING). Don't impose a format. Whatever the template, the description must capture:
WithConfig is used) in each, the verdict and any caution the user acknowledged, the experiment check result, and the last impression in each critical environment;manage-flag-lifecycle once this change is deployed everywhere the flag is evaluated, plus any other repos or services that may still reference it.Report the PR link and the follow-up: "After this deploys, use manage-flag-lifecycle to archive <flag>." Don't archive or delete here.
new-checkout-flow from this repo": verdict, plan, confirm, edit, verify, PR, then the archive hand-off.dark-mode": resolve the forward treatment from the live definitions, not from the code.defaultTreatment; warn that the new path is deleted.discover-feature-flags (stale audit).manage-flag-lifecycle after the deploy.| Issue | Action |
|---|---|
| Critical environments disagree | blocked. Ask the user to align targeting (update-flag-targeting) or narrow the critical set. |
| An environment has no definition | Its forward treatment is control, so the fallback branch is live there. Treat it as caution and confirm. |
| Flag is already archived but still in code | Allowed. The forward treatment is control; confirm the fallback branch is what users get today. |
| ACTIVE experiment on the flag | blocked. Finish it first (manage-experiments). |
Code uses WithConfig | Hardcode the treatment's config value from the definition, not just the name. If critical environments share the treatment name but have different config values, that's blocked, not ready — hardcoding would silently diverge environment behavior. |
| No explicit critical environment set | Stop and ask. Don't default to "ready" on an empty or unconfirmed critical set. |
| Only one repo searched | Record that scope in the PR and summary. Don't claim the flag is fully unused until other repos/services are confirmed or searched. |
| Dynamic flag keys | blocked. Stop and ask the user. |
| No call sites found | caution. Check other repos and flag sets before claiming the flag is unused. |
harness/harness-ai
ca2ab81
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.