feature-flags

Generate typed feature flag infrastructure for Swift and SwiftUI apps.

27|5|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/bocan/bocan-music --skill feature-flags-bocan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feature-flags
Source: https://github.com/bocan/bocan-music/tree/main/.claude/skills/generators/feature-flags
Command: npx skills add https://github.com/bocan/bocan-music --skill feature-flags-bocan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually implementing feature flag systems for native iOS and macOS apps leads to inconsistent code, lack of remote control, and no easy way to test feature branches during development, wasting developer time and increasing rollout risk.

Core Features & Use Cases

  • Typed flag definitions: Centralized enum for all feature flags with compile-time defaults to eliminate runtime errors from missing or misspelled flag keys.
  • Flexible provider architecture: Supports local-only, remote-only, or composite (local + remote) flag sources for use cases like kill switches, A/B testing, and gradual rollouts.
  • SwiftUI native integration: Built-in @Observable manager with environment injection for reactive flag access, plus a debug-only toggle menu to test feature branches without recompiling. Use case: For a macOS music app, use this skill to add a feature flag for a new DSP chain, roll it out to 10% of users via remote config, and toggle it on/off in debug builds to test edge cases.

Quick Start

Use the feature-flags skill to generate a composite feature flag system with a debug menu for your macOS app's new gapless playback feature.

Frequently Asked Questions about feature-flags

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add feature flags to a SwiftUI app for gradual rollouts?

You can implement feature flags in SwiftUI using typed enum definitions and an @Observable manager with environment injection. This setup supports gradual rollouts through protocol-based local, remote, or composite providers.

How does remote config work for A/B testing in native iOS applications?

Remote config for A/B testing in native iOS applications works through a flexible provider architecture that fetches flags remotely. This allows you to control features, execute kill switches, and run A/B tests without shipping new app updates.

Can I use a debug menu to toggle feature flags in iOS without recompiling?

Yes, you can use a debug-only toggle menu to test feature branches in iOS without recompiling. The feature flag infrastructure includes a built-in debug menu that allows developers to locally toggle flags during development.

What is the best way to manage kill switches in macOS apps built with Swift?

The best way to manage kill switches in macOS apps built with Swift is to define them in a centralized typed enum and route them through a composite provider. This ensures remote control and compile-time defaults to eliminate runtime errors.

Does this feature flag system support both local and remote flag sources simultaneously?

Yes, the feature flag system supports both local and remote flag sources simultaneously through a composite provider architecture. This allows you to combine local defaults with remote configurations for A/B testing and gradual rollouts.

Why do I need typed feature flag definitions instead of string keys in Swift?

You need typed feature flag definitions in Swift to eliminate runtime errors caused by missing or misspelled flag keys. Using a centralized enum provides compile-time defaults and ensures type safety across your iOS and macOS applications.