К основному содержанию
скилл CX Codex

launchdarkly-flag-discovery — скилл для Claude Code: что делает

Проводит аудит фиче-флагов LaunchDarkly, находит устаревшие тумблеры и проверяет безопасность их удаления. Пригодится для устранения долга по флагам в проекте.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add launchdarkly/ai-tooling --skill launchdarkly-flag-discovery -a claude-code
Открыть на GitHub

Что делает launchdarkly-flag-discovery

Скилл помогает разобрать завалы фиче-флагов LaunchDarkly. Он запрашивает projectKey, изучает окружение и ищет кандидатов на удаление через вызовы инструментов MCP. В зависимости от задачи агент делает общий аудит проекта, оценивает состояние конкретного тумблера или формирует очередь на очистку.

Для работы требуется настроенный в окружении удалённый MCP-сервер LaunchDarkly. Инструменты вроде list-flags и get-flag-status-across-envs нужны обязательно, а find-stale-flags и check-removal-readiness расширяют анализ. Скилл распознаёт неактивные флаги, проверяет расхождения между средами и выдаёт структурированный статус готовности к удалению: safe, caution или blocked.

Скилл рассчитан строго на диагностику и анализ рисков. Он не вырезает флаги из исходного кода и не переключает таргетинг в LaunchDarkly сам по себе.

Какие задачи решает

  • найти устаревшие и неиспользуемые фиче-флаги в LaunchDarkly
  • проверить расхождения статуса флага между средами
  • оценить риски и блокировки перед удалением флага
  • составить список кандидатов для очистки кодовой базы

Примеры запросов агенту

  • Проверь флаги в проекте core-app и найди кандидатов на удаление
  • Безопасно ли сейчас удалить флаг checkout-v2 в LaunchDarkly?
  • Сделай аудит временных флагов в окружении production

Как установить launchdarkly-flag-discovery

1Через Skills CLI (Vercel)

npx skills add launchdarkly/ai-tooling --skill launchdarkly-flag-discovery -a claude-code

2Вручную: положить файлы

~/.claude/skills/launchdarkly-flag-discovery/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/launchdarkly-flag-discovery/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора27

launchdarkly-flag-cleanup Безопасно удаляет фиче-флаги LaunchDarkly из кодовой базы после завершения раскатки. Скилл проверяет готовность через MCP и оставляет только активную ветку кода. CX Codex +1 4 100установок launchdarkly-flag-targeting Скилл для управления таргетингом фича-флагов LaunchDarkly: включение, процентные раскатки, правила и отдельные пользователи. CX Codex +1 4 100установок launchdarkly-flag-create Проводит агента по шагам: изучить, как флаги уже используются в проекте, создать новый в LaunchDarkly и вписать проверку в код по существующим паттернам. CX Codex +1 4 100установок launchdarkly-metric-create Проведёт от выбора типа метрики до её создания в LaunchDarkly: сначала наладит события, потом заведёт метрику и проверит результат. CX Codex +1 3 200установок launchdarkly-metric-choose Помогает выбрать метрики для эксперимента, guarded rollout или release policy в LaunchDarkly и показывает, что уже подцепится автоматически. CX Codex +1 3 200установок aiconfig-variations Устаревший скилл-редирект: сам ничего не делает, только отправляет к актуальному скиллу configs-variations. Нужен, если в ваших скриптах или промптах осталось старое имя. CX Codex +1 2 800установок aiconfig-create Устаревший скилл-переадресация для старых ссылок на aiconfig-create. Он направляет к актуальному скиллу configs-create. CX Codex +1 2 800установок aiconfig-projects Скилл отключён и переименован в projects. Нужен только тем, у кого в документации или промптах осталась старая ссылка. CX Codex +1 2 800установок

Похожие

