strray-ai 1.4.21 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/skills/ui-ux-design/SKILL.md +580 -14
- package/.opencode/state/state.json +44 -44
- package/dist/core/features-config.js +1 -1
- package/dist/core/features-config.js.map +1 -1
- package/dist/core/orchestrator.d.ts +5 -0
- package/dist/core/orchestrator.d.ts.map +1 -1
- package/dist/core/orchestrator.js +38 -0
- package/dist/core/orchestrator.js.map +1 -1
- package/dist/mcps/enhanced-orchestrator.server.d.ts.map +1 -1
- package/dist/mcps/enhanced-orchestrator.server.js +14 -3
- package/dist/mcps/enhanced-orchestrator.server.js.map +1 -1
- package/dist/mcps/framework-help.server.js +1 -1
- package/dist/mcps/framework-help.server.js.map +1 -1
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +1 -1
- package/dist/mcps/knowledge-skills/skill-invocation.server.js.map +1 -1
- package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +28 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts.map +1 -1
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +387 -5
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js.map +1 -1
- package/dist/mcps/orchestrator.server.d.ts.map +1 -1
- package/dist/mcps/orchestrator.server.js +51 -18
- package/dist/mcps/orchestrator.server.js.map +1 -1
- package/dist/performance/performance-ci-gates.d.ts.map +1 -1
- package/dist/performance/performance-ci-gates.js +16 -5
- package/dist/performance/performance-ci-gates.js.map +1 -1
- package/dist/state/state-manager.d.ts +1 -1
- package/dist/state/state-manager.d.ts.map +1 -1
- package/dist/state/state-manager.js +4 -3
- package/dist/state/state-manager.js.map +1 -1
- package/package.json +1 -1
- package/.opencode/OpenCode.json +0 -8
|
@@ -1,30 +1,596 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ui-ux-design
|
|
3
|
-
description: User interface and user experience design
|
|
3
|
+
description: User interface and user experience design with mobile-first approach, cognitive simplicity, and accessibility-first principles
|
|
4
4
|
author: StrRay Framework
|
|
5
|
-
version: 1.0
|
|
6
|
-
tags: [design, ui, ux,
|
|
5
|
+
version: 2.1.0
|
|
6
|
+
tags: [design, ui, ux, accessibility, mobile-first, visual-hierarchy, wcag, contrast, color-theory, dont-make-me-think]
|
|
7
7
|
|
|
8
8
|
mcp:
|
|
9
9
|
ui-ux-design:
|
|
10
10
|
command: node
|
|
11
|
-
args: [node_modules/strray-ai/dist/
|
|
11
|
+
args: [node_modules/strray-ai/dist/mcps/knowledge-skills/ui-ux-design.server.js]
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
#
|
|
14
|
+
# UI/UX Design Skill v2.1.0
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Professional user interface and user experience design with mobile-first approach, cognitive simplicity, rigorous accessibility compliance, and color contrast validation.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Core Philosophy: "Don't Make Me Think"
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- **ux_design**: UX design
|
|
22
|
-
- **interface_optimization**: Interface optimization
|
|
20
|
+
**Every design decision must reduce cognitive load.** If users have to think about how to use your interface, you've failed.
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
### Key Principles from Steve Krug:
|
|
23
|
+
1. **Eliminate question marks** - Users shouldn't wonder what to do
|
|
24
|
+
2. **Omit needless words** - Cut copy in half, then half again
|
|
25
|
+
3. **Create clear visual hierarchies** - Size, color, placement = importance
|
|
26
|
+
4. **Make clickable things obvious** - Buttons should look like buttons
|
|
27
|
+
5. **Reduce noise** - Every element competes for attention
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Design Philosophy
|
|
32
|
+
|
|
33
|
+
### 1. Mobile-First Design (Mandatory)
|
|
34
|
+
|
|
35
|
+
**Design for mobile first, then enhance for desktop.**
|
|
36
|
+
|
|
37
|
+
#### Mobile-First Principles:
|
|
38
|
+
```
|
|
39
|
+
✅ START: 320px viewport (iPhone SE)
|
|
40
|
+
✅ PROGRESSIVE ENHANCEMENT: Add complexity as screen grows
|
|
41
|
+
❌ NEVER: Design desktop then "squeeze" to mobile
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Mobile Design Constraints (Embrace Them):
|
|
45
|
+
| Constraint | Solution |
|
|
46
|
+
|------------|----------|
|
|
47
|
+
| Small screen (320-428px) | Single column, vertical stack |
|
|
48
|
+
| Touch targets (44px min) | Larger buttons, generous spacing |
|
|
49
|
+
| Limited attention | One primary action per screen |
|
|
50
|
+
| Slow connections | Optimize images, lazy loading |
|
|
51
|
+
| Fat fingers | 48px minimum touch targets |
|
|
52
|
+
|
|
53
|
+
#### Mobile Typography Scale:
|
|
54
|
+
```css
|
|
55
|
+
/* Mobile Base */
|
|
56
|
+
html { font-size: 16px; }
|
|
57
|
+
|
|
58
|
+
h1 { font-size: 2rem; line-height: 1.2; } /* 32px */
|
|
59
|
+
h2 { font-size: 1.75rem; line-height: 1.3; } /* 28px */
|
|
60
|
+
h3 { font-size: 1.5rem; line-height: 1.4; } /* 24px */
|
|
61
|
+
body { font-size: 1rem; line-height: 1.5; } /* 16px */
|
|
62
|
+
small { font-size: 0.875rem; } /* 14px */
|
|
63
|
+
|
|
64
|
+
/* Desktop Enhancement (min-width: 768px) */
|
|
65
|
+
@media (min-width: 768px) {
|
|
66
|
+
h1 { font-size: 3rem; } /* 48px */
|
|
67
|
+
h2 { font-size: 2.5rem; } /* 40px */
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Mobile Navigation Patterns:
|
|
72
|
+
- **Hamburger menu** with clear label "Menu"
|
|
73
|
+
- **Bottom navigation** for primary actions (thumb zone)
|
|
74
|
+
- **Swipe gestures** for carousels/galleries
|
|
75
|
+
- **Pull-to-refresh** for lists
|
|
76
|
+
- **Sticky CTA** at bottom for conversion
|
|
77
|
+
|
|
78
|
+
### 2. Visual Hierarchy (The 3-Second Rule)
|
|
79
|
+
|
|
80
|
+
**Users should understand the page purpose in 3 seconds.**
|
|
81
|
+
|
|
82
|
+
#### Hierarchy Levels:
|
|
83
|
+
```
|
|
84
|
+
Level 1 (Most Important):
|
|
85
|
+
- Page title/hero headline
|
|
86
|
+
- Primary CTA
|
|
87
|
+
- Critical alerts
|
|
88
|
+
|
|
89
|
+
Level 2 (Important):
|
|
90
|
+
- Section headings
|
|
91
|
+
- Supporting text
|
|
92
|
+
- Secondary CTAs
|
|
93
|
+
|
|
94
|
+
Level 3 (Supporting):
|
|
95
|
+
- Body text
|
|
96
|
+
- Metadata
|
|
97
|
+
- Footer links
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### Visual Hierarchy Techniques:
|
|
101
|
+
|
|
102
|
+
**1. Size & Scale:**
|
|
103
|
+
```css
|
|
104
|
+
/* Hero headline must dominate */
|
|
105
|
+
.hero h1 {
|
|
106
|
+
font-size: 3rem; /* 3x body size */
|
|
107
|
+
font-weight: 700;
|
|
108
|
+
margin-bottom: 1rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Supporting text subordinate */
|
|
112
|
+
.hero p {
|
|
113
|
+
font-size: 1.125rem; /* Slightly larger than body */
|
|
114
|
+
color: #6b7280; /* Muted color */
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**2. Color & Contrast:**
|
|
119
|
+
- High contrast = High importance
|
|
120
|
+
- Muted colors = Secondary information
|
|
121
|
+
- Accent color = Only for CTAs and key actions
|
|
122
|
+
|
|
123
|
+
**3. Spacing & Proximity:**
|
|
124
|
+
```css
|
|
125
|
+
/* Related items close together */
|
|
126
|
+
.card-content { padding: 1.5rem; }
|
|
127
|
+
|
|
128
|
+
/* Unrelated items separated */
|
|
129
|
+
.section { margin-bottom: 4rem; }
|
|
130
|
+
|
|
131
|
+
/* White space = breathing room */
|
|
132
|
+
.hero { padding: 6rem 0; }
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**4. Typography Weight:**
|
|
136
|
+
```css
|
|
137
|
+
/* Bold for headlines only */
|
|
138
|
+
h1, h2 { font-weight: 700; }
|
|
139
|
+
|
|
140
|
+
/* Regular for body */
|
|
141
|
+
p { font-weight: 400; }
|
|
142
|
+
|
|
143
|
+
/* Medium for emphasis */
|
|
144
|
+
strong { font-weight: 600; }
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 3. Image Strategy & Libraries
|
|
148
|
+
|
|
149
|
+
**Every image must serve a purpose.** Decorative images are waste.
|
|
150
|
+
|
|
151
|
+
#### Image Requirements Checklist:
|
|
152
|
+
- [ ] Supports the content message
|
|
153
|
+
- [ ] High quality (not pixelated)
|
|
154
|
+
- [ ] Optimized for web (< 200KB ideally)
|
|
155
|
+
- [ ] Alt text for accessibility
|
|
156
|
+
- [ ] Responsive srcset
|
|
157
|
+
- [ ] Lazy loaded below fold
|
|
158
|
+
|
|
159
|
+
#### Recommended Image Libraries:
|
|
160
|
+
|
|
161
|
+
**Stock Photography (High Quality):**
|
|
162
|
+
1. **Unsplash** (unsplash.com) - Free, high-quality, diverse
|
|
163
|
+
2. **Pexels** (pexels.com) - Free, good variety
|
|
164
|
+
3. **Pixabay** (pixabay.com) - Free, includes illustrations
|
|
165
|
+
4. **Shutterstock** - Premium, extensive catalog
|
|
166
|
+
5. **Getty Images** - Premium, editorial quality
|
|
167
|
+
|
|
168
|
+
**Illustrations & Graphics:**
|
|
169
|
+
1. **unDraw** (undraw.co) - Free, customizable color
|
|
170
|
+
2. **Blush** (blush.design) - Customizable illustrations
|
|
171
|
+
3. **Humaaans** - Mix-and-match people illustrations
|
|
172
|
+
4. **Open Peeps** - Hand-drawn characters
|
|
173
|
+
5. **Heroicons** - Icons (SVG)
|
|
174
|
+
|
|
175
|
+
**Icons:**
|
|
176
|
+
1. **Lucide** (lucide.dev) - Clean, modern icons
|
|
177
|
+
2. **Phosphor Icons** - Flexible weight system
|
|
178
|
+
3. **Font Awesome** - Extensive library
|
|
179
|
+
4. **Tabler Icons** - Free, consistent style
|
|
180
|
+
|
|
181
|
+
**Image Generation (AI):**
|
|
182
|
+
1. **Midjourney** - Artistic, high-quality
|
|
183
|
+
2. **DALL-E 3** - Photorealistic options
|
|
184
|
+
3. **Stable Diffusion** - Open source, customizable
|
|
185
|
+
|
|
186
|
+
#### Image Best Practices:
|
|
187
|
+
|
|
188
|
+
**Hero Images:**
|
|
189
|
+
```css
|
|
190
|
+
/* Full-width hero with overlay for text readability */
|
|
191
|
+
.hero {
|
|
192
|
+
background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
|
|
193
|
+
url('hero-image.jpg');
|
|
194
|
+
background-size: cover;
|
|
195
|
+
background-position: center;
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Responsive Images:**
|
|
200
|
+
```html
|
|
201
|
+
<img src="image-800.jpg"
|
|
202
|
+
srcset="image-400.jpg 400w,
|
|
203
|
+
image-800.jpg 800w,
|
|
204
|
+
image-1200.jpg 1200w"
|
|
205
|
+
sizes="(max-width: 600px) 400px,
|
|
206
|
+
(max-width: 1000px) 800px,
|
|
207
|
+
1200px"
|
|
208
|
+
alt="Descriptive text"
|
|
209
|
+
loading="lazy">
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Image Formats:**
|
|
213
|
+
- **Photos:** WebP (with JPEG fallback)
|
|
214
|
+
- **Icons:** SVG
|
|
215
|
+
- **Simple graphics:** SVG or PNG-8
|
|
216
|
+
- **Complex illustrations:** WebP
|
|
217
|
+
|
|
218
|
+
### 4. Cognitive Load Reduction
|
|
219
|
+
|
|
220
|
+
**Make decisions effortless.**
|
|
221
|
+
|
|
222
|
+
#### Hick's Law (Decision Time):
|
|
223
|
+
```
|
|
224
|
+
More options = More time to decide
|
|
225
|
+
|
|
226
|
+
✅ GOOD: 3-5 navigation items
|
|
227
|
+
❌ BAD: 20-item dropdown menu
|
|
228
|
+
|
|
229
|
+
✅ GOOD: Single primary CTA
|
|
230
|
+
❌ BAD: 5 competing buttons
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
#### Jakob's Law (Familiarity):
|
|
234
|
+
```
|
|
235
|
+
Users spend 90% of time on OTHER sites.
|
|
236
|
+
|
|
237
|
+
✅ Follow conventions:
|
|
238
|
+
- Logo top-left, links to home
|
|
239
|
+
- Search icon = magnifying glass
|
|
240
|
+
- Hamburger icon = menu
|
|
241
|
+
- Shopping cart top-right
|
|
242
|
+
|
|
243
|
+
❌ Don't innovate for innovation's sake
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
#### Progressive Disclosure:
|
|
247
|
+
```
|
|
248
|
+
Show only what's needed, when needed.
|
|
249
|
+
|
|
250
|
+
✅ Primary actions visible
|
|
251
|
+
✅ Secondary actions in menu
|
|
252
|
+
✅ Advanced options in "More" dropdown
|
|
253
|
+
✅ Details in expandable sections
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### The Magical Number Seven:
|
|
257
|
+
```
|
|
258
|
+
Humans can hold 7±2 items in working memory.
|
|
259
|
+
|
|
260
|
+
Navigation: Max 7 items
|
|
261
|
+
Form fields: Group in 5-9 chunks
|
|
262
|
+
Features: Highlight 3-7 benefits
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### 5. Accessibility-First Design
|
|
266
|
+
- **WCAG 2.1 AA Compliance** is mandatory, not optional
|
|
267
|
+
- All designs must pass automated accessibility checks
|
|
268
|
+
- Color contrast is validated before any design is approved
|
|
269
|
+
|
|
270
|
+
### 2. Hero Section Contrast Rules
|
|
271
|
+
|
|
272
|
+
**CRITICAL: Hero sections with background images/colors MUST meet these requirements:**
|
|
273
|
+
|
|
274
|
+
#### Background + Text Contrast
|
|
275
|
+
```
|
|
276
|
+
✅ LIGHT BACKGROUND → DARK TEXT (black, dark gray, navy)
|
|
277
|
+
- Background: #ffffff, #f8f9fa, light gradients
|
|
278
|
+
- Text: #000000, #212529, #1a1a2e
|
|
279
|
+
- Minimum contrast ratio: 4.5:1 (AA), 7:1 (AAA)
|
|
280
|
+
|
|
281
|
+
✅ DARK BACKGROUND → LIGHT TEXT (white, off-white)
|
|
282
|
+
- Background: #000000, #1a1a2e, dark gradients, dark images
|
|
283
|
+
- Text: #ffffff, #f8f9fa, #e9ecef
|
|
284
|
+
- Minimum contrast ratio: 4.5:1 (AA), 7:1 (AAA)
|
|
285
|
+
|
|
286
|
+
❌ NEVER: Light background + light text
|
|
287
|
+
❌ NEVER: Dark background + dark text
|
|
288
|
+
❌ NEVER: Busy image background without text shadow/overlay
|
|
289
|
+
```
|
|
27
290
|
|
|
28
|
-
|
|
291
|
+
#### Hero Section Text Overlay Rules
|
|
292
|
+
1. **Always use text shadow for image backgrounds:**
|
|
293
|
+
```css
|
|
294
|
+
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
2. **Or use semi-transparent overlay:**
|
|
298
|
+
```css
|
|
299
|
+
background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('hero.jpg');
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
3. **Check contrast in multiple viewport sizes**
|
|
303
|
+
|
|
304
|
+
### 3. Color Contrast Standards
|
|
305
|
+
|
|
306
|
+
**Text Contrast Requirements (WCAG 2.1):**
|
|
307
|
+
| Text Type | Normal Size | Large Scale (18pt+/14pt bold) |
|
|
308
|
+
|-----------|-------------|-------------------------------|
|
|
309
|
+
| AA Level | 4.5:1 | 3:1 |
|
|
310
|
+
| AAA Level | 7:1 | 4.5:1 |
|
|
311
|
+
|
|
312
|
+
**UI Component Contrast:**
|
|
313
|
+
- Buttons: 3:1 minimum against adjacent colors
|
|
314
|
+
- Form borders: 3:1 against background
|
|
315
|
+
- Focus indicators: 3:1 against all backgrounds
|
|
316
|
+
|
|
317
|
+
### 4. Pre-Approved Accessible Color Combinations
|
|
318
|
+
|
|
319
|
+
**Hero Section Palettes:**
|
|
320
|
+
|
|
321
|
+
**Option 1: Dark Hero (Recommended)**
|
|
322
|
+
```
|
|
323
|
+
Background: #0f172a (dark slate)
|
|
324
|
+
Text: #ffffff (white)
|
|
325
|
+
Accent: #3b82f6 (blue)
|
|
326
|
+
Contrast Ratio: 15.8:1 ✅
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
**Option 2: Light Hero**
|
|
330
|
+
```
|
|
331
|
+
Background: #f8fafc (light gray)
|
|
332
|
+
Text: #0f172a (dark slate)
|
|
333
|
+
Accent: #2563eb (blue)
|
|
334
|
+
Contrast Ratio: 12.4:1 ✅
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**Option 3: Gradient Hero**
|
|
338
|
+
```
|
|
339
|
+
Background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)
|
|
340
|
+
Text: #ffffff with text-shadow
|
|
341
|
+
Contrast Ratio: 4.8:1 (with shadow) ✅
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
**NEVER USE:**
|
|
345
|
+
- Yellow text on white background (1.2:1) ❌
|
|
346
|
+
- Light gray text on white (2.3:1) ❌
|
|
347
|
+
- White text on busy images without overlay ❌
|
|
348
|
+
- Pure black (#000) on pure white for large text blocks (causes eye strain) ❌
|
|
349
|
+
|
|
350
|
+
### 5. Landing Page Design Principles
|
|
351
|
+
|
|
352
|
+
#### Hero Section Structure
|
|
353
|
+
```
|
|
354
|
+
┌─────────────────────────────────────────────┐
|
|
355
|
+
│ [NAVIGATION - high contrast] │
|
|
356
|
+
├─────────────────────────────────────────────┤
|
|
357
|
+
│ │
|
|
358
|
+
│ HEADLINE (H1) │
|
|
359
|
+
│ - Max 2 lines │
|
|
360
|
+
│ - High contrast with background │
|
|
361
|
+
│ - Font size: 48-72px desktop │
|
|
362
|
+
│ │
|
|
363
|
+
│ Subheadline │
|
|
364
|
+
│ - 1-2 sentences │
|
|
365
|
+
│ - Same contrast as headline │
|
|
366
|
+
│ │
|
|
367
|
+
│ [CTA BUTTON - high contrast] │
|
|
368
|
+
│ │
|
|
369
|
+
└─────────────────────────────────────────────┘
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
#### Design Validation Checklist
|
|
373
|
+
|
|
374
|
+
**Visual Hierarchy:**
|
|
375
|
+
- [ ] 3-second rule: Purpose clear immediately
|
|
376
|
+
- [ ] Clear heading hierarchy (H1 → H2 → H3)
|
|
377
|
+
- [ ] One primary action per screen
|
|
378
|
+
- [ ] Secondary actions visually subordinate
|
|
379
|
+
- [ ] Adequate white space (breathing room)
|
|
380
|
+
|
|
381
|
+
**Mobile-First:**
|
|
382
|
+
- [ ] Designed for 320px viewport first
|
|
383
|
+
- [ ] Touch targets ≥ 48px
|
|
384
|
+
- [ ] Readable without zoom (16px minimum)
|
|
385
|
+
- [ ] No horizontal scroll
|
|
386
|
+
- [ ] Sticky CTA for mobile conversion
|
|
387
|
+
- [ ] Responsive images with srcset
|
|
388
|
+
|
|
389
|
+
**Accessibility & Contrast:**
|
|
390
|
+
- [ ] Background color defined
|
|
391
|
+
- [ ] Text color defined
|
|
392
|
+
- [ ] Contrast ratio calculated and ≥ 4.5:1
|
|
393
|
+
- [ ] Image backgrounds have overlay or text shadow
|
|
394
|
+
- [ ] CTA button contrasts with hero background
|
|
395
|
+
- [ ] Mobile viewport contrast verified
|
|
396
|
+
- [ ] Alt text for all images
|
|
397
|
+
|
|
398
|
+
**Cognitive Load:**
|
|
399
|
+
- [ ] No more than 7 navigation items
|
|
400
|
+
- [ ] Progressive disclosure used
|
|
401
|
+
- [ ] Eliminated unnecessary words
|
|
402
|
+
- [ ] Clear labels (no cryptic icons)
|
|
403
|
+
- [ ] Error prevention in forms
|
|
404
|
+
|
|
405
|
+
**Image Strategy:**
|
|
406
|
+
- [ ] Images from approved libraries
|
|
407
|
+
- [ ] Optimized for web (< 200KB)
|
|
408
|
+
- [ ] Alt text describes purpose
|
|
409
|
+
- [ ] Lazy loaded below fold
|
|
410
|
+
- [ ] Responsive sizing
|
|
411
|
+
|
|
412
|
+
### 6. Tools Available
|
|
413
|
+
|
|
414
|
+
#### validate_mobile_design ⭐ NEW
|
|
415
|
+
Mobile-first design validation:
|
|
416
|
+
- Touch target size verification (48px minimum)
|
|
417
|
+
- Viewport breakpoint analysis
|
|
418
|
+
- Mobile typography scale check
|
|
419
|
+
- Thumb zone optimization
|
|
420
|
+
- Mobile navigation pattern validation
|
|
421
|
+
|
|
422
|
+
#### analyze_visual_hierarchy ⭐ NEW
|
|
423
|
+
Visual hierarchy and cognitive load analysis:
|
|
424
|
+
- 3-second comprehension test
|
|
425
|
+
- Heading structure validation
|
|
426
|
+
- F-pattern and Z-pattern compliance
|
|
427
|
+
- Cognitive load scoring
|
|
428
|
+
- "Don't Make Me Think" principles check
|
|
429
|
+
|
|
430
|
+
#### recommend_images ⭐ NEW
|
|
431
|
+
Image strategy and library recommendations:
|
|
432
|
+
- Stock photo library suggestions
|
|
433
|
+
- Illustration style matching
|
|
434
|
+
- Icon set recommendations
|
|
435
|
+
- Image optimization requirements
|
|
436
|
+
- Alt text generation guidance
|
|
437
|
+
|
|
438
|
+
#### analyze_ui_component
|
|
439
|
+
|
|
440
|
+
#### analyze_ui_component
|
|
441
|
+
Deep component analysis with accessibility validation:
|
|
442
|
+
- Color contrast calculation
|
|
443
|
+
- WCAG compliance checking
|
|
444
|
+
- Hero section validation
|
|
445
|
+
- Landing page pattern analysis
|
|
446
|
+
|
|
447
|
+
#### design_component
|
|
448
|
+
Accessible-first component design:
|
|
449
|
+
- Enforces contrast requirements
|
|
450
|
+
- Validates color combinations
|
|
451
|
+
- Generates accessible markup
|
|
452
|
+
|
|
453
|
+
#### audit_accessibility
|
|
454
|
+
Comprehensive WCAG audit:
|
|
455
|
+
- Automated contrast checking
|
|
456
|
+
- Screen reader compatibility
|
|
457
|
+
- Keyboard navigation validation
|
|
458
|
+
|
|
459
|
+
#### generate_design_system
|
|
460
|
+
Complete accessible design system:
|
|
461
|
+
- Pre-validated color palettes
|
|
462
|
+
- Typography with contrast ratios
|
|
463
|
+
- Accessible component library
|
|
464
|
+
|
|
465
|
+
#### analyze_hero_contrast ⭐ NEW
|
|
466
|
+
Specific hero section analysis:
|
|
467
|
+
- Background + text contrast validation
|
|
468
|
+
- Image overlay recommendations
|
|
469
|
+
- Mobile/desktop contrast check
|
|
470
|
+
- Gradient accessibility analysis
|
|
471
|
+
|
|
472
|
+
### 7. Design Patterns Library
|
|
473
|
+
|
|
474
|
+
**Landing Page Hero Patterns:**
|
|
475
|
+
|
|
476
|
+
**Pattern 1: Single Color Background**
|
|
477
|
+
```css
|
|
478
|
+
.hero {
|
|
479
|
+
background-color: #1e293b;
|
|
480
|
+
color: #ffffff;
|
|
481
|
+
}
|
|
482
|
+
/* Contrast: 12.6:1 ✅ */
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
**Pattern 2: Image with Overlay**
|
|
486
|
+
```css
|
|
487
|
+
.hero {
|
|
488
|
+
background:
|
|
489
|
+
linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
|
|
490
|
+
url('hero-image.jpg');
|
|
491
|
+
color: #ffffff;
|
|
492
|
+
}
|
|
493
|
+
/* Contrast: 8.2:1 with overlay ✅ */
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
**Pattern 3: Gradient Background**
|
|
497
|
+
```css
|
|
498
|
+
.hero {
|
|
499
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
500
|
+
color: #ffffff;
|
|
501
|
+
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
|
|
502
|
+
}
|
|
503
|
+
/* Contrast: 4.8:1 ✅ */
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
### 8. Common Contrast Failures & Solutions
|
|
507
|
+
|
|
508
|
+
**Failure 1: White Text on Light Gray**
|
|
509
|
+
```css
|
|
510
|
+
/* ❌ BAD: 2.8:1 contrast */
|
|
511
|
+
.hero { background: #e5e7eb; color: #ffffff; }
|
|
512
|
+
|
|
513
|
+
/* ✅ GOOD: 12.4:1 contrast */
|
|
514
|
+
.hero { background: #e5e7eb; color: #1f2937; }
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
**Failure 2: Text on Busy Image**
|
|
518
|
+
```css
|
|
519
|
+
/* ❌ BAD: Unreadable on complex backgrounds */
|
|
520
|
+
.hero { background-image: url('busy-photo.jpg'); color: #ffffff; }
|
|
521
|
+
|
|
522
|
+
/* ✅ GOOD: Overlay for readability */
|
|
523
|
+
.hero {
|
|
524
|
+
background:
|
|
525
|
+
linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
|
|
526
|
+
url('busy-photo.jpg');
|
|
527
|
+
color: #ffffff;
|
|
528
|
+
}
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
**Failure 3: Light Gray on White**
|
|
532
|
+
```css
|
|
533
|
+
/* ❌ BAD: 2.3:1 contrast */
|
|
534
|
+
.hero { background: #ffffff; color: #9ca3af; }
|
|
535
|
+
|
|
536
|
+
/* ✅ GOOD: 7.5:1 contrast */
|
|
537
|
+
.hero { background: #ffffff; color: #374151; }
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
### 9. Contrast Calculation Reference
|
|
541
|
+
|
|
542
|
+
**Luminance Formula (WCAG):**
|
|
543
|
+
```
|
|
544
|
+
L = 0.2126 * R + 0.7152 * G + 0.0722 * B
|
|
545
|
+
Contrast Ratio = (L1 + 0.05) / (L2 + 0.05)
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
**Quick Contrast Guide:**
|
|
549
|
+
- White (#fff) on Black (#000): 21:1 ✅
|
|
550
|
+
- White (#fff) on Dark Gray (#333): 12.6:1 ✅
|
|
551
|
+
- White (#fff) on Medium Gray (#666): 5.7:1 ✅
|
|
552
|
+
- Black (#000) on White (#fff): 21:1 ✅
|
|
553
|
+
- Dark Gray (#333) on Light Gray (#ddd): 7.8:1 ✅
|
|
554
|
+
- Light Gray (#999) on White (#fff): 2.8:1 ❌
|
|
555
|
+
|
|
556
|
+
### 10. Integration Notes
|
|
557
|
+
|
|
558
|
+
This skill automatically validates:
|
|
559
|
+
1. All color combinations meet WCAG AA standards
|
|
560
|
+
2. Hero sections have proper text contrast
|
|
561
|
+
3. Landing pages follow accessibility patterns
|
|
562
|
+
4. Design tokens include contrast ratios
|
|
563
|
+
|
|
564
|
+
**When designing landing pages:**
|
|
565
|
+
1. Always call `analyze_hero_contrast` before finalizing
|
|
566
|
+
2. Verify contrast on both desktop and mobile
|
|
567
|
+
3. Test with actual content (not just lorem ipsum)
|
|
568
|
+
4. Validate CTA button visibility
|
|
569
|
+
|
|
570
|
+
---
|
|
571
|
+
|
|
572
|
+
## Usage Examples
|
|
573
|
+
|
|
574
|
+
**Example 1: Design Hero Section**
|
|
575
|
+
```
|
|
576
|
+
Use ui-ux-design skill to:
|
|
577
|
+
1. Generate hero section with dark blue background (#1e3a5f)
|
|
578
|
+
2. Ensure white text has 4.5:1+ contrast
|
|
579
|
+
3. Add CTA button with proper contrast
|
|
580
|
+
4. Validate mobile accessibility
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
**Example 2: Audit Landing Page**
|
|
584
|
+
```
|
|
585
|
+
Use ui-ux-design skill to:
|
|
586
|
+
1. Analyze hero section contrast
|
|
587
|
+
2. Check all text/background combinations
|
|
588
|
+
3. Validate image overlay requirements
|
|
589
|
+
4. Generate accessibility report
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
---
|
|
29
593
|
|
|
30
|
-
|
|
594
|
+
**Version:** 2.0.0
|
|
595
|
+
**Last Updated:** 2026-02-18
|
|
596
|
+
**WCAG Version:** 2.1 Level AA
|