Feature Flag Lifecycle Repair

    by Mariusz Wrzeszczynski

    1

    Repair feature-flag lifecycle drift in a repository using Cursor.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLIVVS CodeWWindsurfMManus+14 more

    See it in action

    You say

    Review our feature flags in the Next.js app and Node API. We have inconsistent fallbacks for 'new-checkout' and stale mocks in our Vitest suite. Prepare a safe repair patch.

    Your agent does

    1. Repair decision

    Decision: FEATURE FLAG LIFECYCLE DRIFT FOUND. Found conflicting fallbacks (Server: false, Client: true) and raw string keys in middleware.

    5. Drift findings

    • F1: Fallback mismatch in checkout-registry.ts.
    • F2: Mock drift in checkout.test.ts.

    6. Safe patch plan

    • Unify fallbacks in a shared config.
    • Replace raw strings with typed constants.
    • Update Vitest fixtures to use variant objects.

    What you get

    Align conflicting server and client fallback values for failed flag lookups.Centralize raw string keys into a typed registry to prevent drift.Ensure background workers respect the original API feature flag decision.Generate characterization tests for safe flag retirement and code cleanup.

    About this skill

    The problem

    Feature flag behavior often drifts between registries, provider adapters, and across the stack from API to browser. Inconsistent fallbacks, orphaned keys, and duplicated string literals lead to unpredictable production behavior and risky code cleanup.

    What it does

    • Inspects flag definitions to identify mismatched fallbacks between server, client, and worker processes.
    • Traces flag evaluation paths to find dead branches, stale aliases, and multivariate flags incorrectly treated as booleans.
    • Centralizes typed flag definitions and aligns server-client evaluation contracts for consistent targeting context.
    • Prepares bounded repository patches and deterministic local tests to repair lifecycle metadata and cleanup paths.
    • Detects exposure analytics drift where events fire on component render instead of behavior decision boundaries.

    Why this beats prompting it yourself

    General prompts often suggest deleting flags without checking cross-process dependencies like queued jobs or mobile client compatibility. This skill enforces a strict lifecycle protocol, identifying "authority" sources and preserving kill switches that shouldn't be retired.

    Use cases

    • Aligning browser and server fallback values to prevent hydration errors during provider outages.
    • Refactoring raw flag-key strings into a central, typed registry with explicit variant mapping.
    • Repairing API-to-worker decision paths to ensure queued jobs respect the original flag context.
    • Establishing a deterministic retirement plan for 100% rolled-out features without breaking legacy client support.

    Known limitations

    Does not connect to live providers like LaunchDarkly or Unleash. It cannot verify remote targeting rules, segment membership, or production telemetry.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    Listedtoday

    Creator

    Mariusz Wrzeszczynski
    Mariusz Wrzeszczynski

    109 skills on Agensi

    Frequently Asked Questions

    Popular in Testing & QA