用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill frontend-design命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | frontend-design |
| description | > Use when this capability is needed. |
A design intelligence skill built around one principle: interfaces are used by real people. Not by designers, not by developers — by people who are tired, distracted, using their phone on a bus, or just trying to get something done.
Every decision in this skill — color, spacing, motion, copy, hierarchy — is evaluated against that reality.
Compatible with: Claude, Claude Code, VS Code agent extensions, Cursor, Windsurf, Antigravity, and any agent that supports the Agent Skills standard.
Good design is invisible. When an interface is working, the user never thinks about the interface. They think about their goal.
The job is not to make something that looks impressive in a Dribbble screenshot. The job is to make something that gets out of the way and lets people do what they came to do — with as little friction, confusion, and cognitive load as possible.
Human-centered design asks three questions before any aesthetic decision:
If a beautiful animation slows someone down, remove it. If a minimalist layout leaves someone confused about what to do next, add more. Design serves people. People do not serve design.
Before opening a code editor or choosing a colour, answer these:
The answer to these questions determines everything else: font size, contrast ratio, the number of steps in a form, the weight of a primary button.
Before any styling, establish what the user must see, understand, and do — in order.
Every screen has exactly one primary action. Everything else either supports that action or gets out of the way. If you cannot name the primary action, the design does not have enough direction yet.
Hierarchy checklist:
Match the visual direction to the emotional context of the product, not to trends.
| Emotional Context | Visual Direction | Avoid |
|---|---|---|
| Trust and safety (finance, medical, legal) | Clean, spacious, high contrast, conservative type | Dark mode, playful fonts, heavy gradients |
| Creativity and expression (design tools, art, music) | Rich colour, expressive type, generous motion | Sterile layouts, tight spacing |
| Productivity and focus (developer tools, SaaS) | Neutral palette, dense information, monospace accents | Decorative elements that compete for attention |
| Warmth and care (wellness, community, education) | Warm palette, rounded forms, humanist type | Cold blues, sharp edges, clinical spacing |
| Excitement and aspiration (consumer, gaming, fashion) | Bold contrast, expressive type, energetic motion | Timid colour, overly safe layouts |
| Commerce and conversion (e-commerce, marketing) | Clear hierarchy, high-contrast CTA, trust signals | Cluttered layouts, competing calls to action |
Define these before writing any code. Changing them later is expensive.
Typography Pick two fonts: one for display/headings, one for body. They should have complementary personalities — one with character, one with clarity. The body font carries most of the reading load. It must be legible at 16px, comfortable at 1.5 line height, and work at 65 characters per line.
Never use more than two font families. Every additional font is noise.
Colour Start with one dominant colour that reflects the emotional direction. Add one accent for interactive elements and calls to action. Add a neutral scale (5–7 steps from near-white to near-black) for text, borders, backgrounds, and surfaces. That is the full palette. Add more only when you have a specific reason.
Define all colours as CSS custom properties. Never hardcode hex values in component styles.
Spacing Use a consistent spacing scale (4px base: 4, 8, 12, 16, 24, 32, 48, 64, 96). Inconsistent spacing is the most common reason a design looks amateurish. Whitespace is not empty — it is rest for the eye and signal for hierarchy.
Elevation and Depth Use shadow sparingly — one or two elevation levels maximum. Shadow signals "this element is above the surface". Overuse makes everything feel equally elevated and nothing feel important.
text-wrap: balance on all headings to prevent orphaned wordsfont-variant-numeric: tabular-nums on any column of numbers or prices… not three periods ...Font pairing by emotional direction:
| Direction | Display | Body |
|---|---|---|
| Trust and authority | Playfair Display, Lora | Source Serif 4, Georgia |
| Productivity and precision | JetBrains Mono, IBM Plex Mono | IBM Plex Sans, Inter |
| Warmth and community | Nunito, Quicksand | Lato, Open Sans |
| Creativity and expression | Fraunces, Cabinet Grotesk | DM Sans, Outfit |
| Premium and luxury | Cormorant Garamond, Canela | Suisse Int'l, Aktiv Grotesk |
| Playful and youthful | Paytone One, Righteous | Nunito, Poppins |
| Editorial and media | Libre Baskerville, Spectral | Merriweather, Source Sans 3 |
Fonts to avoid (overused to the point of being invisible): Inter as a display font, Roboto as a brand font, Arial as anything intentional, Space Grotesk as a "distinctive" choice. These read as defaults, not decisions.
Avoid:
top-4 left-4 right-4 inset — never flush to the viewport edgetransition: all — list properties explicitlytransform and opacity — never width, height, top, leftprefers-reduced-motion alternative that removes motionLoading states:
…, never replace labelsaria-label<label> elementsalt text (or alt="" for decorative images)aria-hidden="true"<button> for actions, <a> for navigation — never <div onClick>aria-live="polite"user-scalable=no is an accessibility violation)cursor-pointer, focus-visible ring, and hover statetop-4 left-4 right-4 with backdrop-blur and borderposition: sticky; top: 0 with enough z-index to clear contentcursor-pointer on interactive cards onlyoverscroll-behavior: contain to prevent background scrollfont-variant-numeric: tabular-nums on all numeric columns| Anti-Pattern | Why It Fails Humans |
|---|---|
| Emoji used as UI icons | Inconsistent rendering across OS, no sizing control, inaccessible |
| Placeholder as the only label | Label disappears when user starts typing — causes errors and re-entry |
| Colour as the only error indicator | Fails for colour-blind users |
| Disabled submit until all fields valid | Prevents user from discovering which field is wrong |
| Animation on every element | Creates noise, not delight — reduces perceived performance |
transition: all | Causes unintended transitions on layout properties |
outline: none without replacement | Removes all keyboard focus visibility |
<div onClick> or <span onClick> | Not keyboard accessible, no screen reader semantics |
| Hover-only interactions on mobile | Touch devices have no hover state |
| Text below 16px on mobile | Legibility degrades; causes zoom — disrupts layout |
| No loading state on async actions | User does not know if their action registered |
| Success/error as a colour change only | Fails colour-blind users; toast disappears too fast |
| Deep OFFSET pagination | Gets slower with every page; use keyset pagination |
| Error message without a fix | "Invalid email" is less useful than "Email must include @" |
| Inconsistent spacing | The single most common reason a UI looks unpolished |
Complete this before handing off or deploying any interface.
Typography
text-wrap: balancetabular-numsColour and Contrast
Interaction
cursor-pointerprefers-reduced-motion respectedForms
Accessibility
aria-labelalt text<button>, <a>, <label>, <nav>)user-scalable=noLayout
Loading and Empty States
| Stack | Key Rules |
|---|---|
| HTML/Tailwind | Use prose for body text, aspect-ratio for media, container mx-auto px-4 for layout |
| React | Prefer CSS modules or Tailwind over inline styles; no layout reads in render |
| Next.js | Use next/image with explicit width/height; next/font for zero-layout-shift fonts |
| Vue | Scoped styles; v-memo for expensive list items; Transition component with CSS |
| Svelte | transition: directives respect prefers-reduced-motion automatically |
| React Native | accessibilityLabel on all touchable elements; hitSlop for small targets |
| SwiftUI | .accessibilityLabel() on all Image views; .dynamicTypeSize support |
| Flutter | Semantics widget on custom widgets; MediaQuery.boldText for accessibility |
| shadcn/ui | Use cn() for conditional classes; do not override Radix accessibility props |
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
基于 SOC 职业分类