$npx -y skills add launchdarkly/ai-tooling --skill launchdarkly-flag-commandResolve /flag style requests into the right LaunchDarkly flag lookup flow. Use when the user types /flag, asks to quickly find a flag by name/key, wants a direct flag detail summary, or needs fast disambiguation between similar flags.
| 1 | # LaunchDarkly Flag Command Router |
| 2 | |
| 3 | You're using a skill that standardizes quick `/flag` requests. Your job is to parse the user intent, resolve the requested flag with minimal friction, return an actionable summary, and route to deeper workflows when needed. |
| 4 | |
| 5 | ## Scope Boundary |
| 6 | |
| 7 | This skill is a **read-only lookup entrypoint**. It returns flag details and routes forward. |
| 8 | |
| 9 | **Hard constraints — you MUST NOT:** |
| 10 | |
| 11 | - Create, toggle, update, or delete flags |
| 12 | - Assess whether a flag is safe to remove, stale, or ready for cleanup |
| 13 | - Provide a "verdict", "safe to remove" conclusion, removal steps, or "before removing" advice |
| 14 | - Offer to archive or delete the flag |
| 15 | |
| 16 | **When the user asks about removal or staleness**, your entire response for that part must be the flag summary table followed by this exact routing message (you may rephrase slightly but must keep the substance): |
| 17 | |
| 18 | > This quick lookup can only show you the flag's current config. To assess whether it's safe to remove, you need the **flag discovery** or **flag cleanup** skill — they scan code references, check status across all environments, and analyze downstream dependencies. |
| 19 | |
| 20 | That's it. No analysis. No bullet points. No verdict. The removal question is answered by the routing message, not by you. |
| 21 | |
| 22 | ## Prerequisites |
| 23 | |
| 24 | This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment. |
| 25 | |
| 26 | **Required MCP tools:** |
| 27 | - `list-flags` — search and disambiguate flag candidates |
| 28 | - `get-flag` — fetch detailed configuration for a resolved flag |
| 29 | |
| 30 | **Optional MCP tools:** |
| 31 | - `get-flag-status-across-envs` — compare lifecycle status across environments |
| 32 | - `get-flag-health` — quick health snapshot for a single flag |
| 33 | |
| 34 | ## Command Contract |
| 35 | |
| 36 | Treat these forms as equivalent intents: |
| 37 | |
| 38 | - `/flag <query>` |
| 39 | - `flag <query>` |
| 40 | - "find flag <query>" |
| 41 | - "show me <query> flag" |
| 42 | |
| 43 | Use `production` as the default environment unless the user specifies another environment. |
| 44 | |
| 45 | ## Workflow |
| 46 | |
| 47 | ### Step 1: Parse and Normalize Input |
| 48 | |
| 49 | 1. Extract the query text after `/flag`. |
| 50 | 2. If no query is provided, ask for one concise identifier (flag key, name fragment, or tag). |
| 51 | 3. Capture optional hints from the request: |
| 52 | - Environment (`staging`, `production`, etc.) |
| 53 | - Project key |
| 54 | - Preference for exact key vs fuzzy search |
| 55 | |
| 56 | ### Step 2: Resolve the Flag |
| 57 | |
| 58 | Use `list-flags` first unless the user clearly provided an exact key and project. |
| 59 | |
| 60 | 1. Search with `list-flags` using the query. |
| 61 | 2. If one clear exact match exists, resolve to that flag. |
| 62 | 3. If multiple plausible matches exist, return a short disambiguation list (key + name + state) and ask the user to pick. |
| 63 | 4. If no matches exist, tell the user and suggest one broader query. |
| 64 | |
| 65 | ### Step 3: Return a Useful Summary |
| 66 | |
| 67 | For a resolved flag, call `get-flag` and return: |
| 68 | |
| 69 | 1. Flag key and name |
| 70 | 2. Environment state (`on`/`off`) |
| 71 | 3. Off variation and fallthrough behavior |
| 72 | 4. Rule/target complexity (simple vs complex) |
| 73 | 5. Direct LaunchDarkly URL for the flag (when project + key are known) |
| 74 | |
| 75 | **If the user asked about removal, staleness, or cleanup** (e.g., "is this safe to remove?", "can I clean this up?", "is this stale?"): |
| 76 | |
| 77 | Show ONLY the summary table above, then write: |
| 78 | |
| 79 | > This quick lookup can only show you the flag's current config. To assess whether it's safe to remove, you need the **flag discovery** or **flag cleanup** skill — they scan code references, check status across all environments, and analyze downstream dependencies. |
| 80 | |
| 81 | Do not add a verdict, bullet-point analysis, removal steps, "before removing" checklist, or an offer to archive/delete. The removal question is **fully answered by the routing message above**. Proceed to Step 4. |
| 82 | |
| 83 | ### Step 4: Route to the Right Follow-up Workflow |
| 84 | |
| 85 | After returning the summary, check whether the user's request implies a deeper workflow. If it does, **name the skill and stop** — do not attempt the workflow yourself. |
| 86 | |
| 87 | | User intent | Route to | |
| 88 | |---|---| |
| 89 | | Create or modify a flag | [flag create skill](../launchdarkly-flag-create/SKILL.md) | |
| 90 | | Change targeting or rollout | [flag targeting skill](../launchdarkly-flag-targeting/SKILL.md) | |
| 91 | | "Is this safe to remove?", "Is this stale?", cleanup | [flag discovery](../launchdarkly-flag-discovery/SKILL.md) / [flag cleanup](../launchdarkly-flag-cleanup/SKILL.md) | |
| 92 | |
| 93 | For removal/staleness questions specifically: follow the Scope Boundary instructions above — summary table only, then route. No verdict. |
| 94 | |
| 95 | ## Output Style |
| 96 | |
| 97 | Keep `/flag` responses brief and operational: |
| 98 | |
| 99 | - Start with the resolved flag (or disambiguation list) |
| 100 | - Include only the min |