Agent skill

Feature Flags

by marcus in marcus/sidecar

Creating and using feature flags in sidecar for gating experimental functionality.

MITAuto-check passed

Install Feature Flags

skills CLI
$ npx skills add marcus/sidecar --skill feature-flags -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install marcus/sidecar feature-flags --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/marcus/sidecar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/feature-flags .claude/skills/feature-flags && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
feature-flags
GitHub stars
1.1k
Token cost
~1.3k tokens
SKILL.md length
440 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Creating and using feature flags in sidecar for gating experimental functionality.

  • Works in 3 steps: Define the feature in… → Add to the allFeatures slice → Use the feature check in your code
  • Adding feature flags
  • SKILL.md covers Checking Feature State, Adding a New Feature Flag, Giving a flag better copy… and User Configuration, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Feature Flags is an agent skill from marcus/sidecar. 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.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Use sidecar next to CLI agents for diffs, file trees, conversation history, and task management with td. The licence is MIT.

When your agent uses it

  • Adding feature flags
  • Toggling features
  • Gating new functionality behind flags

Example prompts

  • “/feature-flags”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Define the feature in internal/features/features.go
  2. Add to the allFeatures slice
  3. Use the feature check in your code

What it can do on your machine

Read from SKILL.md and the folder at commit 2a2978a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are go, json and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Feature Flags loads about 1.3k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 440 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from marcus/sidecar at commit 2a2978a, republished under its MIT licence (© marcus). 440 words, ~1,275 tokens.

Download SKILL.mdSave it as .claude/skills/feature-flags/SKILL.md (or your agent's skills folder).
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

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.

Show full SKILL.md (155 more words)Show less

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

© marcus, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/feature-flags of marcus/sidecar.

Open the folder on GitHubat commit 2a2978a

Compare with similar skills

Feature Flags next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Feature Flags compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Feature Flags this skillmarcus/sidecar1.1k—~1.3kAutomated safety check: PassMIT
Flagsvercel/next.js143k—~746Automated safety check: PassMIT
Gate Testsvercel/next.js143k—~2.7kAutomated safety check: PassMIT
Feature Flagsgetsentry/sentry46k—~374Automated safety check: PassCustom licence
Gateplugin87/ux-ui-agent-skills1.6k—~532Automated safety check: PassMIT
Setting Feature Flags In StorybookPostHog/posthog40k—~1.1kAutomated safety check: PassCustom licence

Similar skills

  • Flags

    vercel/next.js

    Official

    How to add or modify Next.js experimental feature flags end-to-end.

    143k GitHub stars~746 tokensUpdated today
    DevelopmentAuto-check passed
  • Gate Tests

    vercel/next.js

    Official

    How to use the @gate / @force-gate test directives instead of it.skip or fake-green skip patterns.

    143k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Feature Flags

    getsentry/sentry

    Official

    Gate a Sentry feature behind a FlagPole feature flag. An agent skill from getsentry/sentry.

    46k GitHub stars~374 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Gate

    plugin87/ux-ui-agent-skills

    Run the one-command quality gate and report the real N/N result.

    1.6k GitHub stars~532 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Official

    A skill your agent uses when writing a Storybook story for a component gated on a feature flag — boolean flags or multivariate/experiment-arm variants.

    40k GitHub stars~1.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Brain Ingest Gate

    garrytan/gbrain

    Pre-write quality gate for content entering the brain. An agent skill from garrytan/gbrain.

    31k GitHub stars~3.9k tokensUpdated today
    Testing & QAAuto-check passed

More from marcus/sidecar

All 19 skills in this repo
  • Create Adapter

    marcus/sidecar

    Create conversation adapters for importing AI chat history from different tools (Claude Code, Cursor, Warp, Codex, etc.).

    1.1k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Create Modal

    marcus/sidecar

    Create declarative modals using the modal library API. An agent skill from marcus/sidecar.

    1.1k GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Create Plugin

    marcus/sidecar

    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…

    1.1k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Project Switching

    marcus/sidecar

    Project switching implementation in sidecar: project discovery, state management, UI flow, modal rendering, filtering, theme preview, and plugin reinitialization.

    1.1k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Shell Integration

    marcus/sidecar

    Interactive shell/TTY integration with tmux session management, shell command execution, control-mode output capture with polling fallback, native cursor rendering, lazy scrollback, selection, paste…

    1.1k GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Sidecar Website

    marcus/sidecar

    Writing and maintaining the Sidecar Docusaurus documentation site, including page structure, doc authoring, blog posts, styling, images, and deployment workflow.

    1.1k GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Questions about Feature Flags

What does Feature Flags do?

Creating and using feature flags in sidecar for gating experimental functionality. Feature Flags is an agent skill from marcus/sidecar. Creating and using feature flags in sidecar for gating experimental functionality.

When should I use Feature Flags?

Feature Flags fits situations like: adding feature flags; toggling features; gating new functionality behind flags.

How do I install Feature Flags in Claude Code?

Run `npx skills add marcus/sidecar --skill feature-flags -a claude-code`. Or copy the skill folder (.claude/skills/feature-flags in marcus/sidecar) into .claude/skills/feature-flags in your project. Claude Code loads it when a task matches its description.

How do I install Feature Flags in Codex?

Run `npx skills add marcus/sidecar --skill feature-flags -a codex`. Or copy the skill folder (.claude/skills/feature-flags in marcus/sidecar) into .agents/skills/feature-flags in your project. Codex loads it when a task matches its description.

Can I use Feature Flags in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add marcus/sidecar --skill feature-flags -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/feature-flags, .gemini/skills/feature-flags, .github/skills/feature-flags and .opencode/skills/feature-flags in your project.

What does Feature Flags need to run?

SKILL.md names no scripts, command-line tools or credentials: Feature Flags is instructions for the agent only.

Does Feature Flags access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Feature Flags safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Feature Flags use?

Feature Flags is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Feature Flags use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Feature Flags?

Skills that share tags, products or a category with Feature Flags: Flags (vercel/next.js, 143k stars), Gate Tests (vercel/next.js, 143k stars), Feature Flags (getsentry/sentry, 46k stars) and Gate (plugin87/ux-ui-agent-skills, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Feature Flags?

marcus (a GitHub user) maintains it in marcus/sidecar, which has 1,086 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.

Source: marcus/sidecar on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.