warpdotdev/warp · Archived

remove-feature-flag

Remove a feature flag after it has been rolled out and stabilized in the Warp codebase.

First seen May 11, 2026

Installation

$ npx skills add warpdotdev/warp --skill remove-feature-flag

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from warpdotdev/warp · top by installs.

npx skills add warpdotdev/warp

Browse all from warpdotdev/warp

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 64.9K
License LICENSE-AGPL
Default branch master
Open issues 3,847
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,046 B
  • docs SUMMARY.md 114 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 8 installs

SKILL.md

remove-feature-flag

Remove a feature flag after it has been rolled out and stabilized in the Warp codebase.

Overview

After a feature flag has been enabled for all users and has stabilized in production, the flag should be removed to reduce technical debt and simplify the codebase. This involves removing the flag definition and all conditional checks.

When to Remove

Remove a feature flag when:

  • The feature has been enabled in default features in app/Cargo.toml
  • The feature has been stable in production for a reasonable period
  • There are no plans to disable the feature or provide configuration options
  • The team agrees the feature is permanent

Steps

1. Remove from app/Cargo.toml

Remove the feature from both the [features] section and the default array:

[features]
default = [
    # Remove "your_feature_name" from here
]

# Remove this line:
# your_feature_name = []

2. Remove from FeatureFlag enum

Remove the variant from the FeatureFlag enum in warp_core/src/features.rs:

#[derive(Sequence)]
pub enum FeatureFlag {
    // Remove YourFeatureName,
}

3. Remove from app/src/lib.rs

Remove the conditional compilation directive:

// Remove these lines:
// #[cfg(feature = "your_feature_name")]
// YourFeatureName,

4. Remove from DOGFOODFLAGS/PREVIEWFLAGS/RELEASE_FLAGS

If the flag was listed in any of these arrays in features.rs, remove it:

pub const DOGFOOD_FLAGS: &[FeatureFlag] = &[
    // Remove FeatureFlag::YourFeatureName,
];

5. Remove all runtime checks and dead code

Find and remove all FeatureFlag::YourFeatureName.is_enabled() checks throughout the codebase:

Before:

if FeatureFlag::YourFeatureName.is_enabled() {
    // new behavior
} else {
    // old behavior (dead code)
}

After:

// new behavior (unconditionally enabled)

Use ripgrep to find all occurrences. The shared FeatureFlag may be used from the headless TUI, so search crates/warptui/ (and other non-app/ crates), not just app/ and warpcore/:

rg "YourFeatureName" app/ warp_core/ crates/warp_tui/

6. Remove keybinding predicates

If the feature flag was used in keybinding enabled predicates, remove the predicate:

Before:

EditableBinding::new(
    "action:name",
    "Action description",
    YourAction::Variant
)
.with_enabled(|| FeatureFlag::YourFeatureName.is_enabled())
.with_key_binding("cmdorctrl-key")

After:

EditableBinding::new(
    "action:name",
    "Action description",
    YourAction::Variant
)
.with_key_binding("cmdorctrl-key")

7. Clean up dead code branches

Remove any code paths that were only executed when the feature was disabled (the else branches in feature checks). These are now dead code.

8. Run tests and validation

After removing the flag:

# Format and lint
./script/format
cargo clippy --workspace --all-targets --all-features --tests -- -D warnings

# Run tests
cargo nextest run --no-fail-fast --workspace --exclude command-signatures-v2

# Build the GUI app
cargo run

# Also validate the headless TUI if the flag was used there
./script/run-tui

Best Practices

  • Remove feature flags promptly after they're no longer needed to reduce technical debt
  • When removing a flag, remove ALL related code (checks, dead branches, keybinding predicates)
  • Use grep/ripgrep to ensure you've found all occurrences
  • Test thoroughly after removal to ensure no regressions
  • Consider doing flag removal in a separate PR for easier review

Example Search Commands

# Find all occurrences of the flag name (include the TUI and other non-app crates)
rg "YourFeatureName" app/ warp_core/ crates/warp_tui/

# Find feature flag checks
rg "FeatureFlag::YourFeatureName" app/ crates/warp_tui/

# Find cfg attributes
rg 'cfg\(feature = "your_feature_name"\)' app/