Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Creating and using feature flags in sidecar for gating experimental functionality. Covers flag registration, checking flags in code, config file and CLI overrides, and priority resolution. Use when adding feature flags, toggling features, or gating new functionality behind flags.
.claude/skills/marcus-feature-flags/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -36% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -31% | 0% |
Feature flags gate experimental functionality behind user-configurable settings, enabling safe rollout (default off), user opt-in, and easy rollback.
goimport "github.com/marcus/sidecar/internal/features" if features.IsEnabled("tmux_interactive_input") { // Feature-gated code }
internal/features/features.go:govar MyNewFeature = Feature{ Name: "my_new_feature", Default: false, Description: "Description of what this enables", }
allFeatures slice:govar allFeatures = []Feature{ TmuxInteractiveInput, MyNewFeature, // Add here }
goif features.IsEnabled("my_new_feature") { // New functionality }
~/.config/sidecar/config.json)json{ "features": { "flags": { "tmux_interactive_input": true } } }
bashsidecar --enable-feature=tmux_interactive_input sidecar --disable-feature=tmux_interactive_input sidecar --enable-feature=feature1,feature2 # Multiple features
Unknown feature names in CLI flags produce a warning but do not prevent startup.
Feature state resolves in this order (first match wins):
--enable-feature, --disable-feature)features.flags in config.json)| Feature | Default | Description | |---------|---------|-------------| | tmux_interactive_input | true | Write support for tmux panes | | tmux_inline_edit | true | Inline file editing via tmux in files plugin | | notes_plugin | false | Notes plugin for capturing quick notes |
gofeatures.IsEnabled(name string) bool // Check if enabled features.List() map[string]bool // All features with current state features.ListAll() []Feature // All features with metadata features.SetEnabled(name string, enabled bool) error // Persist to config features.SetOverride(name string, enabled bool) // Runtime override (not persisted) features.IsKnownFeature(name string) bool // Check if registered
snake_case for feature names (e.g., my_new_feature)falsedocs/guides/deprecated/feature-flags.md when adding themOther measured skills in the registry, with their headline benchmark lift.