xiaohongshu
xiaohongshu
launchdarkly-flag-cleanup
Safely automate feature flag cleanup workflows using the LaunchDarkly MCP server. Use when removing flags from code, cleaning up stale flags, assessing removal readiness, or creating PRs that preserve production behavior.
Full skill instructions
A workflow for safely removing feature flags from codebases while preserving production behavior. This skill uses LaunchDarkly as the source of truth to determine removal readiness and the correct forward value.
This skill requires the LaunchDarkly MCP server to be configured in your environment.
Required MCP tools:
get-environmentsget-feature-flagget-flag-status-across-environmentsget-code-referencesUse get-environments with the project key to find environments marked as critical (typically production, staging, or user-specified).
Use get-feature-flag to retrieve the full configuration. Extract:
variations: Possible valueson: Whether enabledfallthrough.variation: Variation index when no rules matchoffVariation: Variation index when flag is offrules: Targeting rules (complexity indicator)targets: Individual context targetsThe forward value replaces the flag in code.
| Scenario | Forward Value |
|---|---|
| All critical envs ON, same fallthrough, no rules/targets | Use fallthrough.variation |
| All critical envs OFF, same offVariation | Use offVariation |
| Critical envs differ in ON/OFF state | NOT SAFE - stop |
| Critical envs serve different variations | NOT SAFE - stop |
Use get-flag-status-across-environments to check lifecycle status.
READY if ALL true:
launched or active in all critical environmentsPROCEED WITH CAUTION if:
inactive (no recent traffic)NOT READY if:
new (still rolling out)Use get-code-references to identify repositories. If the current repo isn't listed, inform the user. Note the count of other repositories for awareness.
Search for all references and replace with the forward value:
Find evaluation patterns:
variation('flag-key', ...)boolVariation('flag-key', ...)featureFlags['flag-key']Replace with forward value:
Clean up:
Example transformation (forward value = true):
// Before
const showNewCheckout = await ldClient.variation('new-checkout-flow', user, false);
if (showNewCheckout) {
return renderNewCheckout();
} else {
return renderOldCheckout();
}
// After
return renderNewCheckout();
Use the template in references/pr-template.md for a structured PR description including removal summary, readiness assessment, and risk analysis.
| Situation | Action |
|---|---|
| Flag not found | Inform user, check for typos |
| Already archived | Ask if code cleanup still needed |
| Multiple SDK patterns | Search all: variation(), boolVariation(), variationDetail(), allFlags() |
Dynamic flag keys (flag-${id}) | Warn that automated removal may be incomplete |
| Different default values in code | Flag as inconsistency in PR |
| Orphaned exports/files remain | Run unused-export checks and remove dead files |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience