본문으로 건너뛰기
cccskills
무료GitHub에 공개

feature-flag-management

Feature flag lifecycle management -- safe feature toggling, gradual rollouts, A/B testing patterns, flag cleanup strategies, and technical debt prevention. Covers LaunchDarkly, Unleash, OpenFeature, and custom implementations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(10)

  • SKILL.md9.2 KB
  • commands/feature-flag-management.md123 B
  • hooks/post-execute.cjs324 B
  • hooks/pre-execute.cjs441 B
  • references/research-requirements.md443 B
  • rules/feature-flag-management.md370 B
  • schemas/input.schema.json624 B
  • schemas/output.schema.json267 B
  • scripts/main.cjs584 B
  • templates/implementation-template.md197 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Feature Flag Management Skill

<identity> Feature flag lifecycle specialist covering safe feature toggling, gradual rollouts, A/B testing patterns, and flag cleanup to prevent technical debt. Enforces disciplined flag hygiene across the full lifecycle from creation through retirement. </identity> <capabilities> - Design feature flag architecture with proper categorization (release, experiment, ops, permission) - Implement gradual rollout strategies (percentage, user-segment, canary, ring-based) - Configure A/B testing with feature flags and metrics collection - Plan flag cleanup workflows to prevent stale flag accumulation - Integrate with flag platforms (LaunchDarkly, Unleash, Flipt, OpenFeature SDK) - Implement custom feature flag systems for projects without external platforms - Set up flag-aware testing strategies (all flag combinations) - Monitor flag evaluation performance and stale flag detection </capabilities>

Overview

Feature flags decouple deployment from release, enabling trunk-based development, safe rollouts, and instant rollbacks. However, undisciplined flag usage creates exponential code path complexity, stale flags, and untested combinations. This skill enforces a lifecycle-driven approach: every flag has a type, an owner, a target date, and a cleanup plan from day one.

When to Use

  • When implementing trunk-based development with continuous deployment
  • When rolling out features gradually to reduce risk
  • When setting up A/B testing infrastructure
  • When auditing existing codebases for stale or orphaned feature flags
  • When choosing between feature flag platforms
  • When implementing kill-switches for critical features

Iron Laws

  1. ALWAYS assign an owner and expiration date to every feature flag -- orphaned flags without owners accumulate indefinitely and become permanent tech debt.
  2. NEVER nest feature flags more than 2 levels deep -- combinatorial explosion makes testing impossible (2 flags = 4 states, 5 flags = 32 states, 10 flags = 1024 states).
  3. ALWAYS default flag values to the existing/safe behavior -- if the flag system fails, the application should behave as it did before the flag was added.
  4. NEVER use feature flags as a substitute for configuration management -- flags are temporary toggles for release control, not permanent application settings.
  5. ALWAYS clean up flags within 30 days of full rollout -- stale flags in code increase cognitive load, slow onboarding, and hide dead code paths.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Creating flags without expiration dates or ownersFlags become permanent; nobody knows if they can be removedRequire owner and target-date fields at creation time; alert on overdue flags
Nesting 3+ flags in conditional logicTesting requires covering all combinations; bugs hide in untested pathsLimit nesting to 2 levels; combine related flags into a single multi-valued flag
Defaulting new features to ON when flag is missingFlag system outage enables untested features for all usersDefault to OFF (existing behavior); explicitly enable after validation
Using flags for permanent configurationConfig changes require code deploys to remove; defeats the purpose of configUse environment variables or config files for permanent settings; flags are temporary
Testing only with flags ON or only with flags OFFMisses interaction bugs between flag statesTest both states; add flag-combination matrix to CI for critical flags

Workflow

Step 1: Flag Classification

Classify every flag before creation:

TypePurposeLifetimeExample
ReleaseControl feature visibility during rolloutDays to weeksenable_new_checkout
ExperimentA/B test with metrics collectionWeeks to monthsexperiment_pricing_page_v2
OpsKill-switch for operational controlPermanent (with review)circuit_breaker_payments
PermissionUser/role-based access controlPermanentenable_admin_dashboard

Step 2: Implementation Pattern

// OpenFeature SDK pattern (vendor-neutral)
import { OpenFeature } from '@openfeature/server-sdk';

const client = OpenFeature.getClient();

// Typed flag evaluation with safe default
const showNewUI = await client.getBooleanValue(
  'enable_new_checkout_ui',
  false, // safe default: existing behavior
  { targetingKey: user.id, attributes: { plan: user.plan } }
);

if (showNewUI) {
  renderNewCheckout();
} else {
  renderLegacyCheckout();
}

Step 3: Gradual Rollout Strategy

Phase 1: Internal (0-1 day)
  - Enable for development team
  - Verify in production environment

Phase 2: Canary (1-3 days)
  - Enable for 1% of users
  - Monitor error rates, latency, business metrics

Phase 3: Controlled Rollout (3-7 days)
  - Ramp: 5% -> 10% -> 25% -> 50% -> 100%
  - Hold at each stage for minimum 24 hours
  - Define rollback criteria before advancing

Phase 4: Cleanup (within 30 days of 100%)
  - Remove flag checks from code
  - Remove flag from platform
  - Update documentation

Step 4: Flag-Aware Testing

// Test both flag states in CI
describe('Checkout Flow', () => {
  describe('with new_checkout_ui enabled', () => {
    beforeEach(() => {
      flagProvider.setOverride('enable_new_checkout_ui', true);
    });

    it('should render new checkout components', () => {
      // test new path
    });
  });

  describe('with new_checkout_ui disabled', () => {
    beforeEach(() => {
      flagProvider.setOverride('enable_new_checkout_ui', false);
    });

    it('should render legacy checkout components', () => {
      // test legacy path
    });
  });
});

Step 5: Stale Flag Detection

# Find flags older than 30 days that are fully rolled out
# Custom script pattern for codebase scanning
grep -rn 'isEnabled\|getBooleanValue\|getFlag' src/ | \
  awk -F"'" '{print $2}' | \
  sort -u > active_flags.txt

# Compare against flag platform inventory
# Flag any that are 100% enabled for > 30 days

Step 6: Cleanup Checklist

For each flag being retired:

  • Remove all flag evaluation calls from code
  • Remove unused code path (the one not selected)
  • Remove flag from platform/configuration
  • Remove flag from test overrides
  • Update documentation referencing the flag
  • Verify no other flags depend on this flag
  • Deploy and verify behavior matches full-rollout state

Complementary Skills

SkillRelationship
tddTest-driven development for flag-guarded features
ci-cd-implementation-ruleCI/CD pipeline integration with flag-aware deploys
qa-workflowQA validation across flag combinations
proactive-auditAudit for stale or orphaned flags in codebase

Memory Protocol (MANDATORY)

Before starting:

Read .claude/context/memory/learnings.md for prior feature flag patterns and platform-specific decisions.

After completing:

  • New pattern -> .claude/context/memory/learnings.md
  • Issue found -> .claude/context/memory/issues.md
  • Decision made -> .claude/context/memory/decisions.md

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

oimiragieo의 스킬 모두 보기

이 스킬의 문제 신고