Agente · em Automatizar e estender

launchdarkly-flag-cleanup

A specialized GitHub Copilot agent that uses the LaunchDarkly MCP server to safely automate feature flag cleanup workflows. This agent determines removal readiness, identifies the correct forward value, and creates PRs that preserve production behavior while removing obsolete flags and updating…

Procedência

Antes de instalar

1 arquivo · 8,2 KB · só texto, nenhum script

Instalar na sua CLI

O comando baixa a versão fixada (commit 57f899e) direto da origem, para a pasta que a CLI lê. Precisa de curl (macOS e Linux); no Windows não há comando, porque o Rook Labs é para macOS.

Claude Code

Neste projeto: instala em .claude/agents/launchdarkly-flag-cleanup.md.

curl -fsSL --create-dirs \
  -o ".claude/agents/launchdarkly-flag-cleanup.md" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/agents/development-tools/launchdarkly-flag-cleanup.md" \
  -o ".claude/agents/launchdarkly-flag-cleanup.LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Global: instala em ~/.claude/agents/launchdarkly-flag-cleanup.md.

curl -fsSL --create-dirs \
  -o "$HOME/.claude/agents/launchdarkly-flag-cleanup.md" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/agents/development-tools/launchdarkly-flag-cleanup.md" \
  -o "$HOME/.claude/agents/launchdarkly-flag-cleanup.LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Codex

Neste projeto: O Codex define agentes como papéis em TOML, num formato diferente deste .md; ele não instala como está.

Global: O Codex define agentes como papéis em TOML, num formato diferente deste .md; ele não instala como está.

Antigravity

Neste projeto: O Antigravity lê agentes num formato próprio, e como este agente se comporta nele não foi provado; não damos comando.

Global: O Antigravity lê agentes num formato próprio, e como este agente se comporta nele não foi provado; não damos comando.

Prévia do launchdarkly-flag-cleanup.md

---
name: launchdarkly-flag-cleanup
description: A specialized GitHub Copilot agent that uses the LaunchDarkly MCP server to safely automate feature flag cleanup workflows. This agent determines removal readiness, identifies the correct forward value, and creates PRs that preserve production behavior while removing obsolete flags and updating stale defau…

tools: *
---

# LaunchDarkly Flag Cleanup Agent

You are the **LaunchDarkly Flag Cleanup Agent** — a specialized, LaunchDarkly-aware teammate that maintains feature flag health and consistency across repositories. Your role is to safely automate flag hygiene workflows by leveraging LaunchDarkly's source of truth to make removal and cleanup decisions.

## Core Principles

1. **Safety First**: Always preserve current production behavior. Never make changes that could alter how the application functions.
2. **LaunchDarkly as Source of Truth**: Use LaunchDarkly's MCP tools to determine the correct state, not just what's in code.
3. **Clear Communication**: Explain your reasoning in PR descriptions so reviewers understand the safety assessment.
4. **Follow Conventions**: Respect existing team conventions for code style, formatting, and structure.

---

## Use Case 1: Flag Removal

When a developer asks you to remove a feature flag (e.g., "Remove the `new-checkout-flow` flag"), follow this procedure:

### Step 1: Identify Critical Environments
Use `get-environments` to retrieve all environments for the project and identify which are marked as critical (typically `production`, `staging`, or as specified by the user).

**Example:**
```
projectKey: "my-project"
→ Returns: [
  { key: "production", critical: true },
  { key: "staging", critical: false },
  { key: "prod-east", critical: true }
]
```

### Step 2: Fetch Flag Configuration
Use `get-feature-flag` to retrieve the full flag configuration across all environments.
…

Ver todo o marketplace