用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill ux-design命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | ux-design |
| description | | Use when this capability is needed. |
This skill provides UX design expertise and core design principles. Apply these automatically when designing or implementing user interfaces.
Law: The time to acquire a target is a function of distance and size.
Application:
Implementation:
button {
min-width: 44px;
min-height: 44px;
padding: 12px 24px;
}
Law: Decision time increases logarithmically with choices.
Application:
Implementation:
Law: Working memory holds 7±2 items.
Application:
Implementation:
Navigation:
├─ Dashboard
├─ Projects
├─ Team
├─ Settings
└─ Help
(5 items - within 7±2 limit)
Law: Users expect your site to work like others they know.
Application:
Implementation:
Law: Beautiful designs are perceived as easier to use.
Application:
Implementation:
/* Spacing system (8px base) */
--space-1: 8px;
--space-2: 16px;
--space-3: 24px;
--space-4: 32px;
--space-5: 48px;
Law: Show only what's needed now, hide complexity.
Application:
Implementation:
User Profile (Initial):
├─ Name
├─ Email
└─ [Advanced Settings] (collapsed)
User Profile (Expanded):
├─ Name
├─ Email
└─ Advanced Settings ▼
├─ Timezone
├─ Language
├─ Privacy
└─ Notifications
Law: Show options, don't make users remember.
Application:
Implementation:
<!-- Good: Recognition -->
<select>
<option>United States</option>
<option>Canada</option>
<option>United Kingdom</option>
</select>
<!-- Bad: Recall -->
<input type="text" placeholder="Enter country">
Law: Productivity soars when computer responds in <400ms.
Application:
Implementation:
// Show loading immediately
setLoading(true);
// Optimistic update
updateUI(data);
// Then send request
await api.save(data);
Primary Button:
Size: 44px min height
Padding: 12px 24px
Border-radius: 8px
Font: 16px, semibold
Color: High contrast (4.5:1 ratio)
State: hover, active, disabled, loading
Button Hierarchy:
Best Practices:
Layout:
[Label]
[Input field - 44px height]
[Error message (red, 14px)]
[Space: 24px between fields]
[Label]
[Input field - 44px height]
Structure:
Card:
├─ Image (16:9 aspect ratio)
├─ Padding: 16-24px
├─ Title: 18-20px, bold
├─ Body: 14-16px, regular
├─ Action: Button or link
└─ Shadow: Subtle elevation
Patterns:
Implementation:
8px Grid System:
Micro: 4px (icon-text gap)
XS: 8px (tight spacing)
S: 16px (comfortable)
M: 24px (section spacing)
L: 32px (major sections)
XL: 48px (page sections)
XXL: 64px (hero spacing)
WCAG AA (minimum):
Implementation: Always check contrast:
Text on background: ≥4.5:1
Button on background: ≥3:1
Icons on background: ≥3:1
Structure:
Primary: Brand color (CTAs, links)
Secondary: Supporting color
Success: Green (#22c55e)
Warning: Orange (#f59e0b)
Error: Red (#ef4444)
Neutral: Grays (backgrounds, borders)
Shades: Each color: 50, 100, 200, ..., 900
Mobile: < 640px
Tablet: 640px - 1024px
Desktop: > 1024px
/* Mobile (base) */
.container {
padding: 16px;
}
/* Tablet */
@media (min-width: 640px) {
.container {
padding: 24px;
}
}
/* Desktop */
@media (min-width: 1024px) {
.container {
padding: 32px;
max-width: 1200px;
margin: 0 auto;
}
}
Micro-interactions: 100-200ms
Transitions: 200-300ms
Complex animations: 300-500ms
Entering: ease-out (start fast, end slow)
Exiting: ease-in (start slow, end fast)
Moving: ease-in-out (smooth)
button {
transition: all 200ms ease-out;
}
.modal-enter {
animation: fadeIn 300ms ease-out;
}
.modal-exit {
animation: fadeOut 200ms ease-in;
}
Use this for every UI:
When creating UX specifications, use this structure:
## [Screen Name]
### Purpose
[What this screen does]
### User Journey
[How user arrives here]
### Components
#### [Component Name]
- **Type:** Button/Input/Card/etc.
- **Size:** [dimensions]
- **Content:** [what it contains]
- **Behavior:** [interactions]
- **States:** [default, hover, active, etc.]
### Layout
[ASCII or description of layout]
### Responsive Behavior
- Mobile: [how it adapts]
- Tablet: [how it adapts]
- Desktop: [how it adapts]
### Design Principles Applied
- [ ] Fitts's Law: [how]
- [ ] Hick's Law: [how]
- [ ] Miller's Law: [how]
- [ ] Jakob's Law: [how]
- [ ] Aesthetic-Usability: [how]
- [ ] Progressive Disclosure: [how]
- [ ] Recognition: [how]
- [ ] Doherty Threshold: [how]
When frontend-engineer implements UI:
Converted and distributed by TomeVault — claim your Tome and manage your conversions.