Agent Skillswarpdotdev/warp › gui-ui-guidelines

gui-ui-guidelines

GitHub

提供Warp GUI桌面应用UI开发的指导原则,涵盖复用按钮主题、避免硬编码颜色及优先使用共享抽象等规范,旨在统一设计系统并减少代码审查中的重复错误。

.agents/skills/gui-ui-guidelines/SKILL.md warpdotdev/warp

Trigger Scenarios

进行GUI前端界面开发 实现或修改UI组件样式 遵循设计规范编写视图代码

Install

npx skills add warpdotdev/warp --skill gui-ui-guidelines -g -y
More Options

Non-standard path

npx skills add https://github.com/warpdotdev/warp/tree/master/.agents/skills/gui-ui-guidelines -g -y

Use without installing

npx skills use warpdotdev/warp@gui-ui-guidelines

指定 Agent (Claude Code)

npx skills add warpdotdev/warp --skill gui-ui-guidelines -a claude-code -g -y

安装 repo 全部 skill

npx skills add warpdotdev/warp --all -g -y

预览 repo 内 skill

npx skills add warpdotdev/warp --list

SKILL.md

Frontmatter
{
    "name": "gui-ui-guidelines",
    "description": "GUI desktop app only. Catalog of guidelines for writing UI code in the Warp client. Read whenever doing any UI work in this repo, up front before writing the change, so the relevant guidelines shape the implementation."
}

gui-ui-guidelines

Scope — GUI desktop app only. This skill applies to Warp's GUI desktop front-end (the app/ crate on the WarpUI pixel/GPU framework). It does not apply to the headless TUI front-end (crates/warp_tui; cell-grid TuiElement library under crates/warpui_core/src/elements/tui), which has its own components, tests, and change-verification workflow. For TUI work, see the tui-ui-guidelines, tui-testing, and tui-verify-change skills instead.

This skill is a growing catalog of guidelines for working on Warp's UI code. Each guideline captures a lesson that would otherwise be re-learned through review — typically because an agent or contributor reinvented a component, drifted from the design system, or bypassed a shared abstraction.

How to use this skill:

  • Read through the guidelines below once at the start of any UI task, then keep them in mind while implementing. The list is short enough to scan.
  • Each guideline is self-contained. Not every one will apply to every task — use judgment. But if a guideline does apply, follow it.
  • When in doubt, prefer reusing an existing abstraction over introducing a new one. The Warp UI has accumulated a well-factored set of shared components and themes; new one-offs almost always drift.

For work on the settings modal (app/src/settings_view/) — a settings page, a SettingsWidget, or anything that affects settings search — also read the gui-settings-ui skill, which covers the page-title, widget-gating, and widget-splitting rules specific to that surface.

New guidelines get added here over time. If you discover a recurring UI mistake that would have been caught by a written rule, add it.


Guideline: Reuse button themes

Button colors come from a shared set of ActionButtonTheme impls in app/src/view_components/action_button.rs (and the parallel Theme impls in crates/ui_components/src/button/themes.rs) — PrimaryTheme, SecondaryTheme, NakedTheme, DangerPrimaryTheme, etc. These encode the design system and keep button colors consistent across the app.

When styling a button, use one of the existing themes unchanged. The shared themes are well-established and vetted; if one looks "wrong" for your use case, the most likely explanation is that you're reaching for the wrong theme, not that the theme is buggy.

Do not modify a shared theme on your own initiative. Changing PrimaryTheme, SecondaryTheme, etc. affects every button in the app, and a tweak that fixes your screen can silently regress others. Only edit a shared theme when the user has explicitly confirmed that the design-system component itself needs to change.

