cp-toolkit 2.2.2 → 2.2.4

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.
Files changed (71) hide show
  1. package/package.json +1 -1
  2. package/src/commands/add.js +23 -16
  3. package/src/commands/doctor.js +15 -10
  4. package/src/commands/init.js +410 -64
  5. package/templates/AGENTS.md +47 -0
  6. package/templates/ARCHITECTURE.md +42 -0
  7. package/templates/agents/backend-specialist.md +1 -0
  8. package/templates/agents/code-archaeologist.md +116 -106
  9. package/templates/agents/database-architect.md +1 -0
  10. package/templates/agents/debugger.md +1 -0
  11. package/templates/agents/devops-engineer.md +1 -0
  12. package/templates/agents/documentation-writer.md +1 -0
  13. package/templates/agents/explorer-agent.md +83 -73
  14. package/templates/agents/frontend-specialist.md +1 -0
  15. package/templates/agents/game-developer.md +1 -0
  16. package/templates/agents/mobile-developer.md +1 -0
  17. package/templates/agents/orchestrator.md +426 -416
  18. package/templates/agents/penetration-tester.md +1 -0
  19. package/templates/agents/performance-optimizer.md +1 -0
  20. package/templates/agents/product-manager.md +122 -112
  21. package/templates/agents/product-owner.md +105 -95
  22. package/templates/agents/project-planner.md +416 -406
  23. package/templates/agents/qa-automation-engineer.md +113 -103
  24. package/templates/agents/security-auditor.md +1 -0
  25. package/templates/agents/seo-specialist.md +1 -0
  26. package/templates/agents/test-engineer.md +1 -0
  27. package/templates/skills/core/behavioral-modes/SKILL.md +244 -242
  28. package/templates/skills/core/brainstorming/SKILL.md +166 -163
  29. package/templates/skills/core/mcp-builder/SKILL.md +178 -176
  30. package/templates/skills/core/parallel-agents/SKILL.md +187 -175
  31. package/templates/skills/core/plan-writing/SKILL.md +154 -152
  32. package/templates/skills/optional/api-patterns/SKILL.md +83 -81
  33. package/templates/skills/optional/app-builder/SKILL.md +78 -75
  34. package/templates/skills/optional/app-builder/templates/SKILL.md +41 -39
  35. package/templates/skills/optional/architecture/SKILL.md +58 -55
  36. package/templates/skills/optional/bash-linux/SKILL.md +201 -199
  37. package/templates/skills/optional/code-review-checklist/SKILL.md +110 -109
  38. package/templates/skills/optional/database-design/SKILL.md +54 -52
  39. package/templates/skills/optional/deployment-procedures/SKILL.md +243 -241
  40. package/templates/skills/optional/documentation-templates/SKILL.md +196 -194
  41. package/templates/skills/optional/frontend-design/SKILL.md +421 -418
  42. package/templates/skills/optional/game-development/2d-games/SKILL.md +120 -119
  43. package/templates/skills/optional/game-development/3d-games/SKILL.md +136 -135
  44. package/templates/skills/optional/game-development/SKILL.md +169 -167
  45. package/templates/skills/optional/game-development/game-art/SKILL.md +187 -185
  46. package/templates/skills/optional/game-development/game-audio/SKILL.md +192 -190
  47. package/templates/skills/optional/game-development/game-design/SKILL.md +131 -129
  48. package/templates/skills/optional/game-development/mobile-games/SKILL.md +110 -108
  49. package/templates/skills/optional/game-development/multiplayer/SKILL.md +133 -132
  50. package/templates/skills/optional/game-development/pc-games/SKILL.md +146 -144
  51. package/templates/skills/optional/game-development/vr-ar/SKILL.md +124 -123
  52. package/templates/skills/optional/game-development/web-games/SKILL.md +152 -150
  53. package/templates/skills/optional/geo-fundamentals/SKILL.md +158 -156
  54. package/templates/skills/optional/i18n-localization/SKILL.md +156 -154
  55. package/templates/skills/optional/lint-and-validate/SKILL.md +48 -45
  56. package/templates/skills/optional/mobile-design/SKILL.md +397 -394
  57. package/templates/skills/optional/nextjs-react-expert/SKILL.md +271 -267
  58. package/templates/skills/optional/nodejs-best-practices/SKILL.md +335 -333
  59. package/templates/skills/optional/performance-profiling/SKILL.md +145 -143
  60. package/templates/skills/optional/powershell-windows/SKILL.md +169 -167
  61. package/templates/skills/optional/python-patterns/SKILL.md +443 -441
  62. package/templates/skills/optional/red-team-tactics/SKILL.md +201 -199
  63. package/templates/skills/optional/seo-fundamentals/SKILL.md +130 -129
  64. package/templates/skills/optional/server-management/SKILL.md +163 -161
  65. package/templates/skills/optional/systematic-debugging/SKILL.md +111 -109
  66. package/templates/skills/optional/tailwind-patterns/SKILL.md +271 -269
  67. package/templates/skills/optional/tdd-workflow/SKILL.md +150 -149
  68. package/templates/skills/optional/testing-patterns/SKILL.md +179 -178
  69. package/templates/skills/optional/vulnerability-scanner/SKILL.md +278 -276
  70. package/templates/skills/optional/web-design-guidelines/SKILL.md +60 -57
  71. package/templates/skills/optional/webapp-testing/SKILL.md +188 -187
