snippets

작성자: launchdarkly

프롬프트 스니펫을 생성하고 관리합니다 — 구성 변형 프롬프트 내에서 참조되는 재사용 가능한 텍스트 블록입니다. 일반적인 지침, 페르소나, 가드레일을 유지합니다…

npx skills add https://github.com/launchdarkly/ai-tooling --skill snippets

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 block
  • list-prompt-snippets -- browse existing snippets in the project
  • get-prompt-snippet -- inspect a specific snippet's content

Optional MCP tools:

  • update-prompt-snippet -- edit a snippet's text, name, or tags
  • delete-prompt-snippet -- permanently remove a snippet
  • update-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

ScenarioExample
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 knowledgeCompany-specific terminology, product names, or process descriptions
Regulatory textCompliance 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

  1. Reusability First: Only create a snippet if the text will be used in 2+ places
  2. Single Responsibility: Each snippet should cover one concern (persona OR guardrails, not both)
  3. Descriptive Keys: Use keys like safety-guardrails, json-output-format, support-persona
  4. Tag for Discovery: Add tags so teammates can find snippets by category
  5. 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:

  1. List existing configs in the project using get-ai-config for each
  2. Look for repeated text across variation prompts
  3. Identify text that should stay consistent (guardrails, personas, formats)
  4. Check existing snippets with list-prompt-snippets to avoid duplicates

Step 2: Create Snippets

Use create-prompt-snippet with:

  • key -- unique identifier (lowercase, hyphens, e.g. safety-guardrails)
  • name -- human-readable display name
  • text -- the reusable prompt text content
  • description (optional) -- explain when/why to use this snippet
  • tags (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

  1. Use get-prompt-snippet to confirm the snippet was created with the correct text
  2. Use list-prompt-snippets to see it in the project listing
  3. 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

SituationAction
Snippet key already existsUse get-prompt-snippet to check, then either update or choose a different key
Very long textSnippets can hold large blocks — but consider splitting into multiple snippets for modularity
Snippet referenced by configsUpdate carefully — changes propagate to all referencing configs
Deleting a referenced snippetWarn 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-snippets first

More resources

To learn more about setting up prompt snippets in the LaunchDarkly UI, read Prompt snippets.

launchdarkly의 다른 스킬

aiconfig-online-evals
launchdarkly
더 이상 사용되지 않는 리디렉션 — 이 스킬은 online-evals로 이름이 변경되었습니다. 이 스킬을 사용하지 말고 online-evals를 호출하세요. 이전 참조를 위해 유지됩니다…
aiconfig-tools
launchdarkly
더 이상 사용되지 않는 리디렉션 — 이 스킬은 tools로 이름이 변경되었습니다. 이 스킬을 사용하지 말고 tools를 호출하세요. 이전에 aiconfig-tools를 참조하던 항목들이 계속 연결되도록 유지됩니다.
launchdarkly-flag-targeting
launchdarkly
LaunchDarkly 기능 플래그 타겟팅을 제어하며, 플래그 켜기/끄기 전환, 비율 롤아웃, 타겟팅 규칙, 개별 타겟, 플래그 복사 등을 포함합니다.
launchdarkly-flag-drift
launchdarkly
코드 내 SDK 폴백 기본값과 LaunchDarkly 기본 규칙(폴스루) 간의 기능 플래그 불일치를 감지하고 조정합니다. 플래그의 기본값이…
create-skill
launchdarkly
LaunchDarkly agent-skills 저장소에 새로운 스킬을 추가합니다. 새로운 SKILL.md를 생성하거나, 카탈로그에 스킬을 추가하거나, 저장소 규칙에 맞게 조정할 때 사용합니다.…
skill-name
launchdarkly
이 스킬이 수행하는 작업과 에이전트가 이를 사용해야 하는 시점에 대한 명확한 설명입니다. 에이전트가 관련 작업을 식별하는 데 도움이 되는 키워드를 포함하세요.
agent-graphs
launchdarkly
에이전트 그래프를 생성하고 관리합니다 — 핸드오프 로직이 있는 엣지로 연결된 구성(config)들의 방향성 그래프입니다. 구성이 라우팅되는 다중 에이전트 워크플로우를 구축할 때 사용하세요…
aiconfig-agent-graphs
launchdarkly
더 이상 사용되지 않는 리디렉션 — 이 스킬은 agent-graphs로 이름이 변경되었습니다. 이 스킬을 사용하지 말고 agent-graphs를 호출하세요. 이전 참조를 위해 유지됩니다…