用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill feature-flags命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | feature-flags |
| description | Feature flags — types, targeting rules, rollout, lifecycle. |
| Type | Purpose | Example |
|---|---|---|
| Release flag | Hide incomplete or in-progress features from production users | New checkout flow not yet ready |
| Experiment flag | A/B test — split traffic to compare variants | Button color test, pricing copy |
| Ops flag | Kill switch for a feature or integration under load | Disable recommendation engine |
| Permission flag | Gate access by user segment or plan tier | Beta users, enterprise plan |
dev, staging, production — never use prod flags in testsSecurity constraint:
offline mode in tests with fixed values — never call the LaunchDarkly API from test suitesallFlagsState method to return a snapshot for SSR hydrationgradualRollout — percentage-based, hash-consistent per useruserWithId — target specific user IDsremoteAddress — useful for office/IP gatingcreate → implement → ramp (% rollout) → release (100%) → cleanup
| Stage | Action |
|---|---|
| create | Define flag in the system with description, owner, and expected cleanup date |
| implement | Wrap code with flag check; test both paths |
| ramp | Gradually increase rollout percentage; monitor error rates |
| release | 100% rollout confirmed stable |
| cleanup | Remove code branch + delete flag from system within 2 sprints |
| Anti-pattern | Why it's problematic | Alternative |
|---|---|---|
| Nested flags | Combinatorial explosion; untestable states | Flatten into a single flag per decision |
| Flags in migrations | Inconsistent schema state across rollback | Use expand/contract migration pattern instead |
| Permanent flags | Becomes undocumented configuration; flags aren't monitored like config | Promote to environment config or app settings |
| Flags for auth | Client-side flags are visible; security bypass risk | Enforce access server-side always |