Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

feature-flag-management功能标志管理

Agent Skill

feature-flag-management 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

582

周安装

25

GitHub Stars

25

下载量

204
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:feature-flag-management(功能标志管理)
来源仓库:https://github.com/oimiragieo/agent-studio
仓库路径:skills/feature-flag-management
安装命令:
npx skills add https://github.com/oimiragieo/agent-studio --skill feature-flag-management
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill feature-flag-management

简介

实施生命周期驱动的功能标志管理,确保代码路径可控可测。

  • 每个标志必须包含类型、所有者、目标和清理计划四要素。feature-flag-management 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 支持 trunk-based 开发和渐进式发布的安全落地实践。
  • 提供 A/B 测试基础设施和紧急回滚的快速响应机制。
  • 通过 GitHub 安装,适用于需要严格功能治理的工程团队。

SKILL.md

Feature Flag Management Skill

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.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.46%
按下载量换算72

Claude

30.09%
按下载量换算61

Cursor

17.83%
按下载量换算36

Gemini CLI

9.61%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills