Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
18 changes: 18 additions & 0 deletions skills.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
63 changes: 63 additions & 0 deletions skills/feature-flags/launchdarkly-flag-command/README.md
Original file line number Diff line number Diff line change
@@ -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
91 changes: 91 additions & 0 deletions skills/feature-flags/launchdarkly-flag-command/SKILL.md
Original file line number Diff line number Diff line change
@@ -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 <query>`
- `flag <query>`
- "find flag <query>"
- "show me <query> 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.
21 changes: 21 additions & 0 deletions skills/feature-flags/launchdarkly-flag-command/marketplace.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
33 changes: 33 additions & 0 deletions tests/test_skills_catalog.py
Original file line number Diff line number Diff line change
@@ -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()
Loading