/harness:cleanup-feature-flagsfrom Harness DevOps
Removes a launched Harness FME feature flag from application code, hardcodes the winning treatment, and opens a pull request. Use for flag cleanup after rollout.
Ships in Harness DevOps. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
73 skills in this plugin
/ai-operationsConfigure Harness AI-powered operations (AIDA) via MCP. Set up predictive failure analysis with ML models for memory leaks, disk exhaustion, connection pool saturation, and latency degradation. Configure intelligent alert correlation and noise reduction to reduce alert volume. Use when asked to set up predictive failure analysis, configure AI-powered alerting, reduce alert noise, or enable ML-based anomaly detection. Do NOT use for pipeline debugging (use debug-pipeline instead) or SLO management (use manage-slos instead). Trigger phrases: AIDA, predictive failure, alert correlation, noise reduction, anomaly detection, AI ops, predictive analysis, alert fatigue, ML alerting, intelligent alerting./analyze-costsAnalyze cloud costs, find optimization opportunities, and track anomalies using Harness CCM via MCP. Use when user says "cloud costs", "analyze costs", "cost optimization", "reduce spending", "cost report", or asks about cloud bills./approve-exemptApprove pending Harness STO security exemptions (waivers) at their current scope or elevate them to Project, Org, or Account scope. Users say "approve" for both in-scope approval and higher-scope elevation — do not require the word "promote". Supports approving one exemption or a mixed list where each row has a different approval scope. Default workflow lists pending exemptions in chat (paginated preview) so the user picks by row number — no copying from the Harness UI. Use when a user wants to approve, sign off on, or clear pending exemptions, waive approvals, org-wide approval, or account-wide approval. Trigger phrases: approve exempt, approve exemption, approve waiver, sign off exemption, clear pending exemption, approve for org, approve for account, org-wide approval, account-wide approval, pending exemptions./audit-reportGenerate audit reports and compliance trails using Harness audit trail data via MCP v2 tools. Track user actions, resource changes, authentication events, and access patterns across accounts, organizations, and projects. Use when asked to audit activity, generate compliance reports, investigate security incidents, review user actions, check change logs, or produce SOC2/GDPR/HIPAA audit evidence. Trigger phrases: audit report, audit trail, compliance audit, user activity log, change log, access audit, security investigation, who changed what, audit events./chaos-code-risk-scanScan a source code repository for resilience risks that a Harness chaos experiment can prove (outbound calls without timeouts, retries without backoff, missing graceful shutdown, health checks that mask dependency state, unbounded queues and pools, local state), map each one to a generic SourceCode risk rule, and report them to Harness as a CodeRepository risk scan. Use when the user asks to scan a repo or service code for resilience or chaos risks, or wants code findings they can verify with chaos experiments. Do not use for manifest or pipeline risk scans (those run in Harness), to create or run chaos experiments (use chaos-experiment), or for security or code quality review. Trigger phrases: scan this repo for resilience risks, chaos code scan, find chaos-provable risks, code risk scan, resilience review of this service./chaos-dr-testUse when working with Chaos Engineering steps inside a Harness pipeline. Covers ChaosFault, ChaosProbe, ChaosAction steps (DRTest stages), the Chaos step (DRTest stages), and DRTest stage/pipeline structure. Use when the user asks to add, modify, or create chaos steps, fault injection, probes, or disaster recovery test pipelines. Do not use for standalone Chaos Experiment create or edit; use chaos-experiment for those. Trigger phrases: DR test, DRTest pipeline, disaster recovery test, chaos step, ChaosFault step, ChaosProbe step, ChaosAction step.npx claudepluginhub harness/harness-ai --plugin harnessOther plugins' skills for the same job