/harness:manage-segmentsfrom Harness DevOps
Create, inspect, and maintain Harness FME segments (STANDARD, LARGE, RULE_BASED). Manage metadata, select type-specific definition and membership workflows, and check referencing flags before every mutation.
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.
Manage metadata for STANDARD, LARGE, and RULE_BASED segments, STANDARD membership, and approved RULE_BASED editor changes. Every mutation requires a complete reference-impact check and explicit approval. LARGE bulk membership operations are outside this skill's scope.
Works through Harness MCP or CLI with equivalent scope, confirmation and verification requirements. Discover exact CLI action syntax through command help; use tool-map.md for mappings. STANDARD in metadata examples stands for the selected type; definition/key rows apply only to STANDARD.
| Operation | MCP | CLI |
|---|---|---|
| List traffic types | harness_list · fme_traffic_type · compact: false | harness list traffic_type --json |
| List environments | harness_list · fme_environment · compact: false | harness list fme_environment --json |
| List flags | harness_list · fme_feature_flag · size: 50 · compact: false | harness list feature_flag --json --limit 50 |
| List experiments | harness_list · fme_experiment · filters: { parent_type: "FEATURE_FLAG", parent_name, environment_id, status: ["ACTIVE", "PAUSED"], offset: 0, limit: 100 } · compact: false | harness list experiment --parent-type FEATURE_FLAG --parent-name <flag> --env <env-id> --status ACTIVE --json, then PAUSED; fully paginate both |
| 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 segments | harness_list · fme_segment · filters: { segment_type, status?, offset: 0, limit: 100 } · compact: false | harness list segment --segment-type STANDARD --json; safety gates list ACTIVE and ARCHIVED using declared status filters |
| Get segment | harness_get · fme_segment · params: { segment_name, segment_type } | harness get segment <name> --segment-type STANDARD --json |
| Create segment | harness_create · fme_segment · body: { name, trafficType, segmentType, description?, tags?, owners? } | harness create segment <name> --traffic-type user --segment-type STANDARD |
| Update segment | harness_update · fme_segment · params: { segment_name, segment_type } · body: { description?, tags?, owners? } | harness update segment <name> --segment-type STANDARD --set description=foo |
| Delete segment | harness_delete · fme_segment · params: { segment_name, segment_type } | harness delete segment <name> --segment-type STANDARD |
| List definitions | harness_list · fme_segment_definition · filters: { environment_id, status?, offset: 0, limit: 100 } · compact: false | harness list segment:definition --env <env-id> --json |
| Get definition | harness_get · fme_segment_definition · params: { segment_name, environment_id } | harness get segment:definition <name> --env <env-id> --json |
| Create definition | harness_create · fme_segment_definition · params: { segment_name, environment_id } · body: { description? }? | harness create segment:definition <name> --env <env-id> |
| Update definition | harness_update · fme_segment_definition · params: { segment_name, environment_id } · body: { description? } | harness update segment:definition <name> --env <env-id> --set description=foo |
| Delete definition | harness_delete · fme_segment_definition · params: { segment_name, environment_id } | harness delete segment:definition <name> --env <env-id> |
| List keys | harness_execute · fme_segment_definition · action="list_keys" · params: { segment_name, environment_id, offset?, limit? } | Discover the key-list action and pagination arguments through CLI help |
| Add keys | harness_execute · fme_segment_definition · action="add_keys" · params: { segment_name, environment_id, replace? } · body: { keys, comment?, title? } | Discover the key-add action and replacement argument through CLI help |
| Remove keys | harness_execute · fme_segment_definition · action="remove_keys" · params: { segment_name, environment_id } · body: { keys, comment?, title? } | Discover the key-remove action through CLI help |
Load references on demand:
Follow scope-establishment.md. Ask for the org and project if missing. Restate: Working in org=..., project=...
Ask only for what is missing:
isProduction)Resolve exact name and type, then choose the workflow below. Before every mutation, including metadata creation, definition provisioning and key additions, complete the usage check, present its impact with the plan, and obtain production-aware approval. Incomplete checks block writes; approval never waives coverage. Discover the selected operation's exact schema before execution and preserve native org/project scope.
| Type | Membership model | Workflow |
|---|---|---|
| STANDARD | Explicit key set | Metadata, environment definitions and key flows below |
| LARGE | Large key set | Metadata and reference-impact checks only |
| RULE_BASED | Conditions, matchers and exclusions | Metadata and rule-editor workflow |
size is ignored: explicitly set filters.limit: 100, advance filters.offset, and continue until a short page. Their total is page length, not inventory size. Follow pagination for the other resources; failed/skipped pages cannot establish absence or no usage.Follow standard-membership.md for parsing, production-aware approval, ≤10,000-key append/removal batches and complete membership readback. A first-page check is not verification; report partial completion and never expose raw keys by default.
Follow usage-check.md before every mutation. Scan all ACTIVE and ARCHIVED project flags and all environments, including rule matchers, treatment memberships and indirect RULE_BASED dependencies. Above 50 flags, obtain cost approval before definition reads; do not narrow a write's safety scan. Failed, skipped or unparsed coverage blocks the write. References require an explicit impact review; deletion is blocked until dependencies are separately resolved and the gate rerun.
Follow Replace all keys: fully inventory the old set, preview removals, obtain destructive-write approval, replace in one call and verify exact set equality. Stop above 10,000 keys—never chunk replacements or silently remove-then-add. Empty replacement requires an explicit clear request and confirmation.
--set arrays. STANDARD per-environment descriptions use Update definition.update-flag-targeting or the rule-editor workflow, then rerun the gate.hasDependents.hasDependents, stop and report the dependency; never bypass it.employees changes membership, not the flag's targeting rules.Summarize per operation-summary.md: operation, exact name/type, environments, approved change, usage coverage and direct/indirect references, verification evidence (metadata, STANDARD membership, saved RULE_BASED configuration or confirmed deletion), and remaining work. Label incomplete checks as blocking and distinguish user-confirmed editor evidence from direct readback. Include a returned Harness UI link when available.
| Error | Cause | Fix |
|---|---|---|
segment_type is required (400) | Segment type is required on get/update/delete of a segment | Specify segment type (STANDARD, LARGE, or RULE_BASED) |
hasDependents on delete segment | Definitions or references remain | Stop; resolve dependencies separately for the selected type, then rerun the usage gate; prefer leaving the segment intact |
hasDependents on delete definition | Keys or dependencies remain in that environment | Complete the usage gate; resolve references separately, inventory and approve any key removal, then rerun the gate before retrying deletion |
| STANDARD keys not matching flags | Traffic type mismatch, wrong segment reference, or no STANDARD definition in that env | Verify traffic types and flag rule; if needed, create the STANDARD definition through the confirmed usage-gated flow |
keys must have at least 1 on remove keys | The key list is empty | Remove operations require at least one key |
keys max 10000 | Request too large | Batch additive/removal operations only; stop oversized replacements |
| Usage coverage is incomplete or unparsed | A page, rule shape or dependency chain is unresolved | Stop the write; obtain the missing configuration/coverage and rerun the gate |
Generic errors: see tool-map.md.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub harness/harness-ai --plugin harness73 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.Other plugins' skills for the same job