/feature-flags
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.
$ npx -y skills add marcus/sidecar --skill feature-flags --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/feature-flags
Context preview
The summary Claude sees to decide when to auto-load this skill.
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.
SKILL.md
feature-flags.SKILL.mdname: feature-flags
description: 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.
user-invocable: false
Feature Flags
Feature flags gate experimental functionality behind user-configurable settings, enabling safe rollout (default off), user opt-in, and easy rollback.
Checking Feature State
import "github.com/marcus/sidecar/internal/features"
if features.IsEnabled("tmux_interactive_input") {
// Feature-gated code
}Adding a New Feature Flag
1. Define the feature in `internal/features/features.go`:
var MyNewFeature = Feature{
Name: "my_new_feature",
Default: false,
Description: "Description of what this enables",
}2. Add to the `allFeatures` slice:
var allFeatures = []Feature{
TmuxInteractiveInput,
MyNewFeature, // Add here
}3. Use the feature check in your code:
if features.IsEnabled("my_new_feature") {
// New functionality
}User Configuration
Config file (`~/.config/sidecar/config.json`)
{
"features": {
"flags": {
"tmux_interactive_input": true
}
}
}CLI override (takes precedence over config)
sidecar --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.
Priority Order
Feature state resolves in this order (first match wins): 1. CLI override (`--enable-feature`, `--disable-feature`) 2. Config file (`features.flags` in config.json) 3. Default value (defined in code)
Available Features
| 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 |
API Reference
features.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
Best Practices
- Use `snake_case` for feature names (e.g., `my_new_feature`)
- New experimental features should default to `false`
- Provide clear descriptions for each feature
- Document features in `docs/guides/deprecated/feature-flags.md` when adding them
- Remove feature flags once features are stable
Read more
name: feature-flags description: 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. user-invocable: false
Feature Flags
Feature flags gate experimental functionality behind user-configurable settings, enabling safe rollout (default off), user opt-in, and easy rollback.
Checking Feature State
import "github.com/marcus/sidecar/internal/features"
if features.IsEnabled("tmux_interactive_input") {
// Feature-gated code
}Adding a New Feature Flag
1. Define the feature in `internal/features/features.go`:
var MyNewFeature = Feature{
Name: "my_new_feature",
Default: false,
Description: "Description of what this enables",
}2. Add to the `allFeatures` slice:
var allFeatures = []Feature{
TmuxInteractiveInput,
MyNewFeature, // Add here
}3. Use the feature check in your code:
if features.IsEnabled("my_new_feature") {
// New functionality
}User Configuration
Config file (`~/.config/sidecar/config.json`)
{
"features": {
"flags": {
"tmux_interactive_input": true
}
}
}CLI override (takes precedence over config)
sidecar --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.
Priority Order
Feature state resolves in this order (first match wins): 1. CLI override (`--enable-feature`, `--disable-feature`) 2. Config file (`features.flags` in config.json) 3. Default value (defined in code)
Available Features
| 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 |
API Reference
features.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
Best Practices
- Use `snake_case` for feature names (e.g., `my_new_feature`)
- New experimental features should default to `false`
- Provide clear descriptions for each feature
- Document features in `docs/guides/deprecated/feature-flags.md` when adding them
- Remove feature flags once features are stable
You might never open your editor again. Status: Ready for daily use. Please report any issues you encounter.
Other skills on sidecar.
- /create-adapter
Create conversation adapters for importing AI chat history from different tools (Claude Code, Cursor, Warp, Codex, etc.). Covers the adapter.Adapter interface, caching strategies, incremental parsing, watch/FD management, and performance standards. Use when creating a new
Open skill - /create-modal
Create declarative modals using the modal library API. Covers modal types (confirm, input, select, form), sections (Text, Buttons, Input, Textarea, Checkbox, List, When, Custom), rendering with OverlayModal, and keyboard/mouse handling. Use when adding modals or dialogs to the
Open skill - /create-plugin
Create new sidecar plugins implementing the plugin.Plugin interface, rendering views with Bubble Tea, handling keyboard input via keymap contexts, and integrating with the app shell (footer hints, event bus, adapters). Use when creating a new plugin, modifying plugin
Open skill - /create-prompt
Create prompts for sidecar workspaces. Covers prompt structure (name, ticketMode, body), template variables (ticket with fallbacks), config file locations (global vs project), and scope overrides. Use when creating or modifying prompts in sidecar config files.
Open skill - /create-theme
Create custom color themes for Sidecar, including base theme selection, color overrides, gradient borders, tab styles, per-project themes, community themes, and programmatic theme registration. Use when creating or modifying themes, adjusting UI appearance, or debugging
Open skill - /drag-pane
Drag-and-drop pane resizing implementation for two-pane plugin layouts. Covers mouse event handling via the internal/mouse package, hit region registration, drag delta calculation, width clamping, state persistence, and pane layout management. Use when working on pane resizing,
Open skill

