MCPInstall

flag-and-release-change

Drive a pull request's change end to end: decide it's flag-worthy, create the guarding flag, wire the new code path behind it on the PR branch, and record an automated release so the change ships safely when the PR merges. A portable orchestrator that composes should-flag-change, launchdarkly-flag-create, and flag-release. Keywords: flag a PR, wrap change in a flag, dark launch, kill switch, auto-release, automated rollout, end-to-end flag workflow.

Installs
223
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/launchdarkly/ai-tooling --skill flag-and-release-change
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads flag-and-release-change automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Flag & Release a PR Change

You're using a skill that takes a pull request whose change should ship behind a feature flag and drives it end to end: decide it needs a flag, create the guarding flag, wire the new behavior behind it on the PR's branch, and record an automated release so the change ships safely once the PR merges.

The deploy is not the release. The merge ships the control path — the flag is created OFF, so deployment always serves the pre-change behavior. The release is the flag operation the automated rollout performs afterward, governed by the environment's policy. Creating the flag OFF and recording the release are deliberately separate things.

This skill is a portable PR orchestrator. It doesn't own the flag mechanics or the release mechanics — it composes three focused skills and adds the PR workflow (read the diff, work in a clone, push to the branch) plus the plan→implement sequencing:

StepOwned byThis skill's role
Decide whether to flagshould-flag-change (advisory, read-only)Act on a "yes"; make the call yourself if it wasn't run
Create the flag + wire the codelaunchdarkly-flag-createInvoke it against the change; don't re-teach flag creation or SDK patterns
Record the releaseflag-releaseHand off once the flag exists and the code is pushed; don't re-teach rollout mechanics

Don't duplicate any composed skill's mechanics here. This skill's only unique content is the PR wrapper (clone, three-dot diff, commit/push to the branch) and the plan→implement flow that stitches the three together.

Automation note. An orchestrating harness (e.g. a PR pipeline) can skip this skill and invoke the three composed skills directly — should-flag-change → launchdarkly-flag-create → flag-release — driving the git and sequencing itself. This skill is the portable, human-in-the-loop path for a developer working a PR by hand.

You work in two phases — plan, then implement — and you check in with the user in between. Never create or modify anything during the plan phase.

Prerequisites

  • The remotely hosted LaunchDarkly MCP server.
  • A git CLI that can read and push to the PR's repository.
  • The composed skills available: launchdarkly-flag-create (flag creation + code wiring) and flag-release (recording the rollout). should-flag-change is used if the flag decision hasn't been made.

MCP tools are used via the composed skills — create-flag/get-flag through flag-create, match-release-policies/create-automated-rollout-config through flag-release. This skill calls none directly.

Working With the Pull Request

Work from a clone so you can read the change and push the flag wiring back to its branch. Credentials are provided by the environment — never ask for, print, or store tokens.

git clone https://github.com/<owner>/<repo>.git && cd <repo>
git fetch origin pull/<pr_number>/head
git diff origin/HEAD...<head_sha>       # three-dot: change relative to the PR's base

The three-dot diff (base...head) shows exactly what the PR introduces. Read the changed files you need to understand the change and its risk. Stay in this clone through both phases — in implement you edit, commit, and push here. Full PR mechanics (clone, three-dot diff, commit/push to the branch): references/pr-wiring.md.

Plan Phase

Create nothing in this phase.

  1. Confirm it should be flagged. If should-flag-change already ran, act on its verdict. Otherwise apply the same judgment: favor a flag for user-facing or risky changes; skip config-only, dependency-bump, infra, test-only, or docs changes. If a flag clearly isn't warranted, say so and stop.
  2. Understand the change and conventions. Read the three-dot diff and changed files — what does it do, what's the blast radius? Then follow flag-create's Step 1 to learn how this codebase already uses flags (SDK, wrapper, key constants, naming). Don't reinvent that exploration here.
  3. Design the flag. Usually a single boolean kill-switch around the new path (flag-create's flag-types covers the choice). Don't propose more flags than the change needs. If Step 1 (or should-flag-change) surfaced a dependency on a parent flag/feature that isn't live yet, note it — the release step can couple them with a prerequisite.
  4. Plan the release. Follow flag-release's plan phase: pick target environments, preview each with match-release-policies, and capture the human's release intent (release on merge / hold / notBefore / segment / prerequisite). Don't re-derive the rollout model here — that's flag-release's job.
  5. Present the combined plan and stop. Summarize: the flag (key, name, boolean, tags) and why it gates this change; where in the code the guard goes; the per-environment release plan + captured intent (and anything to be held). Then wait. Revise on feedback; proceed only on clear approval. Ask a focused question if you're genuinely missing something (project key, environments, a missing policy) rather than guessing.

Implement Phase

Only after approval:

  1. Create the flag and wire the code using launchdarkly-flag-create (its Steps 3–4): flag created OFF with the agreed key/tags, guarding evaluation added with a safe default matching the codebase's pattern. Fail closed on creation errors: only an "already exists" result is success-via-reuse. Any other create-flag failure (auth, permissions, not-found, server error) is a hard stop — do not wire the code, record the release, or report success. A false "flag created" yields a green PR referencing a flag that doesn't exist, worse than an honest failure. Surface the error and stop.
  2. Add paired flag-on / flag-off tests. If the repo has a test suite, add a test for each state of the wrapped path — flag ON serves the new behavior, flag OFF preserves the old — matching the repo's framework and flag-mocking convention. Run them and continue only once green. Scope the tests to the flagged path, not general coverage. If the repo has no tests, skip and say so.
  3. Commit and push to the PR branch. Commit the wiring and push to the PR's existing branch so it lands in the same PR — don't open a new PR or touch the base branch. See references/pr-wiring.md.
  4. Record the release by handing off to flag-release's implement phase: it records the automated rollout, honoring the captured intent (holding any environment the intent doesn't clear) and returns a config_id. Don't re-teach the rollout mechanics here.
  5. Report the whole change: flag key + LaunchDarkly link (created OFF); the file(s)/code path wired; the tests added; the per-environment release plan + config_id; what was held (and why) versus what releases on merge. Report only what you verified.