@@ -1,418 +1,421 @@
1
- ---
2
- name: frontend-design
3
- description: Design thinking and decision-making for web UI. Use when designing components, layouts, color schemes, typography, or creating aesthetic interfaces. Teaches principles, not fixed values.
4
- allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
- ---
6
-
7
- # Frontend Design System
8
-
9
- > **Philosophy:** Every pixel has purpose. Restraint is luxury. User psychology drives decisions.
10
- > **Core Principle:** THINK, don't memorize. ASK, don't assume.
11
-
12
- ---
13
-
14
- ## 🎯 Selective Reading Rule (MANDATORY)
15
-
16
- **Read REQUIRED files always, OPTIONAL only when needed:**
17
-
18
- | File | Status | When to Read |
19
- |------|--------|--------------|
20
- | [ux-psychology.md](ux-psychology.md) | 🔴 **REQUIRED** | Always read first! |
21
- | [color-system.md](color-system.md) | Optional | Color/palette decisions |
22
- | [typography-system.md](typography-system.md) | ⚪ Optional | Font selection/pairing |
23
- | [visual-effects.md](visual-effects.md) | Optional | Glassmorphism, shadows, gradients |
24
- | [animation-guide.md](animation-guide.md) | ⚪ Optional | Animation needed |
25
- | [motion-graphics.md](motion-graphics.md) | ⚪ Optional | Lottie, GSAP, 3D |
26
- | [decision-trees.md](decision-trees.md) | ⚪ Optional | Context templates |
27
-
28
- > 🔴 **ux-psychology.md = ALWAYS READ. Others = only if relevant.**
29
-
30
- ---
31
-
32
- ## 🔧 Runtime Scripts
33
-
34
- **Execute these for audits (don't read, just run):**
35
-
36
- | Script | Purpose | Usage |
37
- |--------|---------|-------|
38
- | `scripts/ux_audit.py` | UX Psychology & Accessibility Audit | `python scripts/ux_audit.py <project_path>` |
39
-
40
- ---
41
-
42
- ## ⚠️ CRITICAL: ASK BEFORE ASSUMING (MANDATORY)
43
-
44
- > **STOP! If the user's request is open-ended, DO NOT default to your favorites.**
45
-
46
- ### When User Prompt is Vague, ASK:
47
-
48
- **Color not specified?** Ask:
49
- > "What color palette do you prefer? (blue/green/orange/neutral/other?)"
50
-
51
- **Style not specified?** Ask:
52
- > "What style are you going for? (minimal/bold/retro/futuristic/organic?)"
53
-
54
- **Layout not specified?** Ask:
55
- > "Do you have a layout preference? (single column/grid/asymmetric/full-width?)"
56
-
57
- ### DEFAULT TENDENCIES TO AVOID (ANTI-SAFE HARBOR):
58
-
59
- | AI Default Tendency | Why It's Bad | Think Instead |
60
- |---------------------|--------------|---------------|
61
- | **Bento Grids (Modern Cliché)** | Used in every AI design | Why does this content NEED a grid? |
62
- | **Hero Split (Left/Right)** | Predictable & Boring | How about Massive Typography or Vertical Narrative? |
63
- | **Mesh/Aurora Gradients** | The "new" lazy background | What's a radical color pairing? |
64
- | **Glassmorphism** | AI's idea of "premium" | How about solid, high-contrast flat? |
65
- | **Deep Cyan / Fintech Blue** | Safe harbor from purple ban | Why not Red, Black, or Neon Green? |
66
- | **"Orchestrate / Empower"** | AI-generated copywriting | How would a human say this? |
67
- | Dark background + neon glow | Overused, "AI look" | What does the BRAND actually need? |
68
- | **Rounded everything** | Generic/Safe | Where can I use sharp, brutalist edges? |
69
-
70
- > 🔴 **"Every 'safe' structure you choose brings you one step closer to a generic template. TAKE RISKS."**
71
-
72
- ---
73
-
74
- ## 1. Constraint Analysis (ALWAYS FIRST)
75
-
76
- Before any design work, ANSWER THESE or ASK USER:
77
-
78
- | Constraint | Question | Why It Matters |
79
- |------------|----------|----------------|
80
- | **Timeline** | How much time? | Determines complexity |
81
- | **Content** | Ready or placeholder? | Affects layout flexibility |
82
- | **Brand** | Existing guidelines? | May dictate colors/fonts |
83
- | **Tech** | What stack? | Affects capabilities |
84
- | **Audience** | Who exactly? | Drives all visual decisions |
85
-
86
- ### Audience Design Approach
87
-
88
- | Audience | Think About |
89
- |----------|-------------|
90
- | **Gen Z** | Bold, fast, mobile-first, authentic |
91
- | **Millennials** | Clean, minimal, value-driven |
92
- | **Gen X** | Familiar, trustworthy, clear |
93
- | **Boomers** | Readable, high contrast, simple |
94
- | **B2B** | Professional, data-focused, trust |
95
- | **Luxury** | Restrained elegance, whitespace |
96
-
97
- ---
98
-
99
- ## 2. UX Psychology Principles
100
-
101
- ### Core Laws (Internalize These)
102
-
103
- | Law | Principle | Application |
104
- |-----|-----------|-------------|
105
- | **Hick's Law** | More choices = slower decisions | Limit options, use progressive disclosure |
106
- | **Fitts' Law** | Bigger + closer = easier to click | Size CTAs appropriately |
107
- | **Miller's Law** | ~7 items in working memory | Chunk content into groups |
108
- | **Von Restorff** | Different = memorable | Make CTAs visually distinct |
109
- | **Serial Position** | First/last remembered most | Key info at start/end |
110
-
111
- ### Emotional Design Levels
112
-
113
- ```
114
- VISCERAL (instant) → First impression: colors, imagery, overall feel
115
- BEHAVIORAL (use) → Using it: speed, feedback, efficiency
116
- REFLECTIVE (memory) → After: "I like what this says about me"
117
- ```
118
-
119
- ### Trust Building
120
-
121
- - Security indicators on sensitive actions
122
- - Social proof where relevant
123
- - Clear contact/support access
124
- - Consistent, professional design
125
- - Transparent policies
126
-
127
- ---
128
-
129
- ## 3. Layout Principles
130
-
131
- ### Golden Ratio (φ = 1.618)
132
-
133
- ```
134
- Use for proportional harmony:
135
- ├── Content : Sidebar = roughly 62% : 38%
136
- ├── Each heading size = previous × 1.618 (for dramatic scale)
137
- ├── Spacing can follow: sm → md → lg (each × 1.618)
138
- ```
139
-
140
- ### 8-Point Grid Concept
141
-
142
- ```
143
- All spacing and sizing in multiples of 8:
144
- ├── Tight: 4px (half-step for micro)
145
- ├── Small: 8px
146
- ├── Medium: 16px
147
- ├── Large: 24px, 32px
148
- ├── XL: 48px, 64px, 80px
149
- └── Adjust based on content density
150
- ```
151
-
152
- ### Key Sizing Principles
153
-
154
- | Element | Consideration |
155
- |---------|---------------|
156
- | **Touch targets** | Minimum comfortable tap size |
157
- | **Buttons** | Height based on importance hierarchy |
158
- | **Inputs** | Match button height for alignment |
159
- | **Cards** | Consistent padding, breathable |
160
- | **Reading width** | 45-75 characters optimal |
161
-
162
- ---
163
-
164
- ## 4. Color Principles
165
-
166
- ### 60-30-10 Rule
167
-
168
- ```
169
- 60% → Primary/Background (calm, neutral base)
170
- 30% → Secondary (supporting areas)
171
- 10% → Accent (CTAs, highlights, attention)
172
- ```
173
-
174
- ### Color Psychology (For Decision Making)
175
-
176
- | If You Need... | Consider Hues | Avoid |
177
- |----------------|---------------|-------|
178
- | Trust, calm | Blue family | Aggressive reds |
179
- | Growth, nature | Green family | Industrial grays |
180
- | Energy, urgency | Orange, red | Passive blues |
181
- | Luxury, creativity | Deep Teal, Gold, Emerald | Cheap-feeling brights |
182
- | Clean, minimal | Neutrals | Overwhelming color |
183
-
184
- ### Selection Process
185
-
186
- 1. **What's the industry?** (narrows options)
187
- 2. **What's the emotion?** (picks primary)
188
- 3. **Light or dark mode?** (sets foundation)
189
- 4. **ASK USER** if not specified
190
-
191
- For detailed color theory: [color-system.md](color-system.md)
192
-
193
- ---
194
-
195
- ## 5. Typography Principles
196
-
197
- ### Scale Selection
198
-
199
- | Content Type | Scale Ratio | Feel |
200
- |--------------|-------------|------|
201
- | Dense UI | 1.125-1.2 | Compact, efficient |
202
- | General web | 1.25 | Balanced (most common) |
203
- | Editorial | 1.333 | Readable, spacious |
204
- | Hero/display | 1.5-1.618 | Dramatic impact |
205
-
206
- ### Pairing Concept
207
-
208
- ```
209
- Contrast + Harmony:
210
- ├── DIFFERENT enough for hierarchy
211
- ├── SIMILAR enough for cohesion
212
- └── Usually: display + neutral, or serif + sans
213
- ```
214
-
215
- ### Readability Rules
216
-
217
- - **Line length**: 45-75 characters optimal
218
- - **Line height**: 1.4-1.6 for body text
219
- - **Contrast**: Check WCAG requirements
220
- - **Size**: 16px+ for body on web
221
-
222
- For detailed typography: [typography-system.md](typography-system.md)
223
-
224
- ---
225
-
226
- ## 6. Visual Effects Principles
227
-
228
- ### Glassmorphism (When Appropriate)
229
-
230
- ```
231
- Key properties:
232
- ├── Semi-transparent background
233
- ├── Backdrop blur
234
- ├── Subtle border for definition
235
- └── ⚠️ **WARNING:** Standard blue/white glassmorphism is a modern cliché. Use it radically or not at all.
236
- ```
237
-
238
- ### Shadow Hierarchy
239
-
240
- ```
241
- Elevation concept:
242
- ├── Higher elements = larger shadows
243
- ├── Y-offset > X-offset (light from above)
244
- ├── Multiple layers = more realistic
245
- └── Dark mode: may need glow instead
246
- ```
247
-
248
- ### Gradient Usage
249
-
250
- ```
251
- Harmonious gradients:
252
- ├── Adjacent colors on wheel (analogous)
253
- ├── OR same hue, different lightness
254
- ├── Avoid harsh complementary pairs
255
- ├── 🚫 **NO Mesh/Aurora Gradients** (floating blobs)
256
- └── VARY from project to project radically
257
- ```
258
-
259
- For complete effects guide: [visual-effects.md](visual-effects.md)
260
-
261
- ---
262
-
263
- ## 7. Animation Principles
264
-
265
- ### Timing Concept
266
-
267
- ```
268
- Duration based on:
269
- ├── Distance (further = longer)
270
- ├── Size (larger = slower)
271
- ├── Importance (critical = clear)
272
- └── Context (urgent = fast, luxury = slow)
273
- ```
274
-
275
- ### Easing Selection
276
-
277
- | Action | Easing | Why |
278
- |--------|--------|-----|
279
- | Entering | Ease-out | Decelerate, settle in |
280
- | Leaving | Ease-in | Accelerate, exit |
281
- | Emphasis | Ease-in-out | Smooth, deliberate |
282
- | Playful | Bounce | Fun, energetic |
283
-
284
- ### Performance
285
-
286
- - Animate only transform and opacity
287
- - Respect reduced-motion preference
288
- - Test on low-end devices
289
-
290
- For animation patterns: [animation-guide.md](animation-guide.md), for advanced: [motion-graphics.md](motion-graphics.md)
291
-
292
- ---
293
-
294
- ## 8. "Wow Factor" Checklist
295
-
296
- ### Premium Indicators
297
-
298
- - [ ] Generous whitespace (luxury = breathing room)
299
- - [ ] Subtle depth and dimension
300
- - [ ] Smooth, purposeful animations
301
- - [ ] Attention to detail (alignment, consistency)
302
- - [ ] Cohesive visual rhythm
303
- - [ ] Custom elements (not all defaults)
304
-
305
- ### Trust Builders
306
-
307
- - [ ] Security cues where appropriate
308
- - [ ] Social proof / testimonials
309
- - [ ] Clear value proposition
310
- - [ ] Professional imagery
311
- - [ ] Consistent design language
312
-
313
- ### Emotional Triggers
314
-
315
- - [ ] Hero that evokes intended emotion
316
- - [ ] Human elements (faces, stories)
317
- - [ ] Progress/achievement indicators
318
- - [ ] Moments of delight
319
-
320
- ---
321
-
322
- ## 9. Anti-Patterns (What NOT to Do)
323
-
324
- ### ❌ Lazy Design Indicators
325
-
326
- - Default system fonts without consideration
327
- - Stock imagery that doesn't match
328
- - Inconsistent spacing
329
- - Too many competing colors
330
- - Walls of text without hierarchy
331
- - Inaccessible contrast
332
-
333
- ### AI Tendency Patterns (AVOID!)
334
-
335
- - **Same colors every project**
336
- - **Dark + neon as default**
337
- - **Purple/violet everything (PURPLE BAN ✅)**
338
- - **Bento grids for simple landing pages**
339
- - **Mesh Gradients & Glow Effects**
340
- - **Same layout structure / Vercel clone**
341
- - **Not asking user preferences**
342
-
343
- ### Dark Patterns (Unethical)
344
-
345
- - Hidden costs
346
- - Fake urgency
347
- - Forced actions
348
- - Deceptive UI
349
- - Confirmshaming
350
-
351
- ---
352
-
353
- ## 10. Decision Process Summary
354
-
355
- ```
356
- For EVERY design task:
357
-
358
- 1. CONSTRAINTS
359
- └── What's the timeline, brand, tech, audience?
360
- └── If unclear → ASK
361
-
362
- 2. CONTENT
363
- └── What content exists?
364
- └── What's the hierarchy?
365
-
366
- 3. STYLE DIRECTION
367
- └── What's appropriate for context?
368
- └── If unclear → ASK (don't default!)
369
-
370
- 4. EXECUTION
371
- └── Apply principles above
372
- └── Check against anti-patterns
373
-
374
- 5. REVIEW
375
- └── "Does this serve the user?"
376
- └── "Is this different from my defaults?"
377
- └── "Would I be proud of this?"
378
- ```
379
-
380
- ---
381
-
382
- ## Reference Files
383
-
384
- For deeper guidance on specific areas:
385
-
386
- - [color-system.md](color-system.md) - Color theory and selection process
387
- - [typography-system.md](typography-system.md) - Font pairing and scale decisions
388
- - [visual-effects.md](visual-effects.md) - Effects principles and techniques
389
- - [animation-guide.md](animation-guide.md) - Motion design principles
390
- - [motion-graphics.md](motion-graphics.md) - Advanced: Lottie, GSAP, SVG, 3D, Particles
391
- - [decision-trees.md](decision-trees.md) - Context-specific templates
392
- - [ux-psychology.md](ux-psychology.md) - User psychology deep dive
393
-
394
- ---
395
-
396
- ## Related Skills
397
-
398
- | Skill | When to Use |
399
- |-------|-------------|
400
- | **frontend-design** (this) | Before coding - Learn design principles (color, typography, UX psychology) |
401
- | **[web-design-guidelines](../web-design-guidelines/SKILL.md)** | After coding - Audit for accessibility, performance, and best practices |
402
-
403
- ## Post-Design Workflow
404
-
405
- After implementing your design, run the audit:
406
-
407
- ```
408
- 1. DESIGN → Read frontend-design principles YOU ARE HERE
409
- 2. CODE → Implement the design
410
- 3. AUDIT → Run web-design-guidelines review
411
- 4. FIX Address findings from audit
412
- ```
413
-
414
- > **Next Step:** After coding, use `web-design-guidelines` skill to audit your implementation for accessibility, focus states, animations, and performance issues.
415
-
416
- ---
417
-
418
- > **Remember:** Design is THINKING, not copying. Every project deserves fresh consideration based on its unique context and users. **Avoid the Modern SaaS Safe Harbor!**
1
+ ---
2
+ name: frontend-design
3
+ description: Design thinking and decision-making for web UI. Use when designing components,
4
+ layouts, color schemes, typography, or creating aesthetic interfaces. Teaches principles,
5
+ not fixed values.
6
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash
7
+ version: '1.0'
8
+ ---
9
+
10
+ # Frontend Design System
11
+
12
+ > **Philosophy:** Every pixel has purpose. Restraint is luxury. User psychology drives decisions.
13
+ > **Core Principle:** THINK, don't memorize. ASK, don't assume.
14
+
15
+ ---
16
+
17
+ ## 🎯 Selective Reading Rule (MANDATORY)
18
+
19
+ **Read REQUIRED files always, OPTIONAL only when needed:**
20
+
21
+ | File | Status | When to Read |
22
+ |------|--------|--------------|
23
+ | [ux-psychology.md](ux-psychology.md) | 🔴 **REQUIRED** | Always read first! |
24
+ | [color-system.md](color-system.md) | ⚪ Optional | Color/palette decisions |
25
+ | [typography-system.md](typography-system.md) | ⚪ Optional | Font selection/pairing |
26
+ | [visual-effects.md](visual-effects.md) | ⚪ Optional | Glassmorphism, shadows, gradients |
27
+ | [animation-guide.md](animation-guide.md) | ⚪ Optional | Animation needed |
28
+ | [motion-graphics.md](motion-graphics.md) | Optional | Lottie, GSAP, 3D |
29
+ | [decision-trees.md](decision-trees.md) | ⚪ Optional | Context templates |
30
+
31
+ > 🔴 **ux-psychology.md = ALWAYS READ. Others = only if relevant.**
32
+
33
+ ---
34
+
35
+ ## 🔧 Runtime Scripts
36
+
37
+ **Execute these for audits (don't read, just run):**
38
+
39
+ | Script | Purpose | Usage |
40
+ |--------|---------|-------|
41
+ | `scripts/ux_audit.py` | UX Psychology & Accessibility Audit | `python scripts/ux_audit.py <project_path>` |
42
+
43
+ ---
44
+
45
+ ## ⚠️ CRITICAL: ASK BEFORE ASSUMING (MANDATORY)
46
+
47
+ > **STOP! If the user's request is open-ended, DO NOT default to your favorites.**
48
+
49
+ ### When User Prompt is Vague, ASK:
50
+
51
+ **Color not specified?** Ask:
52
+ > "What color palette do you prefer? (blue/green/orange/neutral/other?)"
53
+
54
+ **Style not specified?** Ask:
55
+ > "What style are you going for? (minimal/bold/retro/futuristic/organic?)"
56
+
57
+ **Layout not specified?** Ask:
58
+ > "Do you have a layout preference? (single column/grid/asymmetric/full-width?)"
59
+
60
+ ### ⛔ DEFAULT TENDENCIES TO AVOID (ANTI-SAFE HARBOR):
61
+
62
+ | AI Default Tendency | Why It's Bad | Think Instead |
63
+ |---------------------|--------------|---------------|
64
+ | **Bento Grids (Modern Cliché)** | Used in every AI design | Why does this content NEED a grid? |
65
+ | **Hero Split (Left/Right)** | Predictable & Boring | How about Massive Typography or Vertical Narrative? |
66
+ | **Mesh/Aurora Gradients** | The "new" lazy background | What's a radical color pairing? |
67
+ | **Glassmorphism** | AI's idea of "premium" | How about solid, high-contrast flat? |
68
+ | **Deep Cyan / Fintech Blue** | Safe harbor from purple ban | Why not Red, Black, or Neon Green? |
69
+ | **"Orchestrate / Empower"** | AI-generated copywriting | How would a human say this? |
70
+ | Dark background + neon glow | Overused, "AI look" | What does the BRAND actually need? |
71
+ | **Rounded everything** | Generic/Safe | Where can I use sharp, brutalist edges? |
72
+
73
+ > 🔴 **"Every 'safe' structure you choose brings you one step closer to a generic template. TAKE RISKS."**
74
+
75
+ ---
76
+
77
+ ## 1. Constraint Analysis (ALWAYS FIRST)
78
+
79
+ Before any design work, ANSWER THESE or ASK USER:
80
+
81
+ | Constraint | Question | Why It Matters |
82
+ |------------|----------|----------------|
83
+ | **Timeline** | How much time? | Determines complexity |
84
+ | **Content** | Ready or placeholder? | Affects layout flexibility |
85
+ | **Brand** | Existing guidelines? | May dictate colors/fonts |
86
+ | **Tech** | What stack? | Affects capabilities |
87
+ | **Audience** | Who exactly? | Drives all visual decisions |
88
+
89
+ ### Audience → Design Approach
90
+
91
+ | Audience | Think About |
92
+ |----------|-------------|
93
+ | **Gen Z** | Bold, fast, mobile-first, authentic |
94
+ | **Millennials** | Clean, minimal, value-driven |
95
+ | **Gen X** | Familiar, trustworthy, clear |
96
+ | **Boomers** | Readable, high contrast, simple |
97
+ | **B2B** | Professional, data-focused, trust |
98
+ | **Luxury** | Restrained elegance, whitespace |
99
+
100
+ ---
101
+
102
+ ## 2. UX Psychology Principles
103
+
104
+ ### Core Laws (Internalize These)
105
+
106
+ | Law | Principle | Application |
107
+ |-----|-----------|-------------|
108
+ | **Hick's Law** | More choices = slower decisions | Limit options, use progressive disclosure |
109
+ | **Fitts' Law** | Bigger + closer = easier to click | Size CTAs appropriately |
110
+ | **Miller's Law** | ~7 items in working memory | Chunk content into groups |
111
+ | **Von Restorff** | Different = memorable | Make CTAs visually distinct |
112
+ | **Serial Position** | First/last remembered most | Key info at start/end |
113
+
114
+ ### Emotional Design Levels
115
+
116
+ ```
117
+ VISCERAL (instant) → First impression: colors, imagery, overall feel
118
+ BEHAVIORAL (use) → Using it: speed, feedback, efficiency
119
+ REFLECTIVE (memory) → After: "I like what this says about me"
120
+ ```
121
+
122
+ ### Trust Building
123
+
124
+ - Security indicators on sensitive actions
125
+ - Social proof where relevant
126
+ - Clear contact/support access
127
+ - Consistent, professional design
128
+ - Transparent policies
129
+
130
+ ---
131
+
132
+ ## 3. Layout Principles
133
+
134
+ ### Golden Ratio (φ = 1.618)
135
+
136
+ ```
137
+ Use for proportional harmony:
138
+ ├── Content : Sidebar = roughly 62% : 38%
139
+ ├── Each heading size = previous × 1.618 (for dramatic scale)
140
+ ├── Spacing can follow: sm → md → lg (each × 1.618)
141
+ ```
142
+
143
+ ### 8-Point Grid Concept
144
+
145
+ ```
146
+ All spacing and sizing in multiples of 8:
147
+ ├── Tight: 4px (half-step for micro)
148
+ ├── Small: 8px
149
+ ├── Medium: 16px
150
+ ├── Large: 24px, 32px
151
+ ├── XL: 48px, 64px, 80px
152
+ └── Adjust based on content density
153
+ ```
154
+
155
+ ### Key Sizing Principles
156
+
157
+ | Element | Consideration |
158
+ |---------|---------------|
159
+ | **Touch targets** | Minimum comfortable tap size |
160
+ | **Buttons** | Height based on importance hierarchy |
161
+ | **Inputs** | Match button height for alignment |
162
+ | **Cards** | Consistent padding, breathable |
163
+ | **Reading width** | 45-75 characters optimal |
164
+
165
+ ---
166
+
167
+ ## 4. Color Principles
168
+
169
+ ### 60-30-10 Rule
170
+
171
+ ```
172
+ 60% → Primary/Background (calm, neutral base)
173
+ 30% → Secondary (supporting areas)
174
+ 10% Accent (CTAs, highlights, attention)
175
+ ```
176
+
177
+ ### Color Psychology (For Decision Making)
178
+
179
+ | If You Need... | Consider Hues | Avoid |
180
+ |----------------|---------------|-------|
181
+ | Trust, calm | Blue family | Aggressive reds |
182
+ | Growth, nature | Green family | Industrial grays |
183
+ | Energy, urgency | Orange, red | Passive blues |
184
+ | Luxury, creativity | Deep Teal, Gold, Emerald | Cheap-feeling brights |
185
+ | Clean, minimal | Neutrals | Overwhelming color |
186
+
187
+ ### Selection Process
188
+
189
+ 1. **What's the industry?** (narrows options)
190
+ 2. **What's the emotion?** (picks primary)
191
+ 3. **Light or dark mode?** (sets foundation)
192
+ 4. **ASK USER** if not specified
193
+
194
+ For detailed color theory: [color-system.md](color-system.md)
195
+
196
+ ---
197
+
198
+ ## 5. Typography Principles
199
+
200
+ ### Scale Selection
201
+
202
+ | Content Type | Scale Ratio | Feel |
203
+ |--------------|-------------|------|
204
+ | Dense UI | 1.125-1.2 | Compact, efficient |
205
+ | General web | 1.25 | Balanced (most common) |
206
+ | Editorial | 1.333 | Readable, spacious |
207
+ | Hero/display | 1.5-1.618 | Dramatic impact |
208
+
209
+ ### Pairing Concept
210
+
211
+ ```
212
+ Contrast + Harmony:
213
+ ├── DIFFERENT enough for hierarchy
214
+ ├── SIMILAR enough for cohesion
215
+ └── Usually: display + neutral, or serif + sans
216
+ ```
217
+
218
+ ### Readability Rules
219
+
220
+ - **Line length**: 45-75 characters optimal
221
+ - **Line height**: 1.4-1.6 for body text
222
+ - **Contrast**: Check WCAG requirements
223
+ - **Size**: 16px+ for body on web
224
+
225
+ For detailed typography: [typography-system.md](typography-system.md)
226
+
227
+ ---
228
+
229
+ ## 6. Visual Effects Principles
230
+
231
+ ### Glassmorphism (When Appropriate)
232
+
233
+ ```
234
+ Key properties:
235
+ ├── Semi-transparent background
236
+ ├── Backdrop blur
237
+ ├── Subtle border for definition
238
+ └── ⚠️ **WARNING:** Standard blue/white glassmorphism is a modern cliché. Use it radically or not at all.
239
+ ```
240
+
241
+ ### Shadow Hierarchy
242
+
243
+ ```
244
+ Elevation concept:
245
+ ├── Higher elements = larger shadows
246
+ ├── Y-offset > X-offset (light from above)
247
+ ├── Multiple layers = more realistic
248
+ └── Dark mode: may need glow instead
249
+ ```
250
+
251
+ ### Gradient Usage
252
+
253
+ ```
254
+ Harmonious gradients:
255
+ ├── Adjacent colors on wheel (analogous)
256
+ ├── OR same hue, different lightness
257
+ ├── Avoid harsh complementary pairs
258
+ ├── 🚫 **NO Mesh/Aurora Gradients** (floating blobs)
259
+ └── VARY from project to project radically
260
+ ```
261
+
262
+ For complete effects guide: [visual-effects.md](visual-effects.md)
263
+
264
+ ---
265
+
266
+ ## 7. Animation Principles
267
+
268
+ ### Timing Concept
269
+
270
+ ```
271
+ Duration based on:
272
+ ├── Distance (further = longer)
273
+ ├── Size (larger = slower)
274
+ ├── Importance (critical = clear)
275
+ └── Context (urgent = fast, luxury = slow)
276
+ ```
277
+
278
+ ### Easing Selection
279
+
280
+ | Action | Easing | Why |
281
+ |--------|--------|-----|
282
+ | Entering | Ease-out | Decelerate, settle in |
283
+ | Leaving | Ease-in | Accelerate, exit |
284
+ | Emphasis | Ease-in-out | Smooth, deliberate |
285
+ | Playful | Bounce | Fun, energetic |
286
+
287
+ ### Performance
288
+
289
+ - Animate only transform and opacity
290
+ - Respect reduced-motion preference
291
+ - Test on low-end devices
292
+
293
+ For animation patterns: [animation-guide.md](animation-guide.md), for advanced: [motion-graphics.md](motion-graphics.md)
294
+
295
+ ---
296
+
297
+ ## 8. "Wow Factor" Checklist
298
+
299
+ ### Premium Indicators
300
+
301
+ - [ ] Generous whitespace (luxury = breathing room)
302
+ - [ ] Subtle depth and dimension
303
+ - [ ] Smooth, purposeful animations
304
+ - [ ] Attention to detail (alignment, consistency)
305
+ - [ ] Cohesive visual rhythm
306
+ - [ ] Custom elements (not all defaults)
307
+
308
+ ### Trust Builders
309
+
310
+ - [ ] Security cues where appropriate
311
+ - [ ] Social proof / testimonials
312
+ - [ ] Clear value proposition
313
+ - [ ] Professional imagery
314
+ - [ ] Consistent design language
315
+
316
+ ### Emotional Triggers
317
+
318
+ - [ ] Hero that evokes intended emotion
319
+ - [ ] Human elements (faces, stories)
320
+ - [ ] Progress/achievement indicators
321
+ - [ ] Moments of delight
322
+
323
+ ---
324
+
325
+ ## 9. Anti-Patterns (What NOT to Do)
326
+
327
+ ### Lazy Design Indicators
328
+
329
+ - Default system fonts without consideration
330
+ - Stock imagery that doesn't match
331
+ - Inconsistent spacing
332
+ - Too many competing colors
333
+ - Walls of text without hierarchy
334
+ - Inaccessible contrast
335
+
336
+ ### AI Tendency Patterns (AVOID!)
337
+
338
+ - **Same colors every project**
339
+ - **Dark + neon as default**
340
+ - **Purple/violet everything (PURPLE BAN ✅)**
341
+ - **Bento grids for simple landing pages**
342
+ - **Mesh Gradients & Glow Effects**
343
+ - **Same layout structure / Vercel clone**
344
+ - **Not asking user preferences**
345
+
346
+ ### Dark Patterns (Unethical)
347
+
348
+ - Hidden costs
349
+ - Fake urgency
350
+ - Forced actions
351
+ - Deceptive UI
352
+ - Confirmshaming
353
+
354
+ ---
355
+
356
+ ## 10. Decision Process Summary
357
+
358
+ ```
359
+ For EVERY design task:
360
+
361
+ 1. CONSTRAINTS
362
+ └── What's the timeline, brand, tech, audience?
363
+ └── If unclear → ASK
364
+
365
+ 2. CONTENT
366
+ └── What content exists?
367
+ └── What's the hierarchy?
368
+
369
+ 3. STYLE DIRECTION
370
+ └── What's appropriate for context?
371
+ └── If unclear → ASK (don't default!)
372
+
373
+ 4. EXECUTION
374
+ └── Apply principles above
375
+ └── Check against anti-patterns
376
+
377
+ 5. REVIEW
378
+ └── "Does this serve the user?"
379
+ └── "Is this different from my defaults?"
380
+ └── "Would I be proud of this?"
381
+ ```
382
+
383
+ ---
384
+
385
+ ## Reference Files
386
+
387
+ For deeper guidance on specific areas:
388
+
389
+ - [color-system.md](color-system.md) - Color theory and selection process
390
+ - [typography-system.md](typography-system.md) - Font pairing and scale decisions
391
+ - [visual-effects.md](visual-effects.md) - Effects principles and techniques
392
+ - [animation-guide.md](animation-guide.md) - Motion design principles
393
+ - [motion-graphics.md](motion-graphics.md) - Advanced: Lottie, GSAP, SVG, 3D, Particles
394
+ - [decision-trees.md](decision-trees.md) - Context-specific templates
395
+ - [ux-psychology.md](ux-psychology.md) - User psychology deep dive
396
+
397
+ ---
398
+
399
+ ## Related Skills
400
+
401
+ | Skill | When to Use |
402
+ |-------|-------------|
403
+ | **frontend-design** (this) | Before coding - Learn design principles (color, typography, UX psychology) |
404
+ | **[web-design-guidelines](../web-design-guidelines/SKILL.md)** | After coding - Audit for accessibility, performance, and best practices |
405
+
406
+ ## Post-Design Workflow
407
+
408
+ After implementing your design, run the audit:
409
+
410
+ ```
411
+ 1. DESIGN Read frontend-design principles ← YOU ARE HERE
412
+ 2. CODE → Implement the design
413
+ 3. AUDIT → Run web-design-guidelines review
414
+ 4. FIX → Address findings from audit
415
+ ```
416
+
417
+ > **Next Step:** After coding, use `web-design-guidelines` skill to audit your implementation for accessibility, focus states, animations, and performance issues.
418
+
419
+ ---
420
+
421
+ > **Remember:** Design is THINKING, not copying. Every project deserves fresh consideration based on its unique context and users. **Avoid the Modern SaaS Safe Harbor!**