원클릭으로
add-feature-flag
Add a new feature flag to gate code changes in the Warp codebase.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add a new feature flag to gate code changes in the Warp codebase.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use this skill when helping users add MCP servers to their Warp configuration.
Create a pull request in the warp repository for the current branch. Use when the user mentions opening a PR, creating a pull request, submitting changes for review, or preparing code for merge.
Repo-specific dedupe guidance for warp-external. Only the categories declared overridable by the core dedupe-issue skill may be specialized here.
Implement an approved feature from PRODUCT.md and TECH.md, keeping specs and code aligned in the same PR as implementation evolves. Use after the product and tech specs are approved and the next step is building the feature.
Promote a feature-flagged feature to Dogfood, Preview, or Stable in the Warp codebase. Use when a feature behind a FeatureFlag is ready to roll out to a broader audience, including wiring up the compile-time/runtime bridge and deferring flag cleanup safely.
Remove a feature flag after it has been rolled out and stabilized in the Warp codebase.
| name | add-feature-flag |
| description | Add a new feature flag to gate code changes in the Warp codebase. |
Add a new feature flag to gate code changes in the Warp codebase.
Feature flags in Warp are compile-time flags that allow features to be selectively enabled for different channels (e.g.: Dev, Stable). They use a small runtime plumbing layer that checks if a flag is enabled.
Add the feature to app/Cargo.toml under the [features] section, but NOT under the default nested stanza:
[features]
your_feature_name = []
Add a new variant to the FeatureFlag enum in warp_core/src/features.rs:
#[derive(Sequence)]
pub enum FeatureFlag {
YourFeatureName,
}
Add the feature to app/src/lib.rs with a corresponding #[cfg(feature = "...")] attribute to ensure it's only included when enabled:
#[cfg(feature = "your_feature_name")]
YourFeatureName,
In your code, use the runtime check to conditionally execute feature-gated code:
if FeatureFlag::YourFeatureName.is_enabled() {
// feature-gated behavior
}
To enable the feature by default for Dev/dogfood builds, add it to the DOGFOOD_FLAGS array in features.rs:
pub const DOGFOOD_FLAGS: &[FeatureFlag] = &[
FeatureFlag::YourFeatureName,
];
To test locally with the feature enabled:
cargo run --features your_feature_name
# Multiple features:
cargo run --features your_feature_name,another_feature
If adding an EditableBinding or FixedBinding that's part of a gated feature, include an enabled predicate that checks the feature flag. This prevents the keybinding from appearing in keyboard settings when the feature is disabled.
Example:
EditableBinding::new(
"action:name",
"Action description",
YourAction::Variant
)
.with_enabled(|| FeatureFlag::YourFeatureName.is_enabled())
.with_key_binding("cmdorctrl-key")
When ready to enable the feature for all Warp Stable users, add it to the default array in app/Cargo.toml:
[features]
default = [
"your_feature_name",
# other default features...
]
FeatureFlag::YourFeatureName.is_enabled() instead of #[cfg(...)] when possible, so flags can be toggled without recompilation and are easier to clean up later#[cfg(...)] only when code cannot compile without the flag (e.g., platform-specific code or missing dependencies)