launchdarkly-flag-cleanup официальный github Субагент проверяет фиче-флаги через MCP-сервер LaunchDarkly, определяет безопасное значение по продакшену и вырезает устаревшие ветки кода с оформлением пулреквеста. 171установок feature-flags devops-skills Скилл для ИИ-агента, который помогает внедрять фиче-флаги: постепенная раскатка, A/B-тесты, kill switch. Пригодится, когда релиз нужно отделить от деплоя. CX Codex +1 329установок testing-in-production kindlmann Скилл для тестирования прямо в продакшене: фича-флаги, канареечный деплой, прогрессивный роллаут и метрики-ограничители. Пригодится, когда релиз надо растянуть, а не выкатить на всех сразу. CX Codex +1 1 000установок cleaning-up-stale-feature-flags PostHog Находит устаревшие фича-флаги в проекте PostHog и убирает код, который их проверяет. Пригодится, когда флагов накопилось много и непонятно, какие уже можно удалить. CX Codex +1 434установок firebase-remote-config-basics Google LLC Скилл помогает управлять Remote Config в приложениях на Android и iOS через Firebase CLI. Позволяет менять флаги функций и параметры без выкатки обновлений в магазины. CX Codex +1 121 300установок shipping-and-launch addyosmani Готовит деплой в прод: чек-лист перед запуском, мониторинг, поэтапный роллаут и план отката. Пригодится, когда фича уходит к реальным пользователям. CX Codex +1 58 400установок

Рядом в теме «DevOps и инфраструктура»

Всё по теме «DevOps и инфраструктура» →

Вопросы о launchdarkly-flag-discovery

Как установить launchdarkly-flag-discovery в Claude Code?

Выполните команду npx skills add launchdarkly/ai-tooling --skill launchdarkly-flag-discovery -a claude-code. Скилл загрузится в ~/.claude/skills/launchdarkly-flag-discovery/SKILL.md.

Что делает launchdarkly-flag-discovery?

Скилл опрашивает LaunchDarkly через MCP-сервер, группирует флаги по статусам и находит заброшенные временные тумблеры. Он показывает сложность таргетинга и формирует отчёт о готовности к удалению.

Что нужно настроить перед запуском скилла?

Требуется подключить удалённый MCP-сервер LaunchDarkly в рабочей среде. Без инструментов list-flags, get-flag и get-flag-status-across-envs скилл работать не сможет.

Исходный текст

SKILL.md · Apache-2.0
---
name: launchdarkly-flag-discovery
description: "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."
license: Apache-2.0
compatibility: Requires the remotely hosted LaunchDarkly MCP server
metadata:
  author: launchdarkly
  version: "1.0.0-experimental"
---

# LaunchDarkly Flag Discovery

You're using a skill that will guide you through auditing and understanding the feature flag landscape in a LaunchDarkly project. Your job is to explore the project, assess the health of its flags, identify what needs attention, and provide actionable recommendations.

## Prerequisites

This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.

**Required MCP tools:**
- `list-flags`: search and browse flags with filtering by state, type, tags
- `get-flag`: get full configuration for a single flag in a specific environment
- `get-flag-status-across-envs`: check a flag's lifecycle status across all environments

**Optional MCP tools (enhance depth):**
- `find-stale-flags`: find flags that are candidates for cleanup, sorted by staleness
- `get-flag-health`: get combined health view for a single flag (merges status + config)
- `check-removal-readiness`: detailed safety check for a specific flag

## Workflow

### Step 1: Understand the Project

Before diving into flag data, establish context:

1. **Identify the project.** Confirm the `projectKey` with the user. If they haven't specified one, ask.
2. **Understand scope.** Ask the user what they're trying to accomplish:
   - Broad audit? ("What's the state of our flags?")
   - Targeted investigation? ("Is this specific flag still needed?")
   - Cleanup planning? ("What flags can we remove?")

### Step 2: Explore the Flag Landscape

Adapt your approach to the user's goal:

**For a broad audit:**
- Use `list-flags` scoped to a critical environment (default to `production`).
- Note the total count: this tells you the scale of the flag surface area.
- Filter by `state` (active, inactive, launched, new) to segment the landscape.
- Filter by `type` (temporary vs permanent): temporary flags are the primary cleanup targets.

**For cleanup planning:**
- Use `find-stale-flags`: this is the most efficient entry point. It returns a prioritized list of cleanup candidates sorted by staleness, categorized as:
  - `never_requested`: created but never evaluated (possibly abandoned)
  - `inactive_30d`: no SDK evaluations in the specified period
  - `launched_no_changes`: fully rolled out, no recent changes
