Index of every page on this site: llms.txt
All skills
launchdarkly avatar

/migrate

@f0ee110 official
Run it yourself

Migrate an application with hardcoded LLM prompts to a full LaunchDarkly AgentControl implementation on the current AI SDKs in five stages: audit the code, wrap the call, move the tools, verify metrics, attach evaluators. Use when the user wants to externalize model/prompt configuration, move from direct provider calls (OpenAI, Anthropic, Bedrock, Gemini, Strands) to a managed config, or stage a full hardcoded-to-LaunchDarkly migration. If the app already uses a legacy LaunchDarkly AI SDK (`launchdarkly-server-sdk-ai` / `ldai`, `@launchdarkly/server-sdk-ai`), use `legacy-sdk-migrate` instead.

Use this Skill: https://skilld.dev/gh/launchdarkly/ai-tooling/migrate

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

README.md

≈788 tokens on demand. Your agent reads this file only when SKILL.md points to it.

LaunchDarkly Config Migrate Skill

An Agent Skill for migrating an application with hardcoded LLM prompts to a full LaunchDarkly AgentControl implementation in five stages: audit, wrap, tools, metrics, evals.

Overview

This skill orchestrates the full migration journey from hardcoded openai.chat.completions.create(model="gpt-4o", ...) (or equivalent in any provider SDK) to a managed config with tools, metrics, and judges. It uses the current AI SDKs (launchdarkly-ai-server for Python, @launchdarkly/ai-node for Node.js), where config().invoke() runs the provider call through a handler and records metrics automatically. For apps already on the legacy LaunchDarkly AI SDK (launchdarkly-server-sdk-ai / @launchdarkly/server-sdk-ai), use legacy-sdk-migrate instead.

The five stages:

  1. Audit hardcoded model names, prompts, parameters, and template placeholders (read-only)
  2. Wrap the call in config().invoke() with a handler package or custom handler, keeping the original call as the fallback. Delegates config creation to configs-create and serving to configs-targeting
  3. Tools — move function-calling schemas into LaunchDarkly and pass implementations as tool_handlers. Delegates to tools
  4. Metrics — confirm the automatic duration, token, success/error, and tool-call metrics, and add user feedback events
  5. Evals — attach judges for LLM-as-a-judge scoring. Delegates to online-evals

Installation (Local)

Copy skills/agentcontrol/migrate/ into your agent client's skills path.

Prerequisites

  • Remotely hosted LaunchDarkly MCP server
  • LD_SDK_KEY environment variable (server-side SDK key, starts with sdk-)
  • A Python or Node.js application with hardcoded LLM calls (OpenAI, Anthropic, Bedrock, Gemini, LangChain, LangGraph, CrewAI, or Strands)

Usage

Migrate our chat service from hardcoded OpenAI prompts to LaunchDarkly AgentControl
Our LangGraph agent has its model and instructions baked in — walk me through wrapping it in a config

Structure

migrate/
├── SKILL.md
├── README.md
└── references/
    ├── phase-1-analysis-checklist.md
    ├── before-after-examples.md
    ├── sdk-ai-tracker-patterns.md
    ├── agent-mode-frameworks.md
    ├── fallback-defaults-pattern.md
    └── agent-graph-reference.md

Related

License

Apache-2.0

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warningtoday3 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    This skill is a migration guide for LaunchDarkly's AgentControl implementation. It provides instructions and code examples for refactoring hardcoded AI prompts to a managed configuration using official vendor SDKs. It follows security best practices for credential management and identifies common pitfalls during migration.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: MEDIUM · 1 issue

Signed by skilld at f0ee110. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 days ago
metadata
{
  "author": "launchdarkly",
  "version": "0.2.0"
}
Other metadata
compatibility
Requires the remotely hosted LaunchDarkly MCP server. Code examples use `launchdarkly-ai-server` 1.0.0+ with `launchdarkly-server-sdk` (Python, `pip install "launchdarkly-ai-server[ld]"`) or `@launchdarkly/ai-node` 1.0.0+ (Node.js).
  • Python
  • TypeScript
  • launchdarkly
  • migration
  • llm
  • prompt-management
  • agent
  • openai
  • anthropic
  • bedrock

README badge

README badge for launchdarkly/ai-tooling/migrate

Guides you through migrating a hardcoded LLM application to LaunchDarkly AgentControl in five stages: audit the code, wrap the call, move the tools, add tracking, attach evaluators. Targets Python and Node.js applications calling OpenAI, Anthropic, Bedrock, Gemini, or agent frameworks like LangGraph and CrewAI.

Generated from the current SKILL.md.

Does this skill work with my LLM provider?
The skill has worked examples for OpenAI, Anthropic, Bedrock, Gemini, and Strands. For LangChain, LangGraph, CrewAI, and custom ReAct loops, coverage varies by language — Python has deep examples; Node.js has partial coverage with ⚠️ annotations. See the coverage table in the SKILL.md for your framework.
What if my app uses a framework not listed in the coverage table?
Apply the three framework-agnostic invariants: one `agent_config` per turn, one tracker per turn, and fire at-most-once methods once at turn end. These rules apply regardless of framework; see agent-mode-frameworks.md § Framework-agnostic invariants.
Can I skip stages or do them out of order?
Stages must be ordered — audit, wrap, tools, tracking, then evaluators. You can ship after Stage 4 (tracking) is complete; Stage 5 (evaluators) is optional. Skipping ahead produces configs without traffic or metrics without context.
Does this skill handle streaming responses?
Streaming support is delegated to the built-in-metrics skill's streaming-tracking.md reference. Use `trackStreamMetricsOf` plus manual TTFT tracking.
What environment setup is required?
You need `LD_SDK_KEY` (server-side SDK key) set, the LaunchDarkly MCP server configured, and the target application already calling an LLM provider with hardcoded prompts and model values. Check the SDK CHANGELOG before starting to ensure no breaking changes post-date this skill.

Generated from the current SKILL.md. These answers refresh after source changes.