Edge Cases

SituationAction
Change isn't flag-worthyExplain why (config-only, dep bump, infra, test-only, docs) and stop. Don't create a flag.
Flag already existsReuse it — "already exists" is success. Wire the existing key; don't duplicate.
Flag creation fails for any other reason (auth, permissions, 5xx)Hard stop. Don't wire code, record a release, or claim success — surface the error.
Codebase has no LaunchDarkly SDKWiring can't evaluate a flag — SDK install is separate (onboarding/sdk-install).
Guarding needs more than a booleanPrefer a boolean kill-switch. Only go multivariate if the change serves distinct variants; see flag-create's flag-types.
Release-specific cases (hold/notBefore, prerequisites, no matching policy, duplicate config, no useful metric)Handled by flag-release — see its edge cases.

What NOT to Do

  • Don't create anything in the plan phase. Plan proposes; implement creates.
  • Don't re-document flag creation, SDK guarding, or rollout mechanics here — those are launchdarkly-flag-create and flag-release. Link to them.
  • Don't turn the flag on yourself. The recorded release owns that; creating the flag OFF is the point.
  • Don't over-flag. One kill-switch beats several speculative flags.
  • Don't handle or print credentials. Git access is injected.

References

  • references/pr-wiring.md: PR mechanics — clone, three-dot diff, committing to the PR branch. (This skill's only unique reference.)
  • should-flag-change: the flag-worthiness decision.
  • launchdarkly-flag-create: flag creation + per-SDK guarding patterns.
  • flag-release: recording the automated rollout (and its auto-release.md release model).

FAQ

What does the flag-and-release-change skill do?

Drive a pull request's change end to end: decide it's flag-worthy, create the guarding flag, wire the new code path behind it on the PR branch, and record an automated release so the change ships safely when the PR merges. A portable orchestrator that composes should-flag-change, launchdarkly-flag-create, and flag-release. Keywords: flag a PR, wrap change in a flag, dark launch, kill switch, auto-release, automated rollout, end-to-end flag workflow.

How do I install flag-and-release-change?

Run npx skills add https://github.com/launchdarkly/ai-tooling --skill flag-and-release-change in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/flag-and-release-change/ (personal) or .claude/skills/flag-and-release-change/ (project).

Which AI agents can use flag-and-release-change?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is flag-and-release-change safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains flag-and-release-change?

It is published by launchdarkly in launchdarkly/ai-tooling. It has 223 recorded installs.

More from launchdarkly/ai-tooling

View all →

onboarding

launchdarkly/ai-tooling

Scripted onboarding for LaunchDarkly: quiet execution, fixed sequence, SDK install, first flag with a live reveal, MCP offered afterwards. Enforces step completion before advancing and redirects drift. Use when adding LaunchDarkly, setting up or integrating feature flags in a project, SDK integration, or 'onboard me'.

OfficialAI & Agents4.8K installs

launchdarkly-flag-discovery

launchdarkly/ai-tooling

Audit your LaunchDarkly feature flags to understand the landscape, find stale or launched flags, and assess removal readiness. Use when the user asks about flag debt, stale flags, cleanup candidates, flag health, or wants to understand their flag inventory.

OfficialSecurity4.2K installs

launchdarkly-flag-create

launchdarkly/ai-tooling

Create and configure LaunchDarkly feature flags in a way that fits the existing codebase. Use when the user wants to create a new flag, wrap code in a flag, add a feature toggle, or set up an experiment. Guides exploration of existing patterns before creating.

OfficialCode Quality & Workflow4.1K installs

launchdarkly-flag-targeting

launchdarkly/ai-tooling

Control LaunchDarkly feature flag targeting including toggling flags on/off, percentage rollouts, targeting rules, individual targets, and copying flag configurations between environments. Use when the user wants to change who sees a flag, roll out to a percentage, add targeting rules, or promote config between environments.

Official4.1K installs

launchdarkly-flag-cleanup

launchdarkly/ai-tooling

Safely remove a feature flag from code while preserving production behavior. Use when the user wants to remove a flag from code, delete flag references, or create a PR that hardcodes the winning variation after a rollout is complete.

OfficialCode Quality & Workflow4.1K installs

launchdarkly-metric-choose

launchdarkly/ai-tooling

Choose the right metrics for a LaunchDarkly experiment, guarded rollout, or release policy. Use when the user wants to know which metrics to use, which is the primary metric for an experiment, what guardrails to add, or which events to monitor in a rollout. Surfaces what will auto-attach from existing release policies before making additional recommendations.

Official3.3K installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.