- Default `inactiveDays` is 30. Increase for conservative cleanup (60, 90) or decrease for aggressive cleanup (7, 14).
- Default `includeOnly` is `temporary`. Set to `all` to include permanent flags.

**For a targeted investigation:**
- Use `get-flag-health` for a single-flag deep dive. It merges status data with configuration context in one call, returning lifecycle state, last-requested timestamp, targeting summary, age, and whether it's temporary.
- Or use `get-flag` for the full configuration including rules, targets, and fallthrough details.

### Step 3: Assess Flag Health

For flags that need deeper investigation, assess health signals. See [Flag Health Signals](references/flag-health-signals.md) for the full interpretation guide.

Key signals to evaluate:

| Signal | What it tells you |
|--------|-------------------|
| **Lifecycle state** | Where the flag is in its journey (new -> active -> launched -> inactive) |
| **Last requested** | When an SDK last evaluated this flag: staleness indicator |
| **Targeting complexity** | Number of rules and targets: removal complexity indicator |
| **Cross-environment consistency** | Whether the flag behaves the same everywhere |
| **Flag age + temporary status** | Old temporary flags are strong cleanup candidates |

Use `get-flag-status-across-envs` to check if a flag is consistent across environments. A flag inactive in production but active in staging tells a different story than one inactive everywhere.

### Step 4: Categorize and Prioritize

Group flags into actionable categories:

1. **Ready to remove**: Inactive everywhere, temporary, no dependencies. Direct the user to the [flag cleanup skill](../launchdarkly-flag-cleanup/SKILL.md) for code removal.
2. **Likely safe, needs verification**: Launched (fully rolled out), no rule changes recently. The user should confirm the rollout is intentionally complete.
3. **Needs investigation**: Active in some environments but not others, or has complex targeting. Don't recommend action without more context.
4. **Leave alone**: Active flags doing their job, or permanent flags that are intentionally long-lived.

### Step 5: Assess Removal Readiness (When Applicable)

If the user wants to know whether a specific flag can be removed, use `check-removal-readiness`. This tool orchestrates multiple API calls in parallel and returns a structured verdict:

- **`safe`**: No blockers or warnings. Proceed with cleanup.
- **`caution`**: Warnings exist (code references, expiring targets, permanent flag type). Present and let the user decide.
- **`blocked`**: Hard blockers (dependent flags, active requests, targeting rules). Must resolve first.

See [Removal Readiness Checklist](references/removal-readiness-checklist.md) for the full details on interpreting each signal.

### Step 6: Present Findings

Structure your response based on what the user asked for:

**For audits:** Lead with a summary (total flags, breakdown by state and type), then highlight what needs attention, then provide specific recommendations.

**For specific flags:** Lead with the verdict (healthy / needs attention / ready to remove), then support it with the signals you found.

**For cleanup planning:** Lead with the count of cleanup candidates, prioritize by confidence (safest removals first), and link to the cleanup workflow for execution.

## Important Context

- **"Launched" means fully rolled out**: targeting is on, a single variation is served to everyone, and no changes have been made recently. It doesn't mean "recently deployed."
- **"Inactive" doesn't always mean safe to remove.** The flag might be used in code that hasn't shipped yet, or referenced as a prerequisite by another flag.
- **Permanent flags can be inactive on purpose.** Some flags are designed to be dormant until needed (kill switches, emergency toggles). Don't automatically flag these for cleanup.
- **Weights are scaled by 1000 in the API.** A weight of `60000` means 60%. Always convert to human-readable percentages.
- **This skill is for discovery, not action.** If the user wants to remove a flag from code, direct them to the [flag cleanup skill](../launchdarkly-flag-cleanup/SKILL.md). If they want to change targeting, direct them to the [flag targeting skill](../launchdarkly-flag-targeting/SKILL.md).

## References

- [Flag Health Signals](references/flag-health-signals.md): How to interpret lifecycle states, staleness, and health data
- [Removal Readiness Checklist](references/removal-readiness-checklist.md): Full safety assessment before recommending flag removal

© launchdarkly · Apache-2.0 · launchdarkly/ai-tooling

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой