基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/warpdotdev/warp --skill remove-feature-flag命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Repo-specific review guidance for warp. Only the categories declared overridable by the core review-pr skill may be specialized here.
Create and edit file-based Warp software factory definitions, in a repository tree rooted at a factory.yaml. Use when authoring or changing that factory.yaml, Agent, Automation, Scorer, or Runner files under that root, or its factory and agent skill trees, and when fixing Factory file diagnostics. Do not use for agent-definition Markdown that belongs to another tool, for a tree with no factory.yaml, or to operate a live factory or hand work to one through Factory MCP.
GUI desktop app only. How to build a Settings page in the Warp client (app/src/settings_view) so its widgets and settings search behave correctly — picking a PageType, deciding whether a heading belongs in the page-title slot or inside a widget, gating a widget, and scoping search_terms per widget. Use when adding or editing a settings page, a SettingsWidget, or anything that affects settings search.
| name | remove-feature-flag |
| description | Remove a feature flag after it has been rolled out and stabilized in the Warp codebase. |
Remove a feature flag after it has been rolled out and stabilized in the Warp codebase.
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.
Remove a feature flag when:
default features in app/Cargo.tomlRemove 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 = []
Remove the variant from the FeatureFlag enum in warp_core/src/features.rs:
#[derive(Sequence)]
pub enum FeatureFlag {
// Remove YourFeatureName,
}
Remove the conditional compilation directive:
// Remove these lines:
// #[cfg(feature = "your_feature_name")]
// YourFeatureName,
If the flag was listed in any of these arrays in features.rs, remove it:
pub const DOGFOOD_FLAGS: &[FeatureFlag] = &[
// Remove FeatureFlag::YourFeatureName,
];
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/warp_tui/ (and other non-app/ crates), not just app/ and warp_core/:
rg "YourFeatureName" app/ warp_core/ crates/warp_tui/
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")
Remove any code paths that were only executed when the feature was disabled (the else branches in feature checks). These are now dead code.
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
# 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/