From 47dc349c44684e9e4a4114b13b73f272ed3058e4 Mon Sep 17 00:00:00 2001 From: Aaron Hogue Date: Thu, 26 Mar 2026 13:01:27 -0400 Subject: [PATCH 1/2] Add launchdarkly-flag-command skill --- README.md | 1 + skills.json | 18 ++++ .../launchdarkly-flag-command/README.md | 63 +++++++++++++ .../launchdarkly-flag-command/SKILL.md | 91 +++++++++++++++++++ .../marketplace.json | 21 +++++ 5 files changed, 194 insertions(+) create mode 100644 skills/feature-flags/launchdarkly-flag-command/README.md create mode 100644 skills/feature-flags/launchdarkly-flag-command/SKILL.md create mode 100644 skills/feature-flags/launchdarkly-flag-command/marketplace.json diff --git a/README.md b/README.md index 660e91b..386962a 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Agent Skills are modular, text-based playbooks that teach an agent how to perfor | Skill | Description | |-------|-------------| +| `feature-flags/launchdarkly-flag-command` | Resolve `/flag` style requests into fast flag lookup, detail, and disambiguation | | `feature-flags/launchdarkly-flag-discovery` | Audit flags, find stale/launched flags, and assess removal readiness | | `feature-flags/launchdarkly-flag-create` | Create new feature flags in a way that fits existing codebase patterns | | `feature-flags/launchdarkly-flag-targeting` | Control targeting, rollouts, rules, and cross-environment config | diff --git a/skills.json b/skills.json index f3837f2..47221be 100644 --- a/skills.json +++ b/skills.json @@ -54,6 +54,24 @@ "mcp" ] }, + { + "name": "launchdarkly-flag-command", + "description": "Resolve `/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.", + "path": "skills/feature-flags/launchdarkly-flag-command", + "version": "1.0.0-experimental", + "license": "Apache-2.0", + "compatibility": "Requires the remotely hosted LaunchDarkly MCP server", + "tags": [ + "launchdarkly", + "feature-flags", + "feature-management", + "discovery", + "command", + "slash-command", + "inventory", + "mcp" + ] + }, { "name": "launchdarkly-flag-create", "description": "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.", diff --git a/skills/feature-flags/launchdarkly-flag-command/README.md b/skills/feature-flags/launchdarkly-flag-command/README.md new file mode 100644 index 0000000..8e3db93 --- /dev/null +++ b/skills/feature-flags/launchdarkly-flag-command/README.md @@ -0,0 +1,63 @@ +# LaunchDarkly Flag Command Skill + +An Agent Skill for handling quick `/flag` lookups with fast resolution, disambiguation, and actionable summaries. + +## Overview + +This skill teaches agents how to: +- Parse `/flag` style user requests +- Resolve flag keys from fuzzy queries +- Disambiguate between similar flags safely +- Return concise flag detail summaries +- Route users into deeper create/targeting/cleanup workflows when needed + +## Installation (Local) + +For now, install by placing this skill directory where your agent client loads skills. + +Examples: + +- **Generic**: copy `skills/feature-flags/launchdarkly-flag-command/` into your client's skills path + +## Prerequisites + +This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment. The remote server provides higher-level, agent-optimized tools that orchestrate multiple API calls and return pruned, actionable responses. + +Refer to your LaunchDarkly account settings for instructions on connecting to the remotely hosted MCP server. + +## Usage + +Once installed, the skill activates automatically when you ask for quick flag lookups: + +``` +/flag dark mode +``` + +``` +find flag checkout +``` + +``` +show me the new-checkout flag in staging +``` + +## Structure + +``` +launchdarkly-flag-command/ +├── SKILL.md +├── marketplace.json +└── README.md +``` + +## Related + +- [LaunchDarkly Flag Discovery](../launchdarkly-flag-discovery/) — Audit and assess flag health +- [LaunchDarkly Flag Targeting](../launchdarkly-flag-targeting/) — Change rollouts and targeting +- [LaunchDarkly Flag Cleanup](../launchdarkly-flag-cleanup/) — Remove stale flags safely +- [LaunchDarkly MCP Server](https://github.com/launchdarkly/mcp-server) +- [LaunchDarkly Docs](https://docs.launchdarkly.com) + +## License + +Apache-2.0 diff --git a/skills/feature-flags/launchdarkly-flag-command/SKILL.md b/skills/feature-flags/launchdarkly-flag-command/SKILL.md new file mode 100644 index 0000000..092c7e9 --- /dev/null +++ b/skills/feature-flags/launchdarkly-flag-command/SKILL.md @@ -0,0 +1,91 @@ +--- +name: launchdarkly-flag-command +description: "Resolve `/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." +license: Apache-2.0 +compatibility: Requires the remotely hosted LaunchDarkly MCP server +metadata: + author: launchdarkly + version: "1.0.0-experimental" +--- + +# LaunchDarkly Flag Command Router + +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. + +## Prerequisites + +This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment. + +**Required MCP tools:** +- `list-flags` — search and disambiguate flag candidates +- `get-flag` — fetch detailed configuration for a resolved flag + +**Optional MCP tools:** +- `get-flag-status-across-envs` — compare lifecycle status across environments +- `get-flag-health` — quick health snapshot for a single flag + +## Command Contract + +Treat these forms as equivalent intents: + +- `/flag ` +- `flag ` +- "find flag " +- "show me flag" + +Use `production` as the default environment unless the user specifies another environment. + +## Workflow + +### Step 1: Parse and Normalize Input + +1. Extract the query text after `/flag`. +2. If no query is provided, ask for one concise identifier (flag key, name fragment, or tag). +3. Capture optional hints from the request: + - Environment (`staging`, `production`, etc.) + - Project key + - Preference for exact key vs fuzzy search + +### Step 2: Resolve the Flag + +Use `list-flags` first unless the user clearly provided an exact key and project. + +1. Search with `list-flags` using the query. +2. If one clear exact match exists, resolve to that flag. +3. If multiple plausible matches exist, return a short disambiguation list (key + name + state) and ask the user to pick. +4. If no matches exist, tell the user and suggest one broader query. + +### Step 3: Return a Useful Summary + +For a resolved flag, call `get-flag` and return: + +1. Flag key and name +2. Environment state (`on`/`off`) +3. Off variation and fallthrough behavior +4. Rule/target complexity (simple vs complex) +5. Direct LaunchDarkly URL for the flag (when project + key are known) + +If the user asks "is this safe to remove?" or similar, transition to the flag discovery or cleanup workflow instead of improvising a partial readiness check. + +### Step 4: Route to the Right Follow-up Workflow + +After returning details, route explicitly when asked: + +- Creation/change request -> [flag create skill](../launchdarkly-flag-create/SKILL.md) +- Targeting/rollout change -> [flag targeting skill](../launchdarkly-flag-targeting/SKILL.md) +- Staleness/removal/readiness -> [flag discovery skill](../launchdarkly-flag-discovery/SKILL.md) and [flag cleanup skill](../launchdarkly-flag-cleanup/SKILL.md) + +## Output Style + +Keep `/flag` responses brief and operational: + +- Start with the resolved flag (or disambiguation list) +- Include only the minimum config details needed for the next action +- End with one clear next step question when user intent is ambiguous + +## Important Context + +- `/flag` is a fast entrypoint, not a full lifecycle workflow. +- Prefer disambiguation over guessing when multiple flags match. +- Treat project + environment as first-class context; avoid hidden assumptions. +- When sharing rollout percentages, always use human-readable percentages. diff --git a/skills/feature-flags/launchdarkly-flag-command/marketplace.json b/skills/feature-flags/launchdarkly-flag-command/marketplace.json new file mode 100644 index 0000000..e41b926 --- /dev/null +++ b/skills/feature-flags/launchdarkly-flag-command/marketplace.json @@ -0,0 +1,21 @@ +{ + "name": "launchdarkly-flag-command", + "description": "Resolve /flag style requests into quick LaunchDarkly flag lookup and disambiguation", + "version": "1.0.0-experimental", + "author": "LaunchDarkly", + "repository": "https://github.com/launchdarkly/agent-skills", + "skills": ["./"], + "tags": [ + "launchdarkly", + "feature-flags", + "feature-management", + "discovery", + "command", + "slash-command", + "inventory", + "mcp" + ], + "requirements": { + "mcp-servers": ["@launchdarkly/mcp-server"] + } +} From d72ace3e1628dfdb39f519fa586e10a7681416d9 Mon Sep 17 00:00:00 2001 From: Aaron Hogue Date: Thu, 26 Mar 2026 13:02:29 -0400 Subject: [PATCH 2/2] Add catalog test for flag command skill --- tests/test_skills_catalog.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/test_skills_catalog.py diff --git a/tests/test_skills_catalog.py b/tests/test_skills_catalog.py new file mode 100644 index 0000000..b55321f --- /dev/null +++ b/tests/test_skills_catalog.py @@ -0,0 +1,33 @@ +import json +import unittest +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +SKILLS_JSON = ROOT / "skills.json" + + +class SkillsCatalogTests(unittest.TestCase): + def test_launchdarkly_flag_command_skill_is_listed(self): + data = json.loads(SKILLS_JSON.read_text(encoding="utf-8")) + skills = data.get("skills", []) + + entry = next((s for s in skills if s.get("name") == "launchdarkly-flag-command"), None) + self.assertIsNotNone(entry, "launchdarkly-flag-command must be present in skills.json") + + self.assertEqual( + entry.get("path"), + "skills/feature-flags/launchdarkly-flag-command", + "catalog path for launchdarkly-flag-command is incorrect", + ) + + skill_dir = ROOT / entry["path"] + self.assertTrue((skill_dir / "SKILL.md").is_file(), "SKILL.md is missing for launchdarkly-flag-command") + self.assertTrue( + (skill_dir / "marketplace.json").is_file(), + "marketplace.json is missing for launchdarkly-flag-command", + ) + + +if __name__ == "__main__": + unittest.main()