snippets
launchdarkly/ai-tooling
Create and manage reusable prompt snippets to keep instructions, personas, and guardrails consistent across multiple AI configs.
What is snippets?
This skill helps you identify, create, and manage prompt snippets — named text blocks stored at the project level that can be referenced across multiple config variations. Use it when you have repeated text (personas, guardrails, output formats) that should stay synchronized across different AI configurations.
- Create named, versioned text blocks (snippets) for reusable prompt content
- List and inspect existing snippets in your project to avoid duplication
- Update snippets to propagate changes across all referencing config variations
- Tag snippets for discovery and organization by category
- Delete snippets with confirmation to prevent breaking config references
How to install snippets
npx skills add https://github.com/launchdarkly/ai-tooling --skill snippets- LaunchDarkly MCP server must be configured in your environment
How to use snippets
- 1.List existing configs and snippets to identify repeated text across variations
- 2.Create a snippet using create-prompt-snippet with a descriptive key, name, and text content
- 3.Verify the snippet was created by inspecting it with get-prompt-snippet
- 4.Add tags to the snippet for team discovery and categorization
- 5.Update config variations to reference the snippet using update-ai-config-variation
- 6.When snippet text needs to change, use update-prompt-snippet to create a new version that propagates to all referencing configs
Use cases
- Share a consistent customer support persona across 5 different support configs
- Maintain identical safety guardrails (e.g., 'Never reveal internal pricing') in all production variations
- Standardize JSON output format instructions across multiple configs
- Store company-specific terminology and product knowledge for reuse
- Include regulatory compliance disclaimers that must appear in every response
- AI product managers managing multiple prompt variations
- Engineering teams maintaining consistent guardrails across configs
- Teams needing to synchronize persona and tone across different AI agents
- Organizations with compliance or safety requirements across multiple configs
snippets FAQ
Create a snippet only if the text will be used in 2 or more places. If it's unique to a single variation, keep it in the prompt directly.
Each update creates a new version. Config variations that reference the snippet can pick up the latest version, keeping all configs in sync.
Yes, but you must confirm the deletion. Warn users that any configs referencing the snippet will lose that reference.
No. Snippets are building blocks for reusable pieces (personas, guardrails, formats). Break large prompts into focused, single-responsibility snippets.
Use list-prompt-snippets to check existing snippets before creating new ones. Use descriptive keys like 'safety-guardrails' or 'json-output-format' for clarity.
Full instructions (SKILL.md)
Source of truth, from launchdarkly/ai-tooling.
name: snippets description: "Create and manage prompt snippets — reusable text blocks referenced inside config variation prompts. Keeps common instructions, personas, and guardrails consistent across multiple configs." license: Apache-2.0 compatibility: Requires the remotely hosted LaunchDarkly MCP server metadata: author: launchdarkly version: "0.1.0"
Config Prompt Snippets
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.
Prerequisites
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 content
Optional 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 snippets
Core Concepts
What Are Prompt Snippets?
Prompt 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.
When to Use Snippets
| 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 |
When NOT to Use Snippets
- Text that is unique to a single variation — just put it in the prompt directly
- Dynamic content that changes per-request — use template variables instead
- Entire prompts — snippets are building blocks, not complete prompts
Core Principles
- Reusability First: Only create a snippet if the text will be used in 2+ places
- Single Responsibility: Each snippet should cover one concern (persona OR guardrails, not both)
- Descriptive Keys: Use keys like
safety-guardrails,json-output-format,support-persona - Tag for Discovery: Add tags so teammates can find snippets by category
- Verify References: After creating a snippet, confirm it appears in the project
Workflow
Step 1: Identify Reusable Text
Before creating snippets, understand what's shared:
- List existing configs in the project using
get-ai-configfor each - Look for repeated text across variation prompts
- Identify text that should stay consistent (guardrails, personas, formats)
- Check existing snippets with
list-prompt-snippetsto avoid duplicates
Step 2: Create Snippets
Use 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"]
}
Step 3: Verify
- Use
get-prompt-snippetto confirm the snippet was created with the correct text - Use
list-prompt-snippetsto see it in the project listing - Check that version is 1 for newly created snippets
Report results:
- Snippet created with key, name, and text
- Version number confirmed
- Tags applied correctly
Step 4: Update Snippets (When Needed)
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.
Edge Cases
| 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 |
What NOT to Do
- Don't create snippets for text used in only one place
- Don't put an entire prompt in a single snippet — break it into focused pieces
- Don't delete snippets without checking which configs reference them
- Don't duplicate existing snippets — check
list-prompt-snippetsfirst
More resources
To learn more about setting up prompt snippets in the LaunchDarkly UI, read Prompt snippets.
Related skills
More from launchdarkly/ai-tooling and the wider catalog.

tools
Define and attach function-calling tools to your AI agents through LaunchDarkly config variations.

agent-graphs
Create and manage directed graphs of agent configs with handoff logic for multi-agent workflows.

aiconfig-agent-graphs
Deprecated redirect to agent-graphs skill — use agent-graphs instead.

aiconfig-ai-metrics
Deprecated skill — use built-in-metrics instead.

python-code-quality
Python code quality with ruff and ty. Use when the user mentions ruff, ty, linting, formatting, type checking, or Python code style.

wps-excel
Natural language Excel assistant for formula writing, data cleaning, and chart creation.