Flags
vercel/next.js
How to add or modify Next.js experimental feature flags end-to-end.
Change how a Harness FME feature flag serves traffic in environments.
$ npx skills add harness/harness-skills --skill update-flag-targeting -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install harness/harness-skills update-flag-targeting --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "update-flag-targeting" agent skill from https://github.com/harness/harness-skills/tree/main/skills/update-flag-targeting into .claude/skills/update-flag-targeting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "update-flag-targeting", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/harness/harness-skills/tree/main/skills/update-flag-targetingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add harness/harness-skills --skill update-flag-targeting -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install harness/harness-skills update-flag-targeting --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/harness/harness-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/update-flag-targeting .agents/skills/update-flag-targeting && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "update-flag-targeting" agent skill from https://github.com/harness/harness-skills/tree/main/skills/update-flag-targeting into .agents/skills/update-flag-targeting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "update-flag-targeting", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add harness/harness-skills --skill update-flag-targeting -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install harness/harness-skills update-flag-targeting --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/harness/harness-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/update-flag-targeting .cursor/skills/update-flag-targeting && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "update-flag-targeting" agent skill from https://github.com/harness/harness-skills/tree/main/skills/update-flag-targeting into .cursor/skills/update-flag-targeting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "update-flag-targeting", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/harness/harness-skills.git --path skills/update-flag-targeting--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add harness/harness-skills --skill update-flag-targeting -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install harness/harness-skills update-flag-targeting --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/harness/harness-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/update-flag-targeting .gemini/skills/update-flag-targeting && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "update-flag-targeting" agent skill from https://github.com/harness/harness-skills/tree/main/skills/update-flag-targeting into .gemini/skills/update-flag-targeting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "update-flag-targeting", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install harness/harness-skills update-flag-targetingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add harness/harness-skills --skill update-flag-targeting -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/harness/harness-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/update-flag-targeting .github/skills/update-flag-targeting && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "update-flag-targeting" agent skill from https://github.com/harness/harness-skills/tree/main/skills/update-flag-targeting into .github/skills/update-flag-targeting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "update-flag-targeting", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add harness/harness-skills --skill update-flag-targeting -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install harness/harness-skills update-flag-targeting --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/harness/harness-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/update-flag-targeting .opencode/skills/update-flag-targeting && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "update-flag-targeting" agent skill from https://github.com/harness/harness-skills/tree/main/skills/update-flag-targeting into .opencode/skills/update-flag-targeting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "update-flag-targeting", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
update-flag-targetingChange 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. 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.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit c25faee. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Requires the Harness MCP server or the Harness CLI
From compatibility in the SKILL.md frontmatter.
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.
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.
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.
The full file from harness/harness-skills at commit c25faee, republished under its Apache-2.0 licence (© harness). 1,427 words, ~3,450 tokens.
.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.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.
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 |
| 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 |
| Get definition | harness_get · fme_feature_flag_definition · params: { feature_flag_name, environment_id } | harness get feature_flag:definition <flag> --env <env-id> --json |
| Get parent flag definition | harness_get · fme_feature_flag_definition · params: { feature_flag_name: <parent>, environment_id } | harness get feature_flag:definition <parent> --env <env-id> --json |
| Update definition | harness_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 definition | harness_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 flag | harness_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 flag | harness_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 definition | harness_get · fme_segment_definition · params: { segment_name, environment_id } | harness get segment:definition <segment> --env <env-id> --json |
| List experiments | harness_list · fme_experiment · filters: { parent_type: "FEATURE_FLAG", parent_name, environment_id, status: ["ACTIVE", "PAUSED"], offset: 0, limit: 100 } (apply pagination completeness checks) · compact: false | harness list experiment --parent-type FEATURE_FLAG --parent-name <flag> --env <env-id> --status ACTIVE --json, then again with --status PAUSED |
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.
Follow scope-establishment.md. Ask for org_id and project_id if not already known. Restate: Working in org=..., project=...
Ask only for what's missing:
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)impressions.lastImpressionAt (usage signal; null = never received traffic; absent = unknown)List environments to resolve names to IDs and note isProduction.
Run these checks before composing the plan. Stop at the first failure and report it to the user.
| Check | How | What to report |
|---|---|---|
| Experiment | List experiments for the flag (and environment), filtering to ACTIVE and PAUSED. Apply the experiment check protocol | ACTIVE: explicit acknowledgement required; PAUSED: warn + acknowledgement; COMPLETED: ignore |
| Segment reference | For 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-only | Distinguish 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 reference | Every treatment in rules, defaultRule, individual targets, and defaultTreatment must exist in the treatments array | "Treatment <treatment> not found. Add it to treatments first." |
| Bucket sum | The 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 flag | Write/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 immediately | Name the current served treatment/config and any immediate change. Only promise unchanged traffic if that pair remains unchanged; never restore stale targeting first |
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 wants | Recipe | Fields 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>."
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).
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.
treatments, rules, and defaultRule can't be null and are replaced whole, so always send the complete array.| Problem | Cause | Fix |
|---|---|---|
| 400: buckets don't sum to 100 | Bucket size fields across {treatment, size} in defaultRule or a rule must sum to 100 | Adjust the sizes to sum to 100 |
| 400: unknown treatment | A rule, defaultRule, or defaultTreatment references a treatment not in the treatments array | Add the treatment to treatments first, or fix the reference |
| Targeting changed but traffic is unchanged | The flag is killed | Verify the approved targeting while it remains killed, re-check experiments, then obtain explicit approval before restoring. Never restore stale targeting first |
| 409 governance/approval | OPA policy blocked the write or turned it into a pending approval | Report the response as-is. Never retry around it or try another route. |
| Concurrent edit detected | Another user or process modified the definition between your read and write | Stop and re-plan from the new state |
Generic errors: see tool-map.md.
© 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
SKILL.md and 1 other file (references) in skills/update-flag-targeting of harness/harness-skills.
Open the folder on GitHubat commit c25faee
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Update Flag Targeting this skillharness/harness-skills | 115 | — | ~3.5k | Automated safety check: Pass | Apache-2.0 | |
| Flagsvercel/next.js | 143k | — | ~746 | Automated safety check: Pass | MIT | |
| Flox Environmentsaffaan-m/ECC | 275k | 2 repos | ~3.5k | Automated safety check: Notes | MIT | |
| Remote Environmentsasgeirtj/system_prompts_leaks | 69k | — | ~1.4k | Automated safety check: Pass | CC0-1.0 | |
| Flox Environmentsaffaan-m/ECC | 275k | — | ~2.8k | Automated safety check: Pass | MIT | |
| Feature Flagssickn33/agentic-awesome-skills | 47k | 1 repos | ~2.6k | Automated safety check: Pass | MIT |
vercel/next.js
How to add or modify Next.js experimental feature flags end-to-end.
affaan-m/ECC
Create reproducible, cross-platform (macOS/Linux) development environments with Flox, a declarative Nix-based environment manager.
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.
affaan-m/ECC
Floxで再現可能なクロスプラットフォーム開発環境を作成します — Nixに基づく宣言的な環境マネージャー。次の場合は必ずこのスキルを使用してください: システムレベルの依存関係(コンパイラー、データベース、openssl・libvips・BLAS・LAPACKなどのネイティブライブラリー)を持つプロジェクトを設定する場合…
sickn33/agentic-awesome-skills
Implement feature flags for progressive feature rollout using LaunchDarkly, Unleash, or custom solutions.
getsentry/sentry
Gate a Sentry feature behind a FlagPole feature flag. An agent skill from getsentry/sentry.
harness/harness-skills
Generate audit reports and compliance trails using Harness audit trail data via MCP v2 tools.
harness/harness-skills
A skill your agent uses when working with Chaos Engineering steps inside a Harness pipeline.
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…
harness/harness-skills
Remove a launched Harness FME feature flag from application code, keeping the treatment FME serves today, and open a pull request.
harness/harness-skills
Configure code scanning in Harness pipelines using STO security scanners.
harness/harness-skills
Generate Harness Agent Template files for AI-powered automation agents.
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.
Update Flag Targeting fits situations like: asked to ramp a flag; add rules/users; change allocation; phrases: update targeting.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.