Feature Flag Cleanup

Find stale feature flags, determine which side won, and safely remove the dead code path.

AI Agents / Developmentai-agentsdevelopment
by AgentVoltv1.0.0Published 1y ago1 install
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

PromptRemove all dead feature flags and clean up the codebase
Beforegeneric AI agent
Flag cleanup is important for maintainability. I can help you identify flags that aren't being used anywhere. To get started, do you have a list of all your feature flags? What's your deployment schedule like? Are you using a specific flag management system? Once I understand your setup better, I can suggest an approach for safely removing them.
Afterwith Feature Flag Cleanup
FLAG CLEANUP WORKFLOW

→ DISCOVERY PHASE (do this first)
  1. Scan codebase for @flag-enabled and @flag-disabled patterns
  2. Cross-reference against config-flags.json (180 total flags found)
  3. Tag flags by age: recent (30d), active (30-90d), dormant (90d+)
  4. Flag removal trap: always check Git history for recent toggles

→ SAFETY VALIDATION
  • Verify flag isn't used in monitoring/alerting (query dashboards)
  • Check if flag in any active A/B test queue
  • Confirm flag_id not referenced in changelog or docs
  • Test: set flag to false, run regression suite

→ REMOVAL & VERIFICATION
  Dead flags identified: 47 (all dormant 120+ days, unused in deployments)
  Remove from: config/flags/, codebase references, analytics tracking
  Post-cleanup test: full integration suite pass (required)
  Document removed flags in migration log

About this skill


name: flag-cleanup description: Use when Structured Claude skill that gives Claude a repeatable workflow for flag cleanup.

Flag Cleanup

One of 337+ skills in the original author's multi-agent claude-skills mega-collection (~19k GitHub stars). Packages the Flag Cleanup workflow with its own instructions and validation so outputs stay consistent.

What you get

  • Public GitHub repo (alirezarezvani/claude-skills)
  • the flag-cleanup skill folder with SKILL.md. Part of a 337-skill / 30-agent / 70-command install.

Customize your output

  • Fork the repo and adapt the skill's instructions and references to your workflow.

Example output

Activates automatically when your request matches Flag Cleanup; chains with the other skills, agents, and commands in the collection.

Best for

Creators, builders, and teams using Claude Code.

SKILL.md preview

SKILL.md
---
name: flag-cleanup
description: Use when a codebase has stale feature flags that need to be identified, resolved, and safely removed.
version: 1.0.0
category: AI Agents / Development
author: AgentVolt
license: proprietary
tags:
  - ai-agents
  - development
---

# Flag Cleanup

Walks through finding stale feature flags, determining which side of each flag won, and safely removing the dead code path without breaking live behavior.

## When to use
- A feature flag has been at 100% rollout for a long time and is cluttering the codebase

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More ai & agents skills

View all AI & Agents skills →