Command Palette

Search for a command to run...

Назад к скиллам
скилл № 57741

migrate

Migrate an application with hardcoded LLM prompts to a full LaunchDarkly AgentControl implementation in five stages: audit the code, wrap the call, move the…

БесплатноБез исполняемых скриптов
CognitionAIот CognitionAI★ 42 звезды на GitHub

Установить migrate в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Migrate to AgentControl

You're using a skill that will guide you through migrating an application from hardcoded LLM prompts to a full LaunchDarkly AgentControl implementation. Your job is to run the migration in five stages, stopping at each stage for the user to confirm:

  1. Audit the code — read-only scan that produces a structured list of everything hardcoded (prompt, model, parameters, tools, app-scoped knobs).
  2. Wrap the call — install the SDK, create the config in LaunchDarkly with a fallback that mirrors the hardcoded values, and rewrite the call site to fetch the config fresh on every request.
  3. Move the tools — extract each tool's JSON schema, attach it to the config, and swap every call site that references the old tool list.
  4. Add tracking — wire the per-request tracker (duration, tokens, success/error) around the provider call.
  5. Attach evaluators — either offline evals via the Playground + Datasets, or online judges that score sampled traffic automatically.

⚠️ Three first-run failure modes to avoid.

  1. Tracker in the wrong scope. For an agent with a loop, mint create_tracker() once per user turn in a setup_run entry node — not inside call_model. Per-iteration factory calls produce N runIds and trip the at-most-once guards. See agent-mode-frameworks.md § Custom StateGraph.
  2. load_chat_model wrapper reuse. Templates like langchain-ai/react-agent ship a load_chat_model(f"{provider}/{name}") helper that wraps init_chat_model(...) and silently drops every variation parameter. Delete it (don't just avoid using it) and replace call sites with create_langchain_model(ai_config).
  3. Fallthrough not flipped after /configs-create. A freshly-created config's fallthrough points at an auto-generated disabled variation, so the SDK returns enabled=False until /configs-targeting runs. Flip it before Stage 2 verification.

Coverage — which shapes are well-trodden vs require extrapolation

The skill is optimized for Python and Node.js / TypeScript; other languages are install-only. Within Python and Node the coverage tiers are:

Shape Python Node.js Reference
One-shot completion (direct OpenAI / Anthropic / Bedrock / Gemini call) ✅ Worked example ✅ Worked example before-after-examples.md, per-provider docs in built-in-metrics/references/
Chat loop via managed runner (ManagedModel) ✅ Tier 1 pattern ✅ Tier 1 pattern built-in-metrics SKILL.md
LangChain single-call ✅ Worked example ✅ Worked example langchain-tracking.md
LangGraph prebuilt agent (Python langchain.agents.create_agent, Node createReactAgent) ✅ Worked example ✅ Worked example agent-mode-frameworks.md § LangGraph
LangGraph custom StateGraph with run-scoped tracker (setup_run + call_model + finalize) ✅ Deep worked example ⚠️ Mentioned — translate from Python agent-mode-frameworks.md § Custom StateGraph
CrewAI Agent ✅ Worked example — (not a Node framework) agent-mode-frameworks.md § CrewAI
Strands Agent ✅ Worked example ⚠️ BedrockModel + OpenAIModel only (no Anthropic) agent-mode-frameworks.md § Strands
Custom ReAct loop (hand-rolled, any framework or none) ✅ Worked example ⚠️ Apply framework-agnostic invariants; translate from Python agent-mode-frameworks.md § Custom ReAct loop
Vercel AI SDK (generateText / streamText) — (not a Python framework) ⚠️ Provider package exists; no worked example in skill built-in-metrics provider-package matrix
Streaming (SSE / WebSocket) ⚠️ Delegated to built-in-metrics streaming doc ⚠️ Same — use trackStreamMetricsOf + manual TTFT streaming-tracking.md
Multi-agent graph (supervisor + workers) ⚠️ Out of main scope; see reference ⚠️ Out of main scope; see reference agent-graph-reference.md
Non-LangGraph agent frameworks (Pydantic AI, DSPy, AutoGen, Haystack, LlamaIndex agents, Semantic Kernel) ⚠️ Apply the three invariants; no framework-specific example ⚠️ Same agent-mode-frameworks.md § Framework-agnostic invariants
Go, Ruby, .NET ℹ️ Install commands only ℹ️ Install commands only phase-1-analysis-checklist.md § SDK routing table

Reading the key: ✅ = follow the skill verbatim; ⚠️ = the architecture applies but you'll translate idioms or cross-reference another skill; ℹ️ = skill doesn't go past the in

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

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

FAQ

Что делает скилл migrate?

Migrate an application with hardcoded LLM prompts to a full LaunchDarkly AgentControl implementation in five stages: audit the code, wrap the call, move the tools, add tracking, 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.

Как установить скилл migrate?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл migrate запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить migrate с