add-feature-flag

Implement compile-time and runtime feature flag gating in Warp's Rust codebase.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/lalaABC/waprcn --skill add-feature-flag-lalaabc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-feature-flag
Source: https://github.com/lalaABC/waprcn/tree/main/.agents/skills/add-feature-flag
Command: npx skills add https://github.com/lalaABC/waprcn --skill add-feature-flag-lalaabc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add-feature-flag introduces a formal mechanism to gate code changes in Warp, enabling safer deployments by turning features on or off without code changes.

Core Features & Use Cases

  • Compile-time feature flags in Cargo.toml under [features], excluding the default set to avoid unintentional activation.
  • Runtime gating via a FeatureFlag enum and conditional compilation attributes to ensure features are guarded at runtime and, optionally, in tests.
  • Rollout controls for development, dogfood, and stable channels, allowing staged releases and quick rollback if issues arise.

Quick Start

Add a new feature flag by updating Cargo.toml, extend the FeatureFlag enum, guard code with cfg and is_enabled checks, and optionally enable it for dev builds.

Frequently Asked Questions about add-feature-flag

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a feature flag in Rust to gate Warp codebase changes?

To add a feature flag in Rust, update Cargo.toml [features], extend the FeatureFlag enum, apply runtime gating with cfg attributes, and configure rollout controls for Dev, Dogfood, and Stable channels.

How does runtime feature gating work with Cargo compile-time flags?

Runtime feature gating uses a FeatureFlag enum alongside Cargo's compile-time cfg attributes to ensure code paths are guarded at runtime and in tests, preventing unintentional activation outside the default set.

Can I control feature flag rollouts across Dev, Dogfood, and Stable channels?

Yes, feature flag rollouts can be controlled across Dev, Dogfood, and Stable channels, allowing staged releases and quick rollback by toggling flags on or off without requiring code changes.

What is the best way to prevent unintentional activation of Cargo features?

The best way to prevent unintentional activation is to define compile-time features in Cargo.toml under [features] while explicitly excluding them from the default set, then guard code with runtime checks.

Does feature flag gating require default activation paths for dev builds?

Feature flag gating supports optional default activation paths for dev builds, allowing features to be automatically enabled during local development while remaining disabled in stable releases.