Feature Flags logo

Feature Flags

CommunityPopular
marcus
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.

Overview

Publishermarcus
Repositorysidecar
Skill namefeature-flags
Stars
1.1K
Forks
82
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by marcus on GitHub. Read the source before you install it.

Installation

Install the Feature Flags AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/marcus/sidecar/tree/main/.claude/skills/feature-flags
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/marcus/sidecar.git /tmp/sidecar
mkdir -p .claude/skills
cp -r /tmp/sidecar/.claude/skills/feature-flags .claude/skills/feature-flags
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Feature Flags in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Feature Flags on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Feature Flags is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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",
}
  1. Add to the allFeatures slice:
go
var allFeatures = []Feature{
    TmuxInteractiveInput,
    MyNewFeature, // Add here
}
  1. Use the feature check in your code:
go
if features.IsEnabled("my_new_feature") {
    // New functionality
}

That is all a flag needs to be reachable. Configuration → System → Feature Flags derives its list from features.ListAll(), so registering a feature puts a working switch on the page with the registry's own Name as the label and Description as the help text. There is no second list to remember.

Giving a flag better copy (optional)

previewCopy in internal/configui/page_flags.go overrides the registry's wording per flag. Only fill in what you want to change:

go
features.MyNewFeature.Name: {
    label:   "Human-readable name",
    help:    "One sentence on what turning this on does.",
    restart: true, // only if a consumer reads it once at startup
    note:    "An honest scope line for a flag that applies live but not retroactively.",
},

restart must be checked against what actually consumes the flag, never added as blanket caution — a flag read at the point of use applies immediately and must not claim otherwise. Both restart and note render when both are set.

A flag that another page already owns as a first-class setting sets owner and ownerControl instead. It is then listed read-only with a jump to the control that owns it, because two switches over one value is how surfaces start disagreeing. If the owning page's control means more than the raw flag — Panels' Conversations switch is the flag and the plugin's own enabled key — also set reads so the row reports the owner's answer rather than the flag's.

Keep the page shorter than a small terminal. The Configuration detail pane truncates rather than scrolling, and the row cursor still walks onto rows that were cut. Rows are one line each with the explanation shown only under the focused row for that reason; TestFlagsPageFitsAnOrdinaryTerminal guards it.

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

FeatureDefaultDescription
tmux_interactive_inputtrueWrite support for tmux panes
tmux_full_attachfalseSuspend Sidecar and tmux attach-session
tmux_inline_edittrueInline file editing via tmux in files plugin
notes_plugintrueProject Notes while the td panel is enabled
tasks_pluginfalseEmbedded Tasks plugin tab
conversations_pluginfalseConversations multi-agent history tab (off = no adapters / session I/O)
workspace_terminal_paneltrueWorkspace 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

Frequently asked questions

What does the Feature Flags AI skill do?

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.

Why use Feature Flags on TypingMind?

Because you install it once and use it with any model. Feature Flags is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Feature Flags in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/marcus/sidecar/tree/main/.claude/skills/feature-flags. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Feature Flags?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Feature Flags?

As many as you like. As long as a model supports skills, you can use Feature Flags with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Feature Flags AI skill free?

Yes. It is published on GitHub by marcus under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