跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

manage-flag-lifecycle

Manage metadata and lifecycle for a Harness FME feature flag: update description, tags, owners, rollout status; assess archive readiness (usage, experiments, dependents); archive/unarchive; delete definitions in one environment; delete the flag. Supports single flags or explicit small lists (≤ 20). Use when asked to change flag metadata, archive a flag, check if a flag is safe to archive, unarchive a flag, or delete a flag/definition. Do not use for targeting changes (update-flag-targeting), creating flags (create-feature-flag), discovering stale flags across a project (discover-feature-flags), removing flag code (cleanup-feature-flags), or rollout pipelines (fme-pipeline). Trigger phrases: update flag description, flag metadata, archive flag, unarchive flag, delete flag, archive readiness, is flag safe to archive, flag lifecycle.

Harness · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add harness/harness-skills --skill manage-flag-lifecycle

技能说明


name: manage-flag-lifecycle description: >- Manage metadata and lifecycle for a Harness FME feature flag: update description, tags, owners, rollout status; assess archive readiness (usage, experiments, dependents); archive/unarchive; delete definitions in one environment; delete the flag. Supports single flags or explicit small lists (≤ 20). Use when asked to change flag metadata, archive a flag, check if a flag is safe to archive, unarchive a flag, or delete a flag/definition. Do not use for targeting changes (update-flag-targeting), creating flags (create-feature-flag), discovering stale flags across a project (discover-feature-flags), removing flag code (cleanup-feature-flags), or rollout pipelines (fme-pipeline). Trigger phrases: update flag description, flag metadata, archive flag, unarchive flag, delete flag, archive readiness, is flag safe to archive, flag lifecycle. metadata: author: Harness version: 1.2.1 mcp-server: harness-mcp license: Apache-2.0 compatibility: Requires the Harness MCP server or the Harness CLI

Manage Flag Lifecycle

Manage metadata, archive readiness, archive/unarchive, and deletion for Harness FME feature flags. Related: update-flag-targeting (targeting), discover-feature-flags (stale flags), cleanup-feature-flags (code removal).

Tools

Works through the Harness MCP server or the Harness CLI; names are from tool-map.md.

OperationMCPCLI
List environmentsharness_list · fme_environment · compact: falseharness list fme_environment --json
List flagsharness_list · fme_feature_flag · size: 50 · filters: { name?, tags?, rollout_status_id?, offset? } · compact: falseharness list feature_flag --search <name> --status <ACTIVE|ARCHIVED> --json (CLI has no --tags/--rollout-status-id; filter client-side on the full JSON, which MCP's tags/rollout_status_id filters do server-side)
Get flagharness_get · fme_feature_flag · params.feature_flag_nameharness get feature_flag <name> --json
Update flagharness_update · fme_feature_flag · params.feature_flag_name · body: { description?, tags?, owners?, rolloutStatus? }harness update feature_flag <name> --set description="..." --set rollout_status=<uuid> (CLI field id is rollout_status; --set rolloutStatus.id= doesn't match the spec's mutable field id and fails)
List definitionsharness_list · fme_feature_flag_definition · params.feature_flag_name · filters: { offset: 0, limit: 100 } (advance offset through every page) · compact: falseharness list feature_flag:definition <flag> --json
Get definitionharness_get · fme_feature_flag_definition · params: { feature_flag_name, environment_id }harness get feature_flag:definition <flag> --env <env-id> --json
Delete definitionharness_delete · fme_feature_flag_definition · params: { feature_flag_name, environment_id }harness delete feature_flag:definition <flag> --env <env-id>
Archive flagharness_execute · fme_feature_flag · action="archive" · params.feature_flag_name · body: { comment?, title? }harness execute feature_flag:archive <name> --comment "..." --title "..."
Unarchive flagharness_execute · fme_feature_flag · action="unarchive" · params.feature_flag_name · body: { comment?, title? }harness execute feature_flag:unarchive <name> --comment "..."
Delete flagharness_delete · fme_feature_flag · params.feature_flag_nameharness delete feature_flag <name>
List experimentsharness_list · fme_experiment · filters: { parent_type: "FEATURE_FLAG", parent_name, environment_id?, status: ["ACTIVE", "PAUSED"], offset: 0, limit: 100 } (apply pagination completeness checks) · compact: falseharness list experiment --parent-type FEATURE_FLAG --parent-name <name> --status ACTIVE --json, then again with --status PAUSED
List rollout statusesharness_list · fme_rollout_status · compact: falseharness list rollout_status --json

Output

Structured summary per operation-summary.md:

  • Metadata: before → after for changed fields
  • Archive readiness: verdict (ready / caution / blocked), per-env impressions.lastImpressionAt, active experiments, dependents (if checked)
  • Archive/unarchive/delete: verification result (status or 404), per-env impact
  • Next steps or follow-up actions

Instructions

Follow write-safety.md for all writes. Concepts are in concepts.md.

Phase 1: Establish scope

Follow scope-establishment.md. Restate scope before proceeding.

Phase 2: Collect inputs

Ask for flag name(s) and the operation. For metadata updates, ask which fields to change. For delete definition, ask for the target environment ID. If the user asks "is this flag safe to archive", run the archive readiness gate (Phase 5) and stop there.

Phase 3: Read current state

Get flag metadata. For archive/unarchive/delete operations, also list definitions through every page using explicit MCP filters.limit: 100; size does not control this list. Follow pagination for definitions, environments and experiments; incomplete inventories stop readiness/deletion checks. Report current metadata (description, tags, owners, rolloutStatus, status) and per-env definition summary (environment ID/name, impressions.lastImpressionAt, isKilled, defaultTreatment).

Phase 4: Metadata update

If updating rollout status, list rollout statuses first, resolve the user's name to the UUID, then show the resolved name. Tags and owners are arrays and replaced whole in a merge patch. Read first, merge th

阅读完整来源 ↗