launchdarkly-flag-cleanup

launchdarkly-flag-cleanup is an agent for Claude Code from archubbuck/workspace-architect. It costs 60 tokens per session (1,976 once invoked), scanned B, a copy of launchdarkly-flag-cleanup, ISC.

A GitHub Copilot agent that cleans up obsolete LaunchDarkly feature flags. It checks whether a flag is safe to remove, chooses the value that preserves current production behavior, and opens a pull request with the related code changes.

In plain words
What is it for?
It helps identify flags ready for removal, update stale defaults, and create pull requests that remove unused flag code without changing the active behavior.
Why use it?
Removing a feature flag can accidentally change how a live application behaves. This agent uses LaunchDarkly's configured state to guide the cleanup and explain the safety decision for reviewers.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit It helps identify flags ready for removal, update stale defaults, and create pull requests that remove unused flag code without changing the active behavior.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/archubbuck/workspace-architect/launchdarkly-flag-cleanup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/archubbuck/workspace-architect

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for launchdarkly-flag-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/agents/archubbuck/workspace-architect/launchdarkly-flag-cleanup.svg)](https://agentmods.dev/agents/archubbuck/workspace-architect/launchdarkly-flag-cleanup)
Your own site
<a href="https://agentmods.dev/agents/archubbuck/workspace-architect/launchdarkly-flag-cleanup"><img src="https://agentmods.dev/badge/agents/archubbuck/workspace-architect/launchdarkly-flag-cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,976 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.01976
Opus 5 $0.00030 $0.00988
Sonnet 5 $0.00012 $0.00395
Haiku 4.5 $0.00006 $0.00198

Measured 3d ago against content hash c6d8cafbebea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

launchdarkly-flag-cleanup scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

tools: ['*']
Origin

This is a copy

100% identical to launchdarkly-flag-cleanup — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

assets/agents/launchdarkly-flag-cleanup.agent.md · 215 lines

How it starts

The opening of the file, as written. The whole thing — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

What to extract:

  • variations: The possible values the flag can serve (e.g., [false, true])
  • For each critical environment:
    • on: Whether the flag is enabled
    • fallthrough.variation: The variation index served when no rules match
    • offVariation: The variation index served when the flag is off
    • rules: Any targeting rules (presence indicates complexity)
    • targets: Any individual context targets
    • archived: Whether the flag is already archived
    • deprecated: Whether the flag is marked deprecated

Read the full file on GitHub · 215 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 215 lines · 60 tokens per session scan B c6d8cafbebea

Subscribe to this mod's changes

launchdarkly-flag-cleanup is an agent published in the GitHub repository archubbuck/workspace-architect (18 stars, last pushed 3d ago), licensed ISC. It adds 60 tokens to every session and 1,976 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). It is 100% identical to launchdarkly-flag-cleanup, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

git-publisher

Coordinator-owned bounded git/GitHub operations — stage, commit, push, open/reconcile a PR, watch CI, and merge only on an exact PR/CI/review head match. Never edits repository files and never force-pushes. Dispatched by agentmaster-execute with one approved publication manifest; not a general-purpose worker.

rhawk117/agentmaster · 72 tokens

cos-compliance

Use this agent before shipping, merging, or deploying changes. The Compliance Gate validates that all quality gates are met: tests pass, documentation is updated, breaking changes are communicated, and the change is ready for production. Context: User wants to merge a feature branch user: "I think this PR is ready to…

winstonkoh87/Athena-Public · 180 tokens

module-registrar

Register new modules in the Datacore ecosystem. Use this agent: When creating a new module for community contribution For :AI:module:register: tagged tasks To update CATALOG.md with new module entries To create GitHub repos and PRs for module registration Part of the community contribution workflow (DIP-0001).

datacore-one/datacore · 78 tokens

git-manager

Stage, commit, and push code changes with conventional commits. Use when user says "commit", "push", or finishes a feature/fix. Does NOT create PRs or run CI — that's the shipper's job. Not for deployment orchestration.

ngocsangyem/MeowKit · 54 tokens

mr-description-creator-default

Generate MR/PR descriptions from git changes and apply directly via gh (GitHub) or glab (GitLab) CLI. Analyzes commits, file changes, and changelogs for breaking changes, features, fixes, and impacts. Supports custom templates.

GantisStorm/essentials-claude-code · 59 tokens

agent:worktree-manager

Expert git worktree management and troubleshooting. Handles worktree creation, cleanup, lock file resolution, and diagnostic operations. Use for worktree lifecycle management and troubleshooting.

shakestzd/contextune · 38 tokens