AgentSkillsCN

web-design-mastery

基于Refactoring UI原则,打造符合生产标准的Web应用UI设计。每当您需要:着陆页、仪表盘、认证页面、英雄区、卡片设计、按钮设计、表单输入、导航、布局、间距决策、字体层级、色彩选择、阴影效果、深度感、空状态、背景装饰时,务必激活此技能。它提供设计工作流程、视觉层次、间距系统(4px网格)、字体比例、HSL色彩系统、阴影高度、细节修饰等设计要素。土耳其语:页面设计、UI/UX、前端设计、Web设计、精美界面、现代设计、卡片设计、按钮风格、表单设计、色彩搭配、字体排版。英语:精美界面、流畅设计、高端质感、视觉层次、留白空间、色彩搭配、字体比例。

SKILL.md
--- frontmatter
name: web-design-mastery
description: "Production-grade web application UI design based on Refactoring UI principles. ALWAYS activate for: landing page, dashboard, auth screens, hero sections, card design, button design, form inputs, navigation, layouts, spacing decisions, typography hierarchy, color selection, shadows, depth, empty states, background decoration. Provides design workflow, visual hierarchy, spacing systems (4px grid), type scale, HSL color systems, shadow elevation, finishing touches. Turkish: sayfa tasarımı, UI/UX, frontend tasarım, web tasarım, güzel arayüz, modern tasarım, card tasarımı, buton stili, form tasarımı, renk paleti, tipografi. English: beautiful interface, sleek design, premium feel, visual hierarchy, whitespace, color palette, typography scale."

Web Design Mastery

Production-grade UI design principles from Refactoring UI by Adam Wathan & Steve Schoger.


Core Design Workflow

1. Start with a Feature, Not a Layout

  • Design the actual piece of functionality first
  • Don't start with navigation, sidebar, or shell
  • Details come later—work in grayscale first
  • Don't design too much—work in cycles

2. Establish Systems Before Designing

Define these systems up front to eliminate decision fatigue:

Spacing Scale (px):

TokenSizeUse Case
14Micro gaps
28Tight, within components
312Related elements
416Section padding
624Between sections
832Major separation
1248Large gaps
1664Hero spacing
2496Maximum separation

Type Scale (px):

SizeUse Case
12Labels, meta, fine print
14Body text, default
16Emphasis, subheadings
18Section headings
20Card titles
24Page section titles
30Page headings
36Hero subheading
48Hero heading
60-72Display text

Shadow Scale (5 levels):

LevelUse Case
1Buttons, subtle lift
2Cards, inputs
3Dropdowns, popovers
4Sticky elements
5Modals, dialogs

3. Build Hierarchy, Not Decoration

  • Primary: Dark color (headlines, key actions)
  • Secondary: Grey (supporting text, dates)
  • Tertiary: Light grey (metadata, copyright)

Key principles:

  • Size isn't everything—use weight and color
  • Emphasize by de-emphasizing competing elements
  • Labels are a last resort—combine with values
  • Semantics are secondary to hierarchy

4. Apply Depth Meaningfully

  • Light comes from above
  • Shadows convey elevation (closer = more attention)
  • Use two-part shadows for premium look
  • Consider overlapping elements for layers

5. Finish with Polish

  • Supercharge defaults (bullets → icons, style quotes)
  • Add accent borders for visual interest
  • Design empty states as first impressions
  • Use fewer borders—prefer shadows or spacing

Color System

Categories needed:

  1. Greys (8-10 shades): Text, backgrounds, panels, borders
  2. Primary (5-10 shades): Actions, active states, links
  3. Accents (per semantic): Success, warning, error states

Process for defining shades:

  1. Pick base color (500) that works as button background
  2. Pick edges (100 for tinted bg, 900 for text)
  3. Fill gaps: 700, 300 → 800, 600, 400, 200

Key rules:

  • Use HSL for intuitive adjustments
  • Increase saturation at lightness extremes
  • Rotate hue toward bright (60°, 180°, 300°) for lighter
  • Greys can be warm (yellow/orange tint) or cool (blue tint)
  • Accessibility: 4.5:1 contrast for normal text, 3:1 for large

Anti-Patterns

NEVER do:

  • Grey text on colored backgrounds (hand-pick colors instead)
  • Fill the whole screen when content needs less
  • Use grids religiously (fixed widths often better)
  • Ambiguous spacing (more space between groups than within)
  • Relative sizing that doesn't scale
  • Scale icons beyond intended size
  • Rely on color alone for meaning

Reference Files

For detailed guidance on specific topics:

TopicFileWhen to Read
Visual hierarchy, labels, emphasishierarchy.mdBalancing element importance
Spacing, white space, layout gridsspacing-layout.mdLayout decisions
Typography, fonts, line-heighttypography.mdText styling
HSL, shades, accessibilitycolor.mdColor palette creation
Shadows, elevation, layersdepth.mdAdding depth to UI
Borders, backgrounds, empty statesfinishing-touches.mdPolishing design