Community生產力與協作github.com

launchdarkly/launchdarkly-guarded-rollout

設定具備漸進式流量增加、指標監控與自動回滾功能的受防護發布。適用於在安全閾值下逐步釋出功能。

launchdarkly-guarded-rollout 是什麼?

此技能透過 LaunchDarkly 的功能旗標,實現「受防護的逐步發布」(guarded rollout)。使用者可以設定階段性的流量遞增計畫,例如從 10% 開始,逐步提升至 100%,並在每個階段自動監控預先定義的業務指標(如錯誤率、延遲或自訂事件)。一旦指標超出設定的安全閾值,系統便會立即自動觸發回滾(rollback),將流量導回舊版本,從而避免大規模故障。此技能支援 Claude Code 等 AI 代理工具,透過指令或 API 呼叫即可快速部署複雜的釋出策略,無需手動編寫繁瑣的腳本。對於採用漸進式交付(progressive delivery)與功能旗標(feature flag)的團隊而言,這項技能能大幅提升釋出安全性與自動化程度。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/launchdarkly/agent-skills/tree/main/skills/launchdarkly-guarded-rollout

Installed? Explore more 生產力與協作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

launchdarkly-guarded-rollout 是做什麼的?

設定具備漸進式流量增加、指標監控與自動回滾功能的受防護發布。適用於在安全閾值下逐步釋出功能。

概述

此技能讓您能夠使用 LaunchDarkly 功能旗標來設定受防護的逐步發布。您可定義階段性的流量遞增計畫,指定每個階段的目標流量百分比、持續時間,以及用於監控的關鍵業務指標。若任何指標超出定義的安全閾值,發布將自動回滾至先前的穩定版本。

使用方式

若要使用此技能,請提供 LaunchDarkly 環境的 API 金鑰與項目金鑰,並指定要發布的功能旗標名稱。技能將根據您的設定自動建立或更新旗標的釋出階段。

支援的步驟

  1. 定義階段:設定每個階段的流量百分比(例如 10%、25%、50%、100%)與持續時間。
  2. 設定指標:選擇要監控的 LaunchDarkly 指標(如錯誤率、延遲、自訂事件)。
  3. 設定閾值:為每個指標指定觸發回滾的臨界值。
  4. 執行發布:觸發受防護的逐步發布,技能將在背景持續監控。
  5. 自動回滾:若任何指標超出閾值,則自動將流量恢復至 0%。

範例

以下範例演示如何設定一個受防護的逐步發布:

phases:
  - percentage: 10
    duration: 30m
    metrics:
      - name: error-rate
        threshold: 0.05
        comparison: greater-than
  - percentage: 25
    duration: 1h
    metrics:
      - name: error-rate
        threshold: 0.05
        comparison: greater-than
  - percentage: 50
    duration: 2h
    metrics:
      - name: latency-p99
        threshold: 200
        comparison: greater-than
  - percentage: 100
    duration: 24h
    metrics:
      - name: error-rate
        threshold: 0.03
        comparison: greater-than

環境變數

變數名稱說明
LAUNCHDARKLY_SDK_KEYLaunchDarkly SDK 金鑰,用於驗證 API 請求
LAUNCHDARKLY_PROJECT_KEY目標項目的金鑰
LAUNCHDARKLY_FLAG_KEY要執行發布的功能旗標金鑰

注意事項

  • 確保已安裝 LaunchDarkly SDK 並在環境中正確設定憑證。
  • 設定閾值時,建議先以較寬鬆的條件開始測試,再逐步調整。
  • 自動回滾僅會影響受監控的發布階段;若需完全取消發布,請手動介入。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

launchdarkly/aiconfig-agent-graphs

DEPRECATED redirect — this skill was renamed to agent-graphs. Do not use this skill; invoke agent-graphs instead. Kept only so old references to aiconfig-agent-graphs still point users to the new name.

launchdarkly/aiconfig-ai-metrics

DEPRECATED redirect — this skill was renamed to built-in-metrics. Do not use this skill; invoke built-in-metrics instead. Kept only so old references to aiconfig-ai-metrics still point users to the new name.

