AgentSkillsCN

frontend-design

以设计思维指导Web UI的构建与决策。深入理解用户体验心理学、色彩运用、字体排版以及布局设计原则。

SKILL.md
--- frontmatter
name: frontend-design
description: Design thinking and decision-making for web UI. UX psychology, color, typography, layout principles.
allowed-tools: Read, Write, Edit

Frontend Design System

Philosophy: Every pixel has purpose. Restraint is luxury. User psychology drives decisions. Core Principle: THINK, don't memorize. ASK, don't assume.


⚠️ CRITICAL: ASK BEFORE ASSUMING

STOP! If the user's request is open-ended, DO NOT default to your favorites.

Color not specified? Ask:

"What color palette do you prefer? (blue/green/orange/neutral/other?)"

Style not specified? Ask:

"What style are you going for? (minimal/bold/retro/futuristic/organic?)"

Layout not specified? Ask:

"Do you have a layout preference? (single column/grid/asymmetric/full-width?)"


🚫 Anti-Patterns to AVOID

AI Default TendencyWhy It's BadThink Instead
Bento GridsUsed in every AI designWhy does this content NEED a grid?
Hero Split (Left/Right)Predictable & BoringMassive Typography or Vertical Narrative?
Mesh/Aurora GradientsLazy backgroundRadical color pairing?
GlassmorphismAI's idea of "premium"Solid, high-contrast flat?
Deep Cyan / Fintech BlueSafe harborRed, Black, or Neon Green?
Purple/Violet🚫 PURPLE BANANY other color
Dark + neon glow"AI look"What does the BRAND need?
Rounded everythingGenericBrutalist edges?

1. UX Psychology Laws

LawPrincipleApplication
Hick's LawMore choices = slower decisionsLimit options
Fitts' LawBigger + closer = easier to clickSize CTAs
Miller's Law~7 items in working memoryChunk content
Von RestorffDifferent = memorableMake CTAs distinct
Serial PositionFirst/last remembered mostKey info at start/end

2. Layout Principles

Golden Ratio (φ = 1.618)

code
Content : Sidebar = roughly 62% : 38%
Each heading size = previous × 1.618

8-Point Grid

code
All spacing in multiples of 8:
├── Small: 8px
├── Medium: 16px
├── Large: 24px, 32px
├── XL: 48px, 64px

3. Color Principles

60-30-10 Rule

code
60% → Primary/Background (calm)
30% → Secondary (supporting)
10% → Accent (CTAs, highlights)

Color Psychology

If You Need...ConsiderAvoid
Trust, calmBlue familyAggressive reds
GrowthGreen familyIndustrial grays
EnergyOrange, redPassive blues
LuxuryTeal, Gold, EmeraldCheap brights

4. Typography Principles

Scale Selection

Content TypeRatioFeel
Dense UI1.125-1.2Compact
General web1.25Balanced
Editorial1.333Spacious
Hero1.5-1.618Dramatic

Readability

  • Line length: 45-75 characters
  • Line height: 1.4-1.6 for body
  • Size: 16px+ for body on web

5. Animation Principles

ActionEasingWhy
EnteringEase-outSettle in
LeavingEase-inExit
EmphasisEase-in-outDeliberate

Performance:

  • Animate only transform and opacity
  • Respect reduced-motion preference

6. "Wow Factor" Checklist

  • Generous whitespace
  • Subtle depth and dimension
  • Smooth, purposeful animations
  • Attention to detail (alignment)
  • Custom elements (not defaults)
  • Different from AI defaults

Decision Process

code
For EVERY design task:
1. CONSTRAINTS → Timeline, brand, audience?
2. CONTENT → What exists? Hierarchy?
3. STYLE → Appropriate for context? ASK if unclear!
4. EXECUTE → Apply principles, check anti-patterns
5. REVIEW → "Is this different from my defaults?"

Remember: Design is THINKING, not copying. Avoid the Modern SaaS Safe Harbor!