Comprehensive UI design skill covering fundamentals, patterns, and anti-patterns. Layout, typography, color, spacing, accessibility, motion, and component design. Use when building any web interface, reviewing design quality, or creating distinctive UIs.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install ui-design或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install ui-design⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/ui-design/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: ui-design model: standard version: 1.0.0 description: > Comprehensive UI design skill covering fundamentals, patterns, and anti-patterns. Layout, typography, color, spacing, accessibility, motion, and component design. Use when building any web interface, reviewing design quality, or creating distinctive UIs. tags: [ui, design, frontend, accessibility, typography, color, layout, motion] ---
The definitive guide for building production-grade web interfaces. Covers the full stack of design decisions from layout to motion.
ui design, web design, layout, typography, color palette, spacing, visual hierarchy, responsive design, accessibility, motion design, component design, design tokens, frontend, css, tailwind
---
| Factor | Impact | Time Investment | |--------|--------|-----------------| | Typography | 40% | Choose 1-2 fonts well | | Spacing | 25% | Use consistent scale | | Color | 20% | Limit palette, ensure contrast | | Everything else | 15% | Shadows, borders, motion |
Focus on typography and spacing first. They're 65% of perceived quality.
Mediocrity is forgettable. Pick an extreme:
| Direction | Characteristics | Use When | |-----------|-----------------|----------| | Brutally Minimal | Stark, essential, nothing extra | Developer tools, productivity | | Luxury/Refined | Premium, subtle elegance | High-end products, fashion | | Playful | Fun, bright, approachable | Consumer apps, games | | Editorial | Type-forward, grid-based | Content sites, magazines | | Industrial | Function-forward, robust | B2B, enterprise |
---
| Layout Need | Tool | Why | |-------------|------|-----| | Page-level structure | CSS Grid (grid-template-areas) | Named regions, explicit control | | Navigation bars | Flexbox | Single-axis, gap spacing | | Card grids | Grid (auto-fill/auto-fit) | Responsive without media queries | | Centering | Grid (place-items: center) | Shortest, most reliable | | Sidebar + content | Grid (250px 1fr) | Fixed + fluid | | Stacking/overlaps | Grid + grid-area: 1/1 | No position: absolute needed |
/* Standard content width */
.container {
width: 100%;
max-width: 1280px;
margin-inline: auto;
padding-inline: clamp(1rem, 5vw, 3rem);
}
/* Full-bleed with contained content */
.full-bleed {
width: 100vw;
margin-left: calc(50% - 50vw);
}
| Mistake | Problem | Fix | |---------|---------|-----| | Mixing container widths | Inconsistent alignment | Use single max-w-* value | | Content behind fixed navbar | Hidden content | Add pt-[navbar-height] | | No mobile padding | Edge-to-edge text | Add px-4 minimum | | Centered everything | Weak hierarchy | Left-align body text |
---
Typography carries 90% of a design's personality.
| Context | Display Font | Body Font | Example | |---------|--------------|-----------|---------| | Editorial | High-contrast serif | Neutral humanist | Playfair + Source Sans | | SaaS | Geometric sans | Matching sans | DM Sans + DM Mono | | Luxury | Thin modern serif | Elegant sans | Cormorant + Jost | | Developer | Monospace display | Monospace body | JetBrains Mono + IBM Plex | | Playful | Rounded/quirky | Clean readable | Nunito + Outfit |
--text-xs: 0.64rem; /* 10px - captions */
--text-sm: 0.8rem; /* 13px - secondary */
--text-base: 1rem; /* 16px - body */
--text-lg: 1.25rem; /* 20px - lead */
--text-xl: 1.563rem; /* 25px - h4 */
--text-2xl: 1.953rem; /* 31px - h3 */
--text-3xl: 2.441rem; /* 39px - h2 */
--text-4xl: 3.052rem; /* 49px - h1 */
| Rule | Value | Why | |------|-------|-----| | Minimum body size | 16px | Below is hard to read | | Body line-height | 1.5-1.75 | Improves readability | | Heading line-height | 1.1-1.2 | Tighter for large text | | Line length | 60-75 characters | Optimal reading | | Paragraph spacing | 1.5em | Clear separation |
| Mistake | Problem | Fix | |---------|---------|-----| | System fonts only | Generic look | Use Google Fonts or variable fonts | | Too many fonts | Visual chaos | Max 2 families | | Weak weight contrast | Poor hierarchy | Bold headings (600+), regular body | | Long lines | Hard to read | Add max-w-prose (65ch) |
---
Every palette needs five functional roles:
| Role | Purpose | Usage | |------|---------|-------| | Primary | Brand identity | Buttons, links, active states | | Neutral | Text, backgrounds | Body text, cards, dividers | | Accent | Secondary actions | Tags, badges, highlights | | Semantic | Feedback | Success/warning/error states | | Surface | Layered backgrounds | Cards, modals, overlays |
Create depth through lightness, not shadows:
:root {
--surface-0: hsl(220 15% 8%); /* page background */
--surface-1: hsl(220 15% 12%); /* card */
--surface-2: hsl(220 15% 16%); /* raised element */
--surface-3: hsl(220 15% 20%); /* popover/modal */
}
| Text Size | Minimum Ratio | Enhanced (AAA) | |-----------|---------------|----------------| | Normal text (<18px) | 4.5:1 | 7:1 | | Large text (≥18px bold, ≥24px) | 3:1 | 4.5:1 | | UI components | 3:1 | — |
| Mistake | Problem | Fix | |---------|---------|-----| | Purple gradient on white | "AI aesthetic" cliché | Use intentional brand colors | | Low contrast text | Accessibility fail | Test with contrast checker | | Color-only indicators | Colorblind users excluded | Add icons/text | | Too many colors | Visual noise | 3-5 colors maximum | | Light gray text on white | Unreadable | slate-600 minimum |
---
--space-1: 0.25rem; /* 4px - tight gaps */
--space-2: 0.5rem; /* 8px - input padding */
--space-3: 0.75rem; /* 12px - button padding */
--space-4: 1rem; /* 16px - default spacing */
--space-6: 1.5rem; /* 24px - section padding */
--space-8: 2rem; /* 32px - section gaps */
--space-12: 3rem; /* 48px - major breaks */
--space-16: 4rem; /* 64px - page rhythm */
| Rule | Implementation | |------|----------------| | Use gap not margins | display: flex; gap: var(--space-4) | | Consistent padding | Same values on all cards/sections | | More space between groups | Less space within groups (Gestalt) | | No arbitrary values | Only use scale tokens |
| Mistake | Problem | Fix | |---------|---------|-----| | Arbitrary pixel values | Inconsistent rhythm | Use spacing scale only | | Margin on children | Margin collapse bugs | Use gap on parent | | Equal spacing everywhere | No visual grouping | More between, less within | | Tight mobile padding | Cramped feeling | Minimum p-4 on mobile |
---
Guide the eye through deliberate contrast.
| Technique | How | Impact | |-----------|-----|--------| | Size | Hero 3-4x body | Immediate focal point | | Weight | Bold headings, regular body | Scannability | | Color | Primary vs muted | Information layers | | Space | Isolation creates emphasis | Draws attention | | Position | Top-left anchors reading | Natural flow |
Eyebrow ← xs, uppercase, muted color
Title ← xl, semibold, primary color
Body ← base, secondary color, 1.6 line-height
Action ← spaced apart, mt-4 minimum
---
...
安装 UI Design 后,可以对 AI 说这些话来触发它
Help me get started with UI Design
Explains what UI Design does, walks through the setup, and runs a quick demo based on your current project
Use UI Design to comprehensive UI design skill covering fundamentals, patterns, and ...
Invokes UI Design with the right parameters and returns the result directly in the conversation
What can I do with UI Design in my design & creative workflow?
Lists the top use cases for UI Design, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/ui-design/ 目录(个人级,所有项目可用),或 .claude/skills/ui-design/(项目级)。重启 AI 客户端后,用 /ui-design 主动调用,或让 AI 根据上下文自动发现并使用。
UI Design 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
UI Design 可免费安装使用。请查阅仓库了解许可证信息。
Comprehensive UI design skill covering fundamentals, patterns, and anti-patterns. Layout, typography, color, spacing, accessibility, motion, and component design. Use when building any web interface, reviewing design quality, or creating distinctive UIs.
UI Design 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using UI Design
Identifies repetitive steps in your workflow and sets up UI Design to handle them automatically