Index of every page on this site: llms.txt
All skills
launchdarkly avatar

/should-flag-change

@f0ee110 official
Run it yourself

Decide whether a committed code change should ship behind a LaunchDarkly feature flag. Use when a developer asks whether a change should be behind a flag, when reviewing a diff or pull request, or when running in CI on a PR. Runs a fixed decision tree over the change and the code around it, with checked evidence, and emits a structured advisory recommendation. Run it on every change, including test-only, docs, dependency and already-flagged ones: those finish in a minute or two, and its verdict, not your own read of the diff, is the decision. Read-only: it never creates or modifies flags.

Use this Skill: https://skilld.dev/gh/launchdarkly/ai-tooling/should-flag-change

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesFEATURES.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Feature flag search

The check looked for an existing flag this change could reuse and found none that covers it. It looks only at flags evaluated close to the changed lines, so it misses the flag that releases the feature the change belongs to when that flag is checked somewhere else: the route, page, layout, navigation entry or registration the feature is reached through. Find that flag, or show there is none. Not a guess about which flag "probably" applies: a flag you can show, line by line, in the code at the change's commit.

THE CHANGE

  • Repository: {CHECKOUT}. Read files at the change's commit only: git -C {CHECKOUT} show {HEAD}:<path>; search with git -C {CHECKOUT} grep -n <pattern> {HEAD} -- <paths>. The working tree may hold other work: don't read it.
  • The change's commit: {HEAD}. The version on main it is compared with: {BASE}. See the change with git -C {CHECKOUT} diff {BASE}...{HEAD}.
  • The evidence, including the PR text and the flags already found: {RUN}/evidence.txt. Read its FLAG EVALUATION SITES and REUSE CANDIDATES sections. What the check has so far about reuse: {CANDIDATES}

WHAT TO FIND The feature the change belongs to: the screen, flow, endpoint or job whose behavior the changed code produces. Then the flag that releases THAT feature: the flag whose value decides whether customers reach the feature's own entry -- its route or page, the registration that mounts it, the handler that serves it, or the module that is the feature.

Not a flag over a whole product area. A flag that decides a top-level section of the product -- many features behind one route prefix, layout or navigation group -- releases the area, not this feature: the team doesn't reuse such a flag, so don't report it. The entry must be the feature's own route, page, registration, handler or module. Not a flag that only decides something beside the change (a different branch of the same page, a different tab), and not a flag the change itself adds: it must exist at {BASE}.

WHAT TO REPORT For the flag, two chains of real lines at {HEAD}, quoted exactly:

  • chain: from the flag to the feature's entry. The line that evaluates the flag (role "evaluates"), the line where its value decides (a condition, a ternary, a guard that returns, a filter on a route list; role "decides"), any step between them that isn't obvious (role "passes"), and LAST the feature's entry line itself (role "entry"): the route definition, the page component's mount, the registration, the handler.
  • change_link: from that entry to the changed code. Start at a line in the entry's file (the route's element, a lazy import, a registered handler; role "renders", "calls", "registers", "imports" or "passes"), follow each step that isn't obvious, and end at a line in a file this change modifies (role "changed": the changed component, function or handler, or a line inside it). When the entry is the feature's own module (entry_kind "module"), the link may be a line in a changed file in the entry's own folder -- beside the entry, or below it when the entry is the folder's index file (role "module"). Every link is checked mechanically: the key must exist at {HEAD} and at {BASE}, each quoted line must match its line at {HEAD}, the chain must evaluate, decide and end at the entry outside tests, and the link must start at the entry's file (a module: stay in its folder) and end in a changed shipping file. A link that doesn't match drops the claim. An empty list is the right answer when no flag releases the feature, or the only flag gates a whole product area: don't stretch.

Read-only: don't modify the repository, create or change flags, or use the network.

Write ONLY this JSON to {RUN}/features.json, then run python3 {SKILL_DIR}/ld-factory.pyz features {RUN}:

{"features": [{"key": "the-flag-key", "feature": "a short name for the feature, in the developer's words", "entry_kind": "route | page | registration | handler | module", "chain": [{"path": "path/at/head", "line": 12, "text": "the exact line", "role": "evaluates | decides | passes | entry"}], "change_link": [{"path": "path/at/head", "line": 34, "text": "the exact line", "role": "renders | calls | registers | imports | passes | module | changed"}], "why": "one sentence, in plain words about the developer's code: how this flag being off keeps customers from the feature the change belongs to"}], "searched": "one or two sentences: the routes, pages and registrations you followed"}

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alerttoday3 checks · Risk MEDIUM
  • Gen Agent Trust Hubtoday

    This skill utilizes a bundled executable that contains hidden Unicode characters, which could be used for malicious steganography, and it analyzes untrusted data from repositories and pull requests, making it susceptible to indirect prompt injection.

  • Sockettoday

    1 alert: gptSecurity

  • Snyktoday

    Risk: CRITICAL · 2 issues

Signed by skilld at f0ee110. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 days ago
metadata
{
  "author": "launchdarkly",
  "version": "0.5.3",
  "graph": "07355490e985"
}
Other metadata
compatibility
Advisory and read-only. Needs a git checkout with the change committed (shallow is fine; a --filter partial clone is filled in from its remote), a shell, git and Python 3.10+ (no packages). Reads LaunchDarkly flag state through your LaunchDarkly tools when available, and works without them. When it can't run (no shell, no checkout), it decides by judgment instead, from references/NO_CHECKOUT.md. Returns a structured verdict as a `recommend-flag` block.

README badge

README badge for launchdarkly/ai-tooling/should-flag-change