# add-feature-flag

add-feature-flag is a Claude Code skill that integrates feature flags into the Warp codebase. It isolates experimental code and manages rollouts across release channels.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 720 repo stars
- Author: dominikmartn
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dominikmartn/harp/tree/HEAD/.agents/skills/add-feature-flag/SKILL.md
- Updated: 2026-11-10
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/add-feature-flag

## What it does

This skill guides the agent through gating code changes inside the Warp terminal repository. It adds variants to the `FeatureFlag` enum in `warp_core/src/features.rs` and configures feature entries inside `app/Cargo.toml`. To test features early, developers register them inside the `DOGFOOD_FLAGS` array.

The `FeatureFlag` enum and runtime `is_enabled()` checks operate across both the desktop GUI and the headless TUI. Edits in `app/Cargo.toml` and `app/src/lib.rs` affect only the graphical client. If the terminal TUI requires a compile-time Cargo feature, it must be declared separately in `crates/warp_tui/Cargo.toml` and verified via `./script/run-tui`.

The skill prioritizes runtime toggles over conditional compilation attributes. This reduces recompilation cycles and simplifies cleanup after launch. When attaching keyboard shortcuts via `EditableBinding`, adding an active check ensures hidden actions stay out of user settings while deactivated.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dominikmartn/harp --skill add-feature-flag -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/add-feature-flag/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/add-feature-flag/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dominikmartn/harp --skill add-feature-flag -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/add-feature-flag/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dominikmartn/harp --skill add-feature-flag -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/add-feature-flag/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dominikmartn/harp .agents/skills/add-feature-flag
```

2. **Manually: put the files in place**
- File: `.github/skills/add-feature-flag/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dominikmartn/harp --skill add-feature-flag -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dominikmartn/harp --path .agents/skills/add-feature-flag
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/add-feature-flag/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dominikmartn/harp/tree/HEAD/.agents/skills/add-feature-flag/SKILL.md

## When to use it
- declare a new feature flag within `warp_core/src/features.rs`
- gate unfinished changes behind runtime status checks
- enable pre-release features in dogfood builds
- hide custom keybindings when a feature remains disabled

## Example prompts
- Add a feature flag for the new terminal block in the Warp repository
- Register my_experiment in DOGFOOD_FLAGS for internal testing
- Configure a keybinding check using the runtime feature flag status

## Similar
- [Feature Flag Rollout taste](https://affpapa.org/en/nevibecode/prompts/feature-flag-rollout-taste.md) — prompt · ★ 178201 repo stars
- [launchdarkly-flag-cleanup](https://affpapa.org/en/nevibecode/skills/launchdarkly-flag-cleanup.md) — skill · 4200 installs
- [launchdarkly-flag-create](https://affpapa.org/en/nevibecode/skills/launchdarkly-flag-create.md) — skill · 4200 installs
- [rust-best-practices](https://affpapa.org/en/nevibecode/skills/morganlinton-rust-best-practices.md) — skill · 1100 installs
- [rust-refactor](https://affpapa.org/en/nevibecode/skills/rust-refactor.md) — skill · 331 installs
- [review-crate](https://affpapa.org/en/nevibecode/skills/review-crate.md) — skill · 115 installs

From the same set: [dominikmartn/harp](https://affpapa.org/en/nevibecode/by/dominikmartn/harp.md) — 62 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
