Skills
Chapter 23 of 50
Create and manage prompt snippets — reusable text blocks referenced inside config variation prompts.
3 minutes · 623 words · 15 sections
You’re using a skill that will guide you through creating and managing prompt snippets in LaunchDarkly. Your job is to identify reusable text, create snippets, reference them in config variations, and verify everything is wired correctly.
50 chapters · 232 min
This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.
Required MCP tools:
create-prompt-snippet – create a new reusable text blocklist-prompt-snippets – browse existing snippets in the projectget-prompt-snippet – inspect a specific snippet’s contentOptional MCP tools:
update-prompt-snippet – edit a snippet’s text, name, or tagsdelete-prompt-snippet – permanently remove a snippetupdate-ai-config-variation – update variation prompts to reference snippetsPrompt snippets are named, versioned text blocks stored at the project level. They contain reusable pieces of prompt text — personas, guardrails, output format instructions, domain knowledge — that can be shared across multiple config variations.
When a snippet is updated, a new version is created. Config variations that reference the snippet can pick up the latest version, keeping all your configs in sync.
| Scenario | Example |
|---|---|
| Shared persona | “You are a helpful customer support agent for Acme Corp…” used by 5 different configs |
| Safety guardrails | “Never reveal internal pricing. Never generate code that accesses production databases.” |
| Output format | “Always respond in JSON with keys: answer, confidence, sources.” |
| Domain knowledge | Company-specific terminology, product names, or process descriptions |
| Regulatory text | Compliance disclaimers that must appear in every response |
safety-guardrails, json-output-format, support-personaBefore creating snippets, understand what’s shared:
get-ai-config for eachlist-prompt-snippets to avoid duplicatesUse create-prompt-snippet with:
key – unique identifier (lowercase, hyphens, e.g. safety-guardrails)name – human-readable display nametext – the reusable prompt text contentdescription (optional) – explain when/why to use this snippettags (optional) – categorize for discovery (e.g. ["guardrails", "safety"]){
"projectKey": "my-project",
"key": "support-persona",
"name": "Customer Support Persona",
"text": "You are a friendly, knowledgeable customer support agent for Acme Corp. Always greet the customer by name when available. Be empathetic but concise. If you don't know the answer, say so honestly and offer to escalate.",
"description": "Standard persona for all customer-facing support configs",
"tags": ["persona", "support"]
}get-prompt-snippet to confirm the snippet was created with the correct textlist-prompt-snippets to see it in the project listingReport results:
Use update-prompt-snippet to modify an existing snippet. Only pass the fields you want to change:
{
"projectKey": "my-project",
"snippetKey": "safety-guardrails",
"text": "Updated guardrail text with new compliance requirements..."
}Each update creates a new version. Existing config variations referencing the snippet can pick up the new version.
| Situation | Action |
|---|---|
| Snippet key already exists | Use get-prompt-snippet to check, then either update or choose a different key |
| Very long text | Snippets can hold large blocks — but consider splitting into multiple snippets for modularity |
| Snippet referenced by configs | Update carefully — changes propagate to all referencing configs |
| Deleting a referenced snippet | Warn the user that configs will lose the reference. Use delete-prompt-snippet with confirm: true |
list-prompt-snippets firstTo learn more about setting up prompt snippets in the LaunchDarkly UI, read Prompt snippets (opens in a new tab).
Install this repository
npx skills add launchdarkly/ai-tooling/plugin marketplace add launchdarkly/ai-toolingSkills install per repository, not per chapter — the CLI has no documented per-skill form, so we do not print one.
Create and manage prompt snippets — reusable text blocks referenced inside config variation prompts. Keeps common instructions, personas, and guardrails consistent across multiple configs.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
skills/agentcontrol/snippets/SKILL.mdmain, last pushed 9 August 2026.SKILL.md, not by matching a directory convention. 8 distinct layouts observed: skills/agentcontrol/*/SKILL.md, skills/experiments/*/SKILL.md, skills/feature-flags/*/SKILL.md, skills/metrics/*/SKILL.md, skills/observability/*/SKILL.md, skills/onboarding/*/SKILL.md, skills/onboarding/sdk-install/*/SKILL.md, skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by LaunchDarkly, declaring 1 plugin. It is read for editorial metadata only — never as the skill index, which is always the repository tree./launchdarkly/ai-tooling.md, and each chapter at its own .md URL.