Agent Skillszerx-lab/zap › warp-ui-guidelines

warp-ui-guidelines

GitHub

提供Warp客户端UI代码编写的规范指南,旨在统一设计系统、复用共享组件与主题,避免重复造轮子或偏离设计规范。

.agents/skills/warp-ui-guidelines/SKILL.md zerx-lab/zap

Trigger Scenarios

进行Warp客户端UI开发 实现新的界面组件 修改现有按钮样式

Install

npx skills add zerx-lab/zap --skill warp-ui-guidelines -g -y
More Options

Non-standard path

npx skills add https://github.com/zerx-lab/zap/tree/main/.agents/skills/warp-ui-guidelines -g -y

Use without installing

npx skills use zerx-lab/zap@warp-ui-guidelines

指定 Agent (Claude Code)

npx skills add zerx-lab/zap --skill warp-ui-guidelines -a claude-code -g -y

安装 repo 全部 skill

npx skills add zerx-lab/zap --all -g -y

预览 repo 内 skill

npx skills add zerx-lab/zap --list

SKILL.md

Frontmatter
{
    "name": "warp-ui-guidelines",
    "description": "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."
}

warp-ui-guidelines

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.

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

  • 5d87445 Current 2026-07-24 17:35

Same Skill Collection

.agents/skills/add-feature-flag/SKILL.md
.agents/skills/add-telemetry/SKILL.md
.agents/skills/dedupe-issue-local/SKILL.md
.agents/skills/diagnose-ci-failures/SKILL.md
.agents/skills/fix-errors/SKILL.md
.agents/skills/implement-specs/SKILL.md
.agents/skills/promote-feature/SKILL.md
.agents/skills/remove-feature-flag/SKILL.md
.agents/skills/resolve-merge-conflicts/SKILL.md
.agents/skills/review-pr-local/SKILL.md
.agents/skills/review-pr/SKILL.md
.agents/skills/rust-unit-tests/SKILL.md
.agents/skills/spec-driven-implementation/SKILL.md
.agents/skills/triage-issue-local/SKILL.md
.agents/skills/update-skill/SKILL.md
.agents/skills/warp-integration-test/SKILL.md
.agents/skills/write-product-spec/SKILL.md
.agents/skills/write-tech-spec/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/create-skill/SKILL.md
resources/bundled/skills/create-tab-config/SKILL.md
resources/bundled/skills/feedback/SKILL.md
resources/bundled/skills/modify-settings/SKILL.md
resources/bundled/skills/pr-comments/SKILL.md
resources/bundled/skills/tab-configs/SKILL.md
resources/bundled/skills/update-tab-config/SKILL.md
resources/channel-gated-skills/dogfood/triage-vulnerabilities/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
5d87445
Hash
7ad1e115
Indexed
2026-07-24 17:35

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 20:11
浙ICP备14020137号-1 $mapa de visitantes$