launchdarkly/aiconfig-create

DEPRECATED redirect — this skill was renamed to configs-create. Do not use this skill; invoke configs-create instead. Kept only so old references to aiconfig-create still point users to the new name.

launchdarkly/aiconfig-custom-metrics

DEPRECATED redirect — this skill was renamed to custom-metrics. Do not use this skill; invoke custom-metrics instead. Kept only so old references to aiconfig-custom-metrics still point users to the new name.

launchdarkly/aiconfig-migrate

DEPRECATED redirect — this skill was renamed to migrate. Do not use this skill; invoke migrate instead. Kept only so old references to aiconfig-migrate still point users to the new name.

launchdarkly/aiconfig-online-evals

DEPRECATED redirect — this skill was renamed to online-evals. Do not use this skill; invoke online-evals instead. Kept only so old references to aiconfig-online-evals still point users to the new name.

launchdarkly/aiconfig-projects

DEPRECATED redirect — this skill was renamed to projects. Do not use this skill; invoke projects instead. Kept only so old references to aiconfig-projects still point users to the new name.

launchdarkly/aiconfig-snippets

DEPRECATED redirect — this skill was renamed to snippets. Do not use this skill; invoke snippets instead. Kept only so old references to aiconfig-snippets still point users to the new name.

launchdarkly/aiconfig-targeting

DEPRECATED redirect — this skill was renamed to configs-targeting. Do not use this skill; invoke configs-targeting instead. Kept only so old references to aiconfig-targeting still point users to the new name.

launchdarkly/aiconfig-tools

DEPRECATED redirect — this skill was renamed to tools. Do not use this skill; invoke tools instead. Kept only so old references to aiconfig-tools still point users to the new name.

launchdarkly/aiconfig-update

DEPRECATED redirect — this skill was renamed to configs-update. Do not use this skill; invoke configs-update instead. Kept only so old references to aiconfig-update still point users to the new name.

launchdarkly/aiconfig-variations

DEPRECATED redirect — this skill was renamed to configs-variations. Do not use this skill; invoke configs-variations instead. Kept only so old references to aiconfig-variations still point users to the new name.

launchdarkly/apply

Apply LaunchDarkly SDK onboarding: install dependency (or dual-SDK pair), configure env and secrets with consent, add init at entrypoint(s), verify compile. Nested under sdk-install; next is run.

launchdarkly/detect

Detect repository stack for LaunchDarkly SDK onboarding: languages, frameworks, package managers, monorepo targets, entrypoints, existing LD usage. Nested under sdk-install; next is plan.

launchdarkly/first-flag

Create a boolean first flag, add evaluation, toggle on/off for end-to-end proof. Parent onboarding Step 6; uses MCP, API, or ldcli; optional flag-create skill.

launchdarkly/launchdarkly-experiment-setup

Set up and run experiments in LaunchDarkly. Create experiments with metrics, treatments, and flag config, start iterations to collect data, swap design between iterations, and stop with a winner.

launchdarkly/launchdarkly-flag-cleanup

Safely remove a feature flag from code while preserving production behavior. Use when the user wants to remove a flag from code, delete flag references, or create a PR that hardcodes the winning variation after a rollout is complete.

launchdarkly/launchdarkly-flag-create

Create and configure LaunchDarkly feature flags in a way that fits the existing codebase. Use when the user wants to create a new flag, wrap code in a flag, add a feature toggle, or set up an experiment. Guides exploration of existing patterns before creating.

launchdarkly/launchdarkly-flag-discovery

Audit your LaunchDarkly feature flags to understand the landscape, find stale or launched flags, and assess removal readiness. Use when the user asks about flag debt, stale flags, cleanup candidates, flag health, or wants to understand their flag inventory.

launchdarkly/launchdarkly-flag-targeting

Control LaunchDarkly feature flag targeting including toggling flags on/off, percentage rollouts, targeting rules, individual targets, and copying flag configurations between environments. Use when the user wants to change who sees a flag, roll out to a percentage, add targeting rules, or promote config between environments.

相關技能