Agent skill

Update Flag Targeting

by harness in harness/harness-skills

Change how a Harness FME feature flag serves traffic in environments.

Apache-2.0Auto-check passed

Install Update Flag Targeting

skills CLI
$ npx skills add harness/harness-skills --skill update-flag-targeting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install harness/harness-skills update-flag-targeting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/harness/harness-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/update-flag-targeting .claude/skills/update-flag-targeting && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
update-flag-targeting
GitHub stars
115
Token cost
~3.5k tokens
SKILL.md length
1,427 words
Files
2 (incl. references)
Skills in repo
24
Repo updated
First seen
Licence
Apache-2.0

At a glance

Change how a Harness FME feature flag serves traffic in environments.

  • Works in 7 steps: Establish scope → Gather intent → Read current state → …
  • Asked to ramp a flag
  • SKILL.md covers Tools, Instructions, Examples and Performance Notes, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Update Flag Targeting is an agent skill from harness/harness-skills. Change how a Harness FME feature flag serves traffic in environments. Covers percentage rollout, individual targets, targeting rules (attribute/segment/flag-dependency), defaultTreatment, trafficAllocation, treatments, kill/restore, and copying or initializing a definition in an environment. Use when asked to ramp a flag, add rules/users, change allocation, kill/restore, or promote config. Not for creating flags (create-feature-flag), metadata like tags/owners/archive (manage-flag-lifecycle), segment keys…

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/targeting-recipes.md`). Compatibility notes: Requires the Harness MCP server or the Harness CLI

The repository describes itself as: A collection of structured AI agent skills that enable Claude Code, Cursor, GitHub Copilot, and other AI coding assistants to create, operate, debug, and govern Harness CI/CD… The licence is Apache-2.0.

When your agent uses it

  • Asked to ramp a flag
  • Add rules/users
  • Change allocation
  • Phrases: update targeting

Example prompts

  • “/update-flag-targeting”

Requirements

  • Compatibility (from SKILL.md): Requires the Harness MCP server or the Harness CLI

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Establish scope
  2. Gather intent
  3. Read current state
  4. Safety checks (before planning)
  5. Plan the change
  6. Confirm and execute
  7. Verify and restate

What it can do on your machine

Read from SKILL.md and the folder at commit c25faee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires the Harness MCP server or the Harness CLI

    From compatibility in the SKILL.md frontmatter.

Context cost

Update Flag Targeting loads about 3.5k tokens when it runs, and up to ~6.4k if it reads all its reference files. Until then it costs about 185 tokens; SKILL.md has 1,427 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~185
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from harness/harness-skills at commit c25faee, republished under its Apache-2.0 licence (© harness). 1,427 words, ~3,450 tokens.

Download SKILL.mdSave it as .claude/skills/update-flag-targeting/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
update-flag-targeting
description
Change how a Harness FME feature flag serves traffic in environments. Covers percentage rollout, individual targets, targeting rules (attribute/segment/flag-dependency), defaultTreatment, trafficAllocation, treatments, kill/restore, and copying or initializing a definition in an environment. Use when asked to ramp a flag, add rules/users, change allocation, kill/restore, or promote config. Not for creating flags (create-feature-flag), metadata like tags/owners/archive (manage-flag-lifecycle), segment keys (manage-segments), pipeline rollouts (fme-pipeline), or flag analysis (explain-flag). Trigger phrases: update targeting, ramp flag, percentage rollout, add rule, add users, kill flag, restore, copy config.
compatibility
Requires the Harness MCP server or the Harness CLI
metadata.author
Harness
metadata.version
1.2.2
metadata.mcp-server
harness-mcp
license
Apache-2.0

Update Flag Targeting

Change how an existing Harness FME feature flag serves traffic in one or more environments. Always read the current definition first, then merge-patch only what changes. Show a diff of just what changed and use plain-language before/after to describe who gets what.

Related: Segment membership changes are /manage-segments; deep flag analysis (impact, dependencies, single-flag state) is /explain-flag. Reverse-lookup scans (dependents, segment usage) are in tool-map.md.

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 flag definitionsharness_list · fme_feature_flag_definition · params: { feature_flag_name } · filters: { offset: 0, limit: 100 } · 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
Get parent flag definitionharness_get · fme_feature_flag_definition · params: { feature_flag_name: <parent>, environment_id }harness get feature_flag:definition <parent> --env <env-id> --json
Update definitionharness_update · fme_feature_flag_definition · params: { feature_flag_name, environment_id } · body: { <fields>, comment, title? }harness update feature_flag:definition <flag> --env <env-id> -f patch.json --json (include comment/supported title in the file)
Create definitionharness_create · fme_feature_flag_definition · params: { feature_flag_name, environment_id } · body: { treatments, defaultTreatment, defaultRule, rules?, baselineTreatment?, trafficAllocation?, comment? }harness create feature_flag:definition <flag> --env <env-id> -f def.json
Kill flagharness_execute · fme_feature_flag · action="kill" · params: { feature_flag_name, environment_id } · body: { comment?, title? }?harness execute feature_flag:kill <flag> --env <env-id> --comment <text>
Restore flagharness_execute · fme_feature_flag · action="restore" · params: { feature_flag_name, environment_id } · body: { comment?, title? }?harness execute feature_flag:restore <flag> --env <env-id> --comment <text>
Get segment metadata (all types)harness_get · fme_segment · params: { segment_name, segment_type }harness get segment <segment> --segment-type <type> --json
Get STANDARD segment definitionharness_get · fme_segment_definition · params: { segment_name, environment_id }harness get segment:definition <segment> --env <env-id> --json
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 <flag> --env <env-id> --status ACTIVE --json, then again with --status PAUSED

Instructions

See concepts.md for FME evaluation order, killed state, treatments vs control, and round-tripping shapes. See write-safety.md for the confirm-before-write protocol; this skill links to it and does not duplicate it.

Phase 1: Establish scope

Follow scope-establishment.md. Ask for org_id and project_id if not already known. Restate: Working in org=..., project=...

Phase 2: Gather intent

Ask only for what's missing:

  1. Flag name (case-sensitive identifier)
  2. Target environments (names or IDs, or "all")
  3. What to change (map the user's request to one or more operations in the table below)
Phase 3: Read current state

Always fully paginate List flag definitions for the flag before planning changes in the target environments: explicitly set MCP filters.limit: 100, advance filters.offset, and stop only on a short page. size is ignored for this list. Incomplete inventory is not evidence a definition is missing; stop rather than initialize from a first-page miss. Follow pagination for environment and experiment lookups too. Never compose rules, targets, or matchers from memory — copy shapes from the live definition or another flag in the project that already uses that shape. If no example exists, warn that the shape is unverified, try it in a non-production env first, and let the API's 400 messages guide you (see schema-validation-loop.md).

Note per environment from the definition:

  • isKilled (boolean), defaultTreatment, treatments (case-sensitive; read them, don't guess)
  • defaultRule (array of {treatment, size} summing to 100)
  • rules (array, replaced whole on update)
  • trafficAllocation (0-100; keys outside it get defaultTreatment)
  • individual targets and segment references (shapes undocumented; round-trip them)
  • impressions.lastImpressionAt (usage signal; null = never received traffic; absent = unknown)

List environments to resolve names to IDs and note isProduction.

Phase 4: Safety checks (before planning)

Run these checks before composing the plan. Stop at the first failure and report it to the user.

CheckHowWhat to report
ExperimentList experiments for the flag (and environment), filtering to ACTIVE and PAUSED. Apply the experiment check protocolACTIVE: explicit acknowledgement required; PAUSED: warn + acknowledgement; COMPLETED: ignore
Segment referenceFor every new/changed rule matcher or treatment membership, resolve STANDARD/LARGE/RULE_BASED metadata and verify the target-env definition through that type's workflow. The listed definition endpoint is STANDARD-onlyDistinguish confirmed missing from unverified because the current tool lacks the operation. Stop the dependent write until verified; never use a STANDARD lookup for LARGE/RULE_BASED or silently switch to legacy scope
Flag dependency (IN_SPLIT)For each depends: {splitName, treatment} in a new or updated rule, Get parent flag definition and verify the treatment exists in treatments"Flag <parent> has no definition (or treatment <treatment> doesn't exist) in <env>."
Treatment referenceEvery treatment in rules, defaultRule, individual targets, and defaultTreatment must exist in the treatments array"Treatment <treatment> not found. Add it to treatments first."
Bucket sumThe size fields across all {treatment, size} buckets in defaultRule or a rule must sum to 100"Bucket sizes sum to <sum>, not 100. Fix the treatment allocation."
Killed flagWrite/read back approved targeting while killed, then separately confirm restore and re-run the experiment check. Inspect the entire patch first: changing defaultTreatment, removing/renaming it, or changing its configuration affects killed traffic immediatelyName the current served treatment/config and any immediate change. Only promise unchanged traffic if that pair remains unchanged; never restore stale targeting first
Show full SKILL.md (585 more words)Show less
Phase 5: Plan the change

Based on the user's intent and current state, compose the updated definition. See targeting-recipes.md for per-operation shape details.

Map user intent to operations:

User wantsRecipeFields to update
Percentage rollout / ramp(a)Change defaultRule buckets, or a specific rule's buckets
Ramp one rule(b)Copy full rules array, change that rule's buckets
Add/edit/remove/reorder targeting rules(c)Replace full rules array
Add/remove individual targets(d)Round-trip the individual-targets structure
Change defaultTreatment(e)Update defaultTreatment
Change trafficAllocation(f)Update trafficAllocation (0-100)
Add/rename treatment or edit configurations(g)Replace full treatments array; update all references
Copy one env's definition to another(h)Copy create/update body fields; check segments and IN_SPLIT parents exist
Initialize a definition where none exists(i)Create with safe default: flag's treatments (or on/off), everyone off, no rules
Kill / restore(j)Emergency path: Kill flag or Restore flag

Show a diff of just the fields that changed and state the before/after in plain language per environment. For non-production first, then production. For production environments, say: "This changes live production traffic in <env>."

Phase 6: Confirm and execute

Follow write-safety.md for the protocol (present plan → STOP → explicit confirmation → execute non-prod first → production). Comment format: "update-flag-targeting: <what> — <why>", e.g. "update-flag-targeting: ramp new-checkout to 25% in staging — FME-123".

On errors: 400 (read API error, fix field, retry once per schema-validation-loop.md); 404 (re-check identifiers, never create to fill); 409 (report as-is, stop).

Phase 7: Verify and restate

Re-read each changed environment's definition, then describe the live behavior in the same plain-language form. If it doesn't match the plan, stop.

Summarize per operation-summary.md: operation, environments changed, before/after, what was confirmed, verification, risks, UI link.

Examples

  • "Ramp new-checkout to 10% in staging" — (a) Percentage rollout.
  • "Add a targeting rule for beta users in production" — (c) Add targeting rule.
  • "Add user-key-123 to the on treatment" — (d) Add individual targets.
  • "Kill the flag in production" — (j) Kill (emergency path).
  • "Copy staging config to production" — (h) Copy env to env.
  • "Set up the flag in qa, it has no definition there" — (i) Initialize safe default.

Performance Notes

  • One fully paginated List flag definitions inventory covers the flag's environments; it can require multiple requests. Never equate a page with the complete inventory.
  • Merge-patch update: omit a field to leave it unchanged. treatments, rules, and defaultRule can't be null and are replaced whole, so always send the complete array.
  • Large multi-env changes: run non-production envs first to verify the shape works before touching production.

Troubleshooting

ProblemCauseFix
400: buckets don't sum to 100Bucket size fields across {treatment, size} in defaultRule or a rule must sum to 100Adjust the sizes to sum to 100
400: unknown treatmentA rule, defaultRule, or defaultTreatment references a treatment not in the treatments arrayAdd the treatment to treatments first, or fix the reference
Targeting changed but traffic is unchangedThe flag is killedVerify the approved targeting while it remains killed, re-check experiments, then obtain explicit approval before restoring. Never restore stale targeting first
409 governance/approvalOPA policy blocked the write or turned it into a pending approvalReport the response as-is. Never retry around it or try another route.
Concurrent edit detectedAnother user or process modified the definition between your read and writeStop and re-plan from the new state

Generic errors: see tool-map.md.

References

© harness, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/update-flag-targeting of harness/harness-skills.

  • SKILL.md
  • references/targeting-recipes.md

Open the folder on GitHubat commit c25faee

Compare with similar skills

Update Flag Targeting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Update Flag Targeting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Update Flag Targeting this skillharness/harness-skills115—~3.5kAutomated safety check: PassApache-2.0
Flagsvercel/next.js143k—~746Automated safety check: PassMIT
Flox Environmentsaffaan-m/ECC275k2 repos~3.5kAutomated safety check: NotesMIT
Remote Environmentsasgeirtj/system_prompts_leaks69k—~1.4kAutomated safety check: PassCC0-1.0
Flox Environmentsaffaan-m/ECC275k—~2.8kAutomated safety check: PassMIT
Feature Flagssickn33/agentic-awesome-skills47k1 repos~2.6kAutomated safety check: PassMIT

Similar skills

  • Flags

    vercel/next.js

    Official

    How to add or modify Next.js experimental feature flags end-to-end.

    143k GitHub stars~746 tokensUpdated today
    DevelopmentAuto-check passed
  • Flox Environments

    affaan-m/ECC

    Create reproducible, cross-platform (macOS/Linux) development environments with Flox, a declarative Nix-based environment manager.

    275k GitHub starsUsed in 2 repos~3.5k tokens
    DatabasesAuto-check: notes
  • Remote Environments

    asgeirtj/system_prompts_leaks

    Discover available task environments and create or continue tasks when the user names an environment or computer, or refers to files or apps specifically on their computer.

    69k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Flox Environments

    affaan-m/ECC

    Floxで再現可能なクロスプラットフォーム開発環境を作成します — Nixに基づく宣言的な環境マネージャー。次の場合は必ずこのスキルを使用してください: システムレベルの依存関係(コンパイラー、データベース、openssl・libvips・BLAS・LAPACKなどのネイティブライブラリー)を持つプロジェクトを設定する場合…

    275k GitHub stars~2.8k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Feature Flags

    sickn33/agentic-awesome-skills

    Implement feature flags for progressive feature rollout using LaunchDarkly, Unleash, or custom solutions.

    47k GitHub starsUsed in 1 repo~2.6k tokens
    Auto-check passed
  • Feature Flags

    getsentry/sentry

    Official

    Gate a Sentry feature behind a FlagPole feature flag. An agent skill from getsentry/sentry.

    46k GitHub stars~374 tokensUpdated today
    Frontend & DesignAuto-check passed

More from harness/harness-skills

All 24 skills in this repo
  • Audit Report

    harness/harness-skills

    Generate audit reports and compliance trails using Harness audit trail data via MCP v2 tools.

    115 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Chaos Dr Test

    harness/harness-skills

    A skill your agent uses when working with Chaos Engineering steps inside a Harness pipeline.

    115 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Chaos Experiment

    harness/harness-skills

    A skill your agent uses when the user asks to create, edit, update, design, or configure a Harness Chaos Experiment — including faults, probes, actions, experiment YAML, fault injection, pod-delete…

    115 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Cleanup Feature Flags

    harness/harness-skills

    Remove a launched Harness FME feature flag from application code, keeping the treatment FME serves today, and open a pull request.

    115 GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed
  • Configure Repo Scan

    harness/harness-skills

    Configure code scanning in Harness pipelines using STO security scanners.

    115 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed
  • Create Agent Template

    harness/harness-skills

    Generate Harness Agent Template files for AI-powered automation agents.

    115 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed

Questions about Update Flag Targeting

What does Update Flag Targeting do?

Change how a Harness FME feature flag serves traffic in environments. Update Flag Targeting is an agent skill from harness/harness-skills. Change how a Harness FME feature flag serves traffic in environments.

When should I use Update Flag Targeting?

Update Flag Targeting fits situations like: asked to ramp a flag; add rules/users; change allocation; phrases: update targeting.

How do I install Update Flag Targeting in Claude Code?

Run `npx skills add harness/harness-skills --skill update-flag-targeting -a claude-code`. Or copy the skill folder (skills/update-flag-targeting in harness/harness-skills) into .claude/skills/update-flag-targeting in your project. Claude Code loads it when a task matches its description.

How do I install Update Flag Targeting in Codex?

Run `npx skills add harness/harness-skills --skill update-flag-targeting -a codex`. Or copy the skill folder (skills/update-flag-targeting in harness/harness-skills) into .agents/skills/update-flag-targeting in your project. Codex loads it when a task matches its description.

Can I use Update Flag Targeting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add harness/harness-skills --skill update-flag-targeting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/update-flag-targeting, .gemini/skills/update-flag-targeting, .github/skills/update-flag-targeting and .opencode/skills/update-flag-targeting in your project.

What does Update Flag Targeting need to run?

SKILL.md names no scripts, command-line tools or credentials: Update Flag Targeting is instructions for the agent only. Compatibility (from SKILL.md): Requires the Harness MCP server or the Harness CLI.

Does Update Flag Targeting access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Update Flag Targeting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Update Flag Targeting use?

Update Flag Targeting is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Update Flag Targeting use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.

What are the alternatives to Update Flag Targeting?

Skills that share tags, products or a category with Update Flag Targeting: Flags (vercel/next.js, 143k stars), Flox Environments (affaan-m/ECC, 275k stars), Remote Environments (asgeirtj/system_prompts_leaks, 69k stars) and Flox Environments (affaan-m/ECC, 275k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Update Flag Targeting?

harness (a GitHub organization) maintains it in harness/harness-skills, which has 115 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 6, 2026.

Source: harness/harness-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.