← ClaudeAtlas

add-feature-flaglisted

Use when a ticket asks to ship behaviour behind a toggle — a gradual rollout, a kill switch, an A/B variant, a dark launch — or to add, wire, or clean up a feature flag with a default, an owner, and a removal plan. Invoke for "put it behind a flag", "add a kill switch", "roll out to 10%", or "remove the flag now that it's fully on".
tmj-90/gaffer · ★ 1 · AI & Automation · score 70
Install: claude install-skill tmj-90/gaffer
# Add a feature flag A flag decouples deploy from release: code ships dark, is switched on deliberately, and can be switched off in seconds. Every flag is also a branch in the code that someone must test and later delete. Add it so both paths are correct, the default is safe, and its removal is already planned. ## Steps 1. **Classify the flag** (Pete Hodgson, "Feature Toggles"); the category sets its lifetime and how dynamic it must be: - **release** — hides unfinished or unreleased work; lives days to weeks; usually a static per-deploy value. The common case. - **ops / kill switch** — lets operators turn off a costly or risky path under load; may live long; must be changeable at runtime without a deploy. - **experiment** — A/B cohorts; decided per request/user; needs consistent bucketing. - **permission** — per-user or per-plan access; long-lived; this is product logic, so treat it as an entitlement, not a temporary flag. 2. **Use the repo's flag mechanism.** A flags-service SDK, a config-driven module, env vars, a settings table. Call `search_lore` for naming and where flags are declared. If there is none, propose the smallest one (a typed config module with defaults, see the `add-config-option` skill) via `request_decision` before building infrastructure. 3. **Name, type and default it.** A descriptive, namespaced name (`checkout.new-address-form`), boolean unless variants are required. Never reuse a retired flag's name: old