---
name: Feature Flags
slug: feature-flags
category: DevOps
description: Feature Flags gates experimental functionality in Sidecar with user-configurable settings. Use it to register flags, check them in code, and manage config or CLI overrides with clear priority rules.
github: "https://github.com/marcus/sidecar/tree/main/.claude/skills/feature-flags"
language: Go
stars: 1049
forks: 79
install: "npx degit https://github.com/marcus/sidecar/tree/main/.claude/skills/feature-flags ~/.claude/skills/feature-flags"
installs_to: ~/.claude/skills/feature-flags
source_path: .claude/skills/feature-flags/SKILL.md
collection_size: 16
category_size: 798
collection_url: "https://dirskills.com/collections/marcus/sidecar"
added: 2026-08-21T05:13:52.226Z
last_synced: 2026-08-21T05:13:52.226Z
canonical_url: "https://dirskills.com/skills/feature-flags"
---

# Feature Flags

Feature Flags gates experimental functionality in Sidecar with user-configurable settings. Use it to register flags, check them in code, and manage config or CLI overrides with clear priority rules.

**Install:**

```bash
npx degit https://github.com/marcus/sidecar/tree/main/.claude/skills/feature-flags ~/.claude/skills/feature-flags
```

## README

# 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

```go
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`:

```go
var MyNewFeature = Feature{
    Name:        "my_new_feature",
    Default:     false,
    Description: "Description of what this enables",
}
```

2. Add to the `allFeatures` slice:

```go
var allFeatures = []Feature{
    TmuxInteractiveInput,
    MyNewFeature, // Add here
}
```

3. Use the feature check in your code:

```go
if features.IsEnabled("my_new_feature") {
    // New functionality
}
```

## User Configuration

### Config file (`~/.config/sidecar/config.json`)

```json
{
  "features": {
    "flags": {
      "tmux_interactive_input": true
    }
  }
}
```

### CLI override (takes precedence over config)

```bash
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_full_attach` | false | Suspend Sidecar and `tmux attach-session` |
| `tmux_inline_edit` | true | Inline file editing via tmux in files plugin |
| `notes_plugin` | true | Project Notes while the td panel is enabled |
| `tasks_plugin` | false | Embedded Tasks plugin tab |
| `conversations_plugin` | false | Conversations multi-agent history tab (off = no adapters / session I/O) |
| `workspace_terminal_panel` | false | Workspace Ctrl+T / Alt+T split terminal panel |

## API Reference

```go
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
