मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)7.6k · #13166

launchdarkly

यह क्या करती है

यह स्किल बताती है कि Agent-Native ऐप का सर्वर और ब्राउज़र कोड LaunchDarkly से फ़्लैग कैसे पढ़ता है। LaunchDarkly सेट न होने या पहुंच में न होने पर हर पढ़ना एक डिफ़ॉल्ट मान पर लौटता है। यह उन डेवलपर्स के लिए है जो पहले से अपने फ़्लैग के लिए LaunchDarkly इस्तेमाल करते हैं।

कब इस्तेमाल करें

  • ✓जब कोई action, plugin या कंपोनेंट LaunchDarkly में सहेजा फ़्लैग पढ़ना चाहता है।
  • ✓जब आप किसी ऐप के लिए LaunchDarkly key सेट कर रहे हैं।
  • ✓जब आपको LaunchDarkly और बिल्ट-इन फ़्लैग सिस्टम में से चुनना है।

Skill का लिंक

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/launchdarkly/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/launchdarkly/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस ऐप में नए एक्सपोर्ट फ़ीचर के लिए हमारा LaunchDarkly फ़्लैग पढ़िए, और पहुंच न होने पर सुरक्षित डिफ़ॉल्ट रखिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

ऐप सर्वर या ब्राउज़र में LaunchDarkly helper के ज़रिए फ़्लैग पढ़ता है, और जब भी 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/launchdarkly instead.
  • 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_KEY in agent-native.config.ts or any client-visible config — it is server-only.

Related skills

  • feature-flags — the framework's own rollout system; read this first to
अक्सर पूछे जाने वाले सवाल

अगर LaunchDarkly कॉन्फ़िगर न हो तो?

हर पढ़ना अपना डिफ़ॉल्ट मान लौटाता है, और LaunchDarkly से संपर्क नहीं किया जाता।

क्या मुझे यह इस्तेमाल करना चाहिए या बिल्ट-इन फ़्लैग?

स्किल कहती है कि इस कोडबेस में प्रबंधित फ़्लैग के लिए बिल्ट-इन सिस्टम, और जब नियम उनके dashboard में रहने चाहिए तब LaunchDarkly इस्तेमाल करें।

कौन सी key चाहिए?

स्किल कहती है कि प्रोजेक्ट के सक्रिय environment से एक server-side SDK key सेट करें।

जानकारी

लेखक का मूल विवरण

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
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

design-exploration

7.6k

यह आपके एजेंट को UI के कई डिज़ाइन विकल्प साथ-साथ दिखाने, आपकी पसंद चुनवाने और फिर चुने डिज़ाइन को सुधारने में मदद करती है।

डिज़ाइनइंटरफ़ेस (UI/UX)

visual-edit

7.6k

यह आपके एजेंट को चल रहे लोकल ऐप को विज़ुअल एडिटर में खोलने देती है, ताकि आप उसकी असली स्क्रीन एक साथ देखकर संपादित कर सकें।

डिज़ाइनइंटरफ़ेस (UI/UX)

turn-into-app

7.6k

यह किसी वर्कफ़्लो, स्प्रेडशीट या प्रोजेक्ट को भरी हुई स्क्रीन वाले विज़ुअल ऐप में बदलती है, जिसके कंट्रोल के पीछे एजेंट काम करता है।

कोडिंगसामान्य कोडिंग

visual-plan

7.6k

यह सादे टेक्स्ट वाली योजना को डायग्राम, फ़ाइल नक्शों, कोड अंश और खुले सवालों वाली इंटरैक्टिव विज़ुअल योजना में बदलती है।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

मिलती-जुलती skills