Red flags that you're about to make buttons inconsistent:

  • Writing a new impl ActionButtonTheme for FooPrimaryTheme that delegates to PrimaryTheme and only tweaks one method (usually text_color). Almost always the right move is to use PrimaryTheme directly and accept the result.
  • Hard-coding ColorU::new(...) instead of using appearance.theme() accessors (accent, font_color(bg), foreground, etc.).
  • Setting should_opt_out_of_contrast_adjustment to true to force a specific label color.
  • Naming a theme after a feature or view (FooPrimaryTheme, BarSubmitTheme) rather than a design-system role.

If an existing theme genuinely doesn't fit and you think the shared theme should change, surface that to the user before editing it, rather than either editing it unilaterally or papering over it with a one-off.

Version History

  • 04a7f83 Current 2026-08-19 21:12

    新增gui-settings-ui技能以规范设置页面模式,并在本技能中增加交叉链接指引。

  • 726c1b6 2026-07-24 20:21

Same Skill Collection

.agents/skills/add-feature-flag/SKILL.md
.agents/skills/add-telemetry/SKILL.md
.agents/skills/changelog-draft/SKILL.md
.agents/skills/classify-changelog-pr/SKILL.md
.agents/skills/cross-platform-cloud-verification/SKILL.md
.agents/skills/dedupe-issue-local/SKILL.md
.agents/skills/gui-create-launch-modal/SKILL.md
.agents/skills/gui-integration-test/SKILL.md
.agents/skills/gui-reproduce-bug-report-local/SKILL.md
.agents/skills/gui-settings-ui/SKILL.md
.agents/skills/logging-and-error-reporting/SKILL.md
.agents/skills/promote-feature/SKILL.md
.agents/skills/remove-feature-flag/SKILL.md
.agents/skills/review-pr-local/SKILL.md
.agents/skills/rust-unit-tests/SKILL.md
.agents/skills/triage-issue-local/SKILL.md
.agents/skills/tui-testing/SKILL.md
.agents/skills/tui-ui-guidelines/SKILL.md
.agents/skills/tui-verify-change/SKILL.md
resources/bundled/mcp_skills/figma/figma-code-connect-components/SKILL.md
resources/bundled/mcp_skills/figma/figma-create-design-system-rules/SKILL.md
resources/bundled/mcp_skills/figma/figma-create-new-file/SKILL.md
resources/bundled/mcp_skills/figma/figma-generate-library/SKILL.md
resources/bundled/mcp_skills/figma/figma-implement-design/SKILL.md
resources/bundled/skills/add-mcp-server/SKILL.md
resources/bundled/skills/change-keybinding/SKILL.md
resources/bundled/skills/create-skill/SKILL.md
resources/bundled/skills/create-tab-config/SKILL.md
resources/bundled/skills/factory-files/SKILL.md
resources/bundled/skills/factory-mcp/SKILL.md
resources/bundled/skills/modify-settings/SKILL.md
resources/bundled/skills/oz-platform/SKILL.md
resources/bundled/skills/pr-comments/SKILL.md
resources/bundled/skills/tab-configs/SKILL.md
resources/bundled/skills/tui-migrate-setup/SKILL.md
resources/bundled/skills/update-tab-config/SKILL.md
resources/bundled/skills/warpctrl/SKILL.md
resources/channel-gated-skills/dogfood/test-warp-ui/SKILL.md
resources/channel-gated-skills/dogfood/triage-vulnerabilities/SKILL.md
resources/channel-gated-skills/dogfood/verify-ui-change-in-cloud/SKILL.md
.agents/skills/gui-onboarding-verification-skill/SKILL.md
.warp/skills/gui-integration-test-video/SKILL.md
resources/bundled/mcp_skills/figma/edit-figma-design/SKILL.md
resources/bundled/mcp_skills/figma/figma-generate-design/SKILL.md
resources/bundled/mcp_skills/figma/figma-use/SKILL.md
resources/bundled/skills/claude-api/SKILL.md

Metadata

Files
0
Version
04a7f83
Hash
5cd64fa7
Indexed
2026-07-24 20:21

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 14:52
浙ICP备14020137号-1 $방문자$