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

explain-flag

Explain a single FME feature flag in plain language: purpose, default rule, and per-environment targeting state, flagging inconsistencies across environments inline. A quick-lookup/explain capability, not a search across many flags - disambiguates when the name/key given is ambiguous. Doesn't create, kill, or modify anything - see manage-feature-flags for mutations. Trigger phrases: what does this flag do, explain this flag, how is X configured, is X on in prod, what's targeted for X.

Harness · 已有静态检查记录

安装与使用

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

npx skills add harness/harness-skills --skill explain-flag

技能说明


name: explain-flag description: >- Explain a single FME feature flag in plain language: purpose, default rule, and per-environment targeting state, flagging inconsistencies across environments inline. A quick-lookup/explain capability, not a search across many flags - disambiguates when the name/key given is ambiguous. Doesn't create, kill, or modify anything - see manage-feature-flags for mutations. Trigger phrases: what does this flag do, explain this flag, how is X configured, is X on in prod, what's targeted for X. metadata: author: Harness version: 1.1.2 mcp-server: harness-mcp-v2 license: Apache-2.0 compatibility: >- Requires Harness MCP v2 server (harness-mcp-v2) with fme_feature_flag and fme_feature_flag_definition, using Harness-native scoping (org_id + project_id). Read-only: no create/update/delete/execute calls.

Explain Flag

Answer "what does this flag do right now" for one named flag: its purpose, what serves by default, and how targeting differs (or doesn't) across environments - without touching anything.

Instructions

Step 1: Resolve scope

Get org_id + project_id if not already known. Don't use the deprecated workspace_id: the Step 4 definition list is Harness-native only. List environments up front, since Step 4 needs every environment:

Call MCP tool: harness_list
Parameters:
  resource_type: "fme_environment"
  org_id: "<org_id>"
  project_id: "<project_id>"
  compact: false

compact: false is required: the default compact list strips isProduction. Keep the full list with each environment's isProduction: Step 4 diffs against it for missing definitions, and Step 6 labels production environments ("is X on" questions almost always mean "in production").

Step 2: Find the flag, disambiguating if needed

Stop condition: if the user hasn't given any identifier at all (no name, key, or tag to search on), ask for one rather than listing every flag in the project as a substitute.

Call MCP tool: harness_list
Parameters:
  resource_type: "fme_feature_flag"
  org_id: "<org_id>"
  project_id: "<project_id>"
  filters:
    name: "<user's flag name/key, partial match ok>"

name is a substring match, so it often returns several candidates (e.g. searching checkout also returns checkout_v2 and new_checkout). If exactly one candidate's name is an exact, case-sensitive match to what the user typed, use it without asking - the other hits are substring noise. It's genuinely ambiguous only when no candidate is exact and several are plausible.

Stop condition: for genuine ambiguity, list the candidates (name, description, rolloutStatus.name, createdAt, openInHarness link) and ask which one - don't guess by recency. Near-identical flags often share copy-pasted descriptions and rollout status, so createdAt and the link may be the only distinguishing details.

Substring search can't surface a near-duplicate that differs from what the user typed by a transposition or an extra character - neither name contains the other, so each is invisible to the other's search. If the name looks generic (short, numbered, one of a family) or the user seems unsure of the spelling, run a second search on a shorter fragment of it before treating a single hit as certain.

Step 3: Get flag metadata

Call MCP tool: harness_get
Parameters:
  resource_type: "fme_feature_flag"
  org_id: "<org_id>"
  project_id: "<project_id>"
  resource_id: "<flag_name>"

Read description, tags, trafficType (an object - use .name, don't print the raw object), owners (array of {type, name} - join names with commas), rolloutStatus.name (e.g. Pre-Production, Killed), and openInHarness (direct link). Treat a missing description the same as an empty one: "no description set".

rolloutStatus is a manually set, project-level lifecycle label, not live state - a flag labeled Killed can still be live (isKilled: false) in some environments. When it disagrees with Step 4's isKilled, say so and trust isKilled.

Step 4: Get targeting for every environment

List every environment's definition for this flag in one call rather than one get per environment:

Call MCP tool: harness_list
Parameters:
  resource_type: "fme_feature_flag_definition"
  org_id: "<org_id>"
  project_id: "<project_id>"
  filters:
    feature_flag_name: "<flag_name>"
  compact: false

compact: false is required: the default compact list strips every targeting field below. For each environment's definition, read isKilled (per environment - a flag can be killed in one and live in another), treatments, defaultTreatment (served when the flag is killed or the traffic isn't allocated), defaultRule (buckets served when no targeting rule matches), rules (each with buckets + a condition), trafficAllocation, and impressions.lastImpressionAt (most recent impression; null = never received traffic). If impressions is absent, report last impression as unknown, not as unused.

Diff the returned environments against Step 1's full list explicitly. An environment with no definition is "not configured in <env>" - a distinct state, not a copy of another environment's config.

Step 5: Synthesize and flag inconsistencies

Compare across environments before writing the summary, not after - inconsistency-spotting is the point of this skill, not an afterthought:

  • Is isKilled the same across environments? A flag killed in one environment and live in another is the single most important inconsistency to surface - it usually means a rollback happened in one place and never propagated, or was never meant to.
  • Same defaultTreatment and defaultRule split, or does one environment default differently (e.g. prod at 30/70, staging at 50/50)?
  • Same targeting rules (same conditions, same treatment splits), or does one environment have rules the others lack?
  • Same trafficAllocation, or is one environm
阅读完整来源 ↗