launchdarkly
하는 일
이 스킬은 Agent-Native 앱의 서버 및 브라우저 코드가 LaunchDarkly에서 플래그를 읽는 방법을 설명합니다. LaunchDarkly가 설정되지 않았거나 접속할 수 없으면 모든 읽기는 기본값으로 돌아갑니다. 이미 플래그에 LaunchDarkly를 쓰는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓액션, 플러그인 또는 컴포넌트가 LaunchDarkly에 저장된 플래그를 읽어야 할 때.
- ✓앱의 LaunchDarkly 키를 설정하고 있을 때.
- ✓LaunchDarkly와 내장 플래그 시스템 중 무엇을 쓸지 골라야 할 때.
스킬 링크
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/launchdarkly/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“LaunchDarkly에서 새 내보내기 기능의 플래그를 읽되, 접속할 수 없으면 안전한 기본값을 쓰도록 해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
앱은 서버나 브라우저에서 LaunchDarkly 도우미를 통해 플래그를 읽으며, LaunchDarkly가 답할 수 없을 때는 기본값을 사용합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
LaunchDarkly
Rule
LaunchDarkly flags are read through @agent-native/core/launchdarkly on the
server and @agent-native/core/client/launchdarkly in the browser. Every read
fails closed to a caller-supplied default — LaunchDarkly being unconfigured,
unreachable, or slow is never an availability dependency for the caller.
LaunchDarkly vs. the built-in feature-flags skill
This repo already has its own rollout system (defineFeatureFlag,
isFeatureFlagEnabled, useFeatureFlag — see the feature-flags skill),
managed from the Analytics fleet control plane with no external dependency.
Use that system for a flag whose definition and targeting rules should live in
this codebase and be manageable from Analytics.
Use LaunchDarkly instead when the flag's definition and targeting genuinely need to live in the LaunchDarkly dashboard — for example, a flag shared with non-Agent-Native systems, or targeting rules (percentage experiments, multi-variate values, scheduled changes) beyond what the built-in system offers. Don't wire the same rollout through both systems.
Setup
Set LAUNCHDARKLY_SDK_KEY to a server-side SDK key from the agent-native
LaunchDarkly project's active environment. Unset, every read falls back to its
default value and LaunchDarkly is never contacted — there is no broken state
to debug, only an inactive one.
No client-side ID or LaunchDarkly JS SDK is used. Browser code reads evaluated
flags through the get-launchdarkly-flags action instead, so the SDK key never
reaches a bundle and no LaunchDarkly network connection opens from the browser.
Server usage
import { isLaunchDarklyFlagEnabled } from "@agent-native/core/launchdarkly";
run: async (args, ctx) => {
const enabled = await isLaunchDarklyFlagEnabled("new-checkout-flow", {
userEmail: ctx.userEmail,
orgId: ctx.orgId,
});
if (!enabled) throw new Error("New checkout flow is not enabled.");
// guarded operation
};
For a non-boolean flag (string/number/JSON variation), use
getLaunchDarklyVariation(key, actor, defaultValue) — the return type matches
defaultValue's type. getAllLaunchDarklyFlags(actor) returns every flag
LaunchDarkly currently evaluates for that context; prefer the single-flag
functions when only a few keys matter.
actor is { userEmail?, orgId?, anonymousId? }. A signed-in caller evaluates
by userEmail. A caller with neither userEmail nor anonymousId falls back
to one shared "anonymous" context — every such caller gets the same
variation from a percentage rollout, since LaunchDarkly buckets by context key.
Pass a stable anonymousId (a device or session id) when an unauthenticated
caller needs its own bucket.
Client usage
import { useLaunchDarklyFlag } from "@agent-native/core/client/launchdarkly";
function CheckoutButton() {
const enabled = useLaunchDarklyFlag("new-checkout-flow");
if (!enabled) return null;
return <Button>Checkout</Button>;
}
useLaunchDarklyFlag(key, defaultValue = false) calls the mounted
get-launchdarkly-flags action for the current session and requires a real
session — like useFeatureFlag, it never fires for a signed-out visitor and
resolves to defaultValue instead. useLaunchDarklyFlags(keys, defaultValue)
evaluates several keys in one request.
get-launchdarkly-flags action
Auto-mounted for every app (like get-feature-flags) — no plugin or
registration needed. Gateable per app via
frameworkTools.launchDarkly (see framework-tools.ts) if an app wants to
remove it from the agent's tool surface; the HTTP route stays mounted either
way so useLaunchDarklyFlag keeps working.
run("get-launchdarkly-flags", { keys: ["new-checkout-flow"], defaultValue: false })
// => { flags: { "new-checkout-flow": true } }
Never do this
- Never import
@agent-native/core/launchdarkly(the server module) from client/browser code — it pulls in the LaunchDarkly Node SDK. Use@agent-native/core/client/launchdarklyinstead. - Never treat a LaunchDarkly read as required for an operation to complete —
every function here already fails closed; don't wrap calls in retries or
turn a
false/default result into a thrown error unless the flag itself is an authorization gate the caller must respect. - Never put
LAUNCHDARKLY_SDK_KEYinagent-native.config.tsor any client-visible config — it is server-only.
Related skills
- feature-flags — the framework's own rollout system; read this first to
자주 묻는 질문
LaunchDarkly가 설정되지 않으면 어떻게 되나요?
모든 읽기는 기본값을 반환하며, LaunchDarkly에는 전혀 연결하지 않습니다.
이것과 내장 플래그 중 무엇을 써야 하나요?
이 코드베이스에서 관리하는 플래그에는 내장 시스템을, 규칙을 LaunchDarkly 대시보드에 두어야 할 때는 LaunchDarkly를 쓰라고 이 스킬은 말합니다.
어떤 키가 필요한가요?
프로젝트의 활성 환경에서 서버 측 SDK 키 하나를 설정하라고 이 스킬은 말합니다.
상세 정보
작성자의 원본 설명
Server-side and client-side LaunchDarkly flag evaluation (project key `agent-native`). Use when reading a LaunchDarkly flag from an action, plugin, or component, or when wiring `LAUNCHDARKLY_SDK_KEY`. Distinct from the framework's own `feature-flags` system.
repo: BuilderIO/agent-native
인기도
- GitHub 스타
- 7.6k
- 순위
- #13166
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
design-exploration
7.6k에이전트가 여러 UI 디자인 방향을 나란히 보여 주고, 사용자가 하나를 고르면 그 디자인을 다듬도록 돕습니다.
visual-edit
7.6k에이전트가 실행 중인 로컬 앱을 시각 편집기에 열어, 실제 화면을 함께 검토하고 편집하도록 돕습니다.
turn-into-app
7.6k워크플로, 스프레드시트 또는 프로젝트를 데이터가 채워진 세련된 시각 앱으로 바꾸고, 컨트롤 뒤에서 에이전트가 작업하도록 합니다.
visual-plan
7.6k일반 텍스트 계획을 다이어그램, 파일 맵, 코드 조각, 열린 질문이 담긴 대화형 시각 계획으로 바꿔 줍니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.