create-modern-react 2.1.2 β†’ 2.1.3

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 (102) hide show
  1. package/README.md +19 -0
  2. package/lib/prompts.js +1 -0
  3. package/lib/setup.js +3 -0
  4. package/package.json +1 -1
  5. package/templates/base/.claude/skills/agent-browser/SKILL.md +356 -0
  6. package/templates/base/.claude/skills/agent-browser/references/authentication.md +188 -0
  7. package/templates/base/.claude/skills/agent-browser/references/proxy-support.md +175 -0
  8. package/templates/base/.claude/skills/agent-browser/references/session-management.md +181 -0
  9. package/templates/base/.claude/skills/agent-browser/references/snapshot-refs.md +186 -0
  10. package/templates/base/.claude/skills/agent-browser/references/video-recording.md +162 -0
  11. package/templates/base/.claude/skills/agent-browser/templates/authenticated-session.sh +91 -0
  12. package/templates/base/.claude/skills/agent-browser/templates/capture-workflow.sh +68 -0
  13. package/templates/base/.claude/skills/agent-browser/templates/form-automation.sh +64 -0
  14. package/templates/base/.claude/skills/autoskill/skill.md +134 -0
  15. package/templates/base/.claude/skills/design-principles/skill.md +237 -0
  16. package/templates/base/.claude/skills/frontend-design/skill.md +42 -0
  17. package/templates/base/.claude/skills/learn-together/skill.md +448 -0
  18. package/templates/base/.claude/skills/question-me/skill.md +175 -0
  19. package/templates/base/.claude/skills/react-best-practices/AGENTS.md +2410 -0
  20. package/templates/base/.claude/skills/react-best-practices/README.md +123 -0
  21. package/templates/base/.claude/skills/react-best-practices/SKILL.md +135 -0
  22. package/templates/base/.claude/skills/react-best-practices/metadata.json +15 -0
  23. package/templates/base/.claude/skills/react-best-practices/rules/_sections.md +46 -0
  24. package/templates/base/.claude/skills/react-best-practices/rules/_template.md +28 -0
  25. package/templates/base/.claude/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  26. package/templates/base/.claude/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
  27. package/templates/base/.claude/skills/react-best-practices/rules/async-api-routes.md +38 -0
  28. package/templates/base/.claude/skills/react-best-practices/rules/async-defer-await.md +80 -0
  29. package/templates/base/.claude/skills/react-best-practices/rules/async-dependencies.md +36 -0
  30. package/templates/base/.claude/skills/react-best-practices/rules/async-parallel.md +28 -0
  31. package/templates/base/.claude/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  32. package/templates/base/.claude/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  33. package/templates/base/.claude/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  34. package/templates/base/.claude/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  35. package/templates/base/.claude/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  36. package/templates/base/.claude/skills/react-best-practices/rules/bundle-preload.md +50 -0
  37. package/templates/base/.claude/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  38. package/templates/base/.claude/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
  39. package/templates/base/.claude/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  40. package/templates/base/.claude/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  41. package/templates/base/.claude/skills/react-best-practices/rules/js-batch-dom-css.md +57 -0
  42. package/templates/base/.claude/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  43. package/templates/base/.claude/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  44. package/templates/base/.claude/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  45. package/templates/base/.claude/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  46. package/templates/base/.claude/skills/react-best-practices/rules/js-early-exit.md +50 -0
  47. package/templates/base/.claude/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  48. package/templates/base/.claude/skills/react-best-practices/rules/js-index-maps.md +37 -0
  49. package/templates/base/.claude/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  50. package/templates/base/.claude/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  51. package/templates/base/.claude/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  52. package/templates/base/.claude/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  53. package/templates/base/.claude/skills/react-best-practices/rules/rendering-activity.md +26 -0
  54. package/templates/base/.claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  55. package/templates/base/.claude/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  56. package/templates/base/.claude/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  57. package/templates/base/.claude/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  58. package/templates/base/.claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  59. package/templates/base/.claude/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  60. package/templates/base/.claude/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  61. package/templates/base/.claude/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  62. package/templates/base/.claude/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  63. package/templates/base/.claude/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  64. package/templates/base/.claude/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  65. package/templates/base/.claude/skills/react-best-practices/rules/rerender-memo.md +44 -0
  66. package/templates/base/.claude/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  67. package/templates/base/.claude/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  68. package/templates/base/.claude/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  69. package/templates/base/.claude/skills/react-best-practices/rules/server-cache-react.md +76 -0
  70. package/templates/base/.claude/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
  71. package/templates/base/.claude/skills/react-best-practices/rules/server-serialization.md +38 -0
  72. package/templates/base/.claude/skills/ui-ux-pro-max/SKILL.md +377 -0
  73. package/templates/base/.claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
  74. package/templates/base/.claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
  75. package/templates/base/.claude/skills/ui-ux-pro-max/data/icons.csv +101 -0
  76. package/templates/base/.claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
  77. package/templates/base/.claude/skills/ui-ux-pro-max/data/products.csv +97 -0
  78. package/templates/base/.claude/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  79. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  80. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  81. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  82. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  83. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  84. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  85. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  86. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +53 -0
  87. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  88. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  89. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  90. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  91. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  92. package/templates/base/.claude/skills/ui-ux-pro-max/data/styles.csv +68 -0
  93. package/templates/base/.claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
  94. package/templates/base/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  95. package/templates/base/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  96. package/templates/base/.claude/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  97. package/templates/base/.claude/skills/ui-ux-pro-max/scripts/core.py +253 -0
  98. package/templates/base/.claude/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  99. package/templates/base/.claude/skills/ui-ux-pro-max/scripts/search.py +106 -0
  100. package/templates/base/public/robots.txt +2 -0
  101. package/templates/base/public/vite.svg +1 -0
  102. package/templates/base/src/screens/home/index.tsx +15 -2
@@ -0,0 +1,76 @@
1
+ ---
2
+ title: Per-Request Deduplication with React.cache()
3
+ impact: MEDIUM
4
+ impactDescription: deduplicates within request
5
+ tags: server, cache, react-cache, deduplication
6
+ ---
7
+
8
+ ## Per-Request Deduplication with React.cache()
9
+
10
+ Use `React.cache()` for server-side request deduplication. Authentication and database queries benefit most.
11
+
12
+ **Usage:**
13
+
14
+ ```typescript
15
+ import { cache } from 'react'
16
+
17
+ export const getCurrentUser = cache(async () => {
18
+ const session = await auth()
19
+ if (!session?.user?.id) return null
20
+ return await db.user.findUnique({
21
+ where: { id: session.user.id }
22
+ })
23
+ })
24
+ ```
25
+
26
+ Within a single request, multiple calls to `getCurrentUser()` execute the query only once.
27
+
28
+ **Avoid inline objects as arguments:**
29
+
30
+ `React.cache()` uses shallow equality (`Object.is`) to determine cache hits. Inline objects create new references each call, preventing cache hits.
31
+
32
+ **Incorrect (always cache miss):**
33
+
34
+ ```typescript
35
+ const getUser = cache(async (params: { uid: number }) => {
36
+ return await db.user.findUnique({ where: { id: params.uid } })
37
+ })
38
+
39
+ // Each call creates new object, never hits cache
40
+ getUser({ uid: 1 })
41
+ getUser({ uid: 1 }) // Cache miss, runs query again
42
+ ```
43
+
44
+ **Correct (cache hit):**
45
+
46
+ ```typescript
47
+ const getUser = cache(async (uid: number) => {
48
+ return await db.user.findUnique({ where: { id: uid } })
49
+ })
50
+
51
+ // Primitive args use value equality
52
+ getUser(1)
53
+ getUser(1) // Cache hit, returns cached result
54
+ ```
55
+
56
+ If you must pass objects, pass the same reference:
57
+
58
+ ```typescript
59
+ const params = { uid: 1 }
60
+ getUser(params) // Query runs
61
+ getUser(params) // Cache hit (same reference)
62
+ ```
63
+
64
+ **Next.js-Specific Note:**
65
+
66
+ In Next.js, the `fetch` API is automatically extended with request memoization. Requests with the same URL and options are automatically deduplicated within a single request, so you don't need `React.cache()` for `fetch` calls. However, `React.cache()` is still essential for other async tasks:
67
+
68
+ - Database queries (Prisma, Drizzle, etc.)
69
+ - Heavy computations
70
+ - Authentication checks
71
+ - File system operations
72
+ - Any non-fetch async work
73
+
74
+ Use `React.cache()` to deduplicate these operations across your component tree.
75
+
76
+ Reference: [React.cache documentation](https://react.dev/reference/react/cache)
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: Parallel Data Fetching with Component Composition
3
+ impact: CRITICAL
4
+ impactDescription: eliminates server-side waterfalls
5
+ tags: server, rsc, parallel-fetching, composition
6
+ ---
7
+
8
+ ## Parallel Data Fetching with Component Composition
9
+
10
+ React Server Components execute sequentially within a tree. Restructure with composition to parallelize data fetching.
11
+
12
+ **Incorrect (Sidebar waits for Page's fetch to complete):**
13
+
14
+ ```tsx
15
+ export default async function Page() {
16
+ const header = await fetchHeader()
17
+ return (
18
+ <div>
19
+ <div>{header}</div>
20
+ <Sidebar />
21
+ </div>
22
+ )
23
+ }
24
+
25
+ async function Sidebar() {
26
+ const items = await fetchSidebarItems()
27
+ return <nav>{items.map(renderItem)}</nav>
28
+ }
29
+ ```
30
+
31
+ **Correct (both fetch simultaneously):**
32
+
33
+ ```tsx
34
+ async function Header() {
35
+ const data = await fetchHeader()
36
+ return <div>{data}</div>
37
+ }
38
+
39
+ async function Sidebar() {
40
+ const items = await fetchSidebarItems()
41
+ return <nav>{items.map(renderItem)}</nav>
42
+ }
43
+
44
+ export default function Page() {
45
+ return (
46
+ <div>
47
+ <Header />
48
+ <Sidebar />
49
+ </div>
50
+ )
51
+ }
52
+ ```
53
+
54
+ **Alternative with children prop:**
55
+
56
+ ```tsx
57
+ async function Header() {
58
+ const data = await fetchHeader()
59
+ return <div>{data}</div>
60
+ }
61
+
62
+ async function Sidebar() {
63
+ const items = await fetchSidebarItems()
64
+ return <nav>{items.map(renderItem)}</nav>
65
+ }
66
+
67
+ function Layout({ children }: { children: ReactNode }) {
68
+ return (
69
+ <div>
70
+ <Header />
71
+ {children}
72
+ </div>
73
+ )
74
+ }
75
+
76
+ export default function Page() {
77
+ return (
78
+ <Layout>
79
+ <Sidebar />
80
+ </Layout>
81
+ )
82
+ }
83
+ ```
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: Minimize Serialization at RSC Boundaries
3
+ impact: HIGH
4
+ impactDescription: reduces data transfer size
5
+ tags: server, rsc, serialization, props
6
+ ---
7
+
8
+ ## Minimize Serialization at RSC Boundaries
9
+
10
+ The React Server/Client boundary serializes all object properties into strings and embeds them in the HTML response and subsequent RSC requests. This serialized data directly impacts page weight and load time, so **size matters a lot**. Only pass fields that the client actually uses.
11
+
12
+ **Incorrect (serializes all 50 fields):**
13
+
14
+ ```tsx
15
+ async function Page() {
16
+ const user = await fetchUser() // 50 fields
17
+ return <Profile user={user} />
18
+ }
19
+
20
+ 'use client'
21
+ function Profile({ user }: { user: User }) {
22
+ return <div>{user.name}</div> // uses 1 field
23
+ }
24
+ ```
25
+
26
+ **Correct (serializes only 1 field):**
27
+
28
+ ```tsx
29
+ async function Page() {
30
+ const user = await fetchUser()
31
+ return <Profile name={user.name} />
32
+ }
33
+
34
+ 'use client'
35
+ function Profile({ name }: { name: string }) {
36
+ return <div>{name}</div>
37
+ }
38
+ ```
@@ -0,0 +1,377 @@
1
+ ---
2
+ name: ui-ux-pro-max
3
+ description: "UI/UX design intelligence. 67 styles, 96 palettes, 56 font pairings, 25 charts, 13 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples."
4
+ ---
5
+ # UI/UX Pro Max - Design Intelligence
6
+
7
+ Comprehensive design guide for web and mobile applications. Contains 67 styles, 96 color palettes, 56 font pairings, 98 UX guidelines, and 25 chart types across 13 technology stacks. Searchable database with priority-based recommendations.
8
+
9
+ ## When to Apply
10
+
11
+ Reference these guidelines when:
12
+ - Designing new UI components or pages
13
+ - Choosing color palettes and typography
14
+ - Reviewing code for UX issues
15
+ - Building landing pages or dashboards
16
+ - Implementing accessibility requirements
17
+
18
+ ## Rule Categories by Priority
19
+
20
+ | Priority | Category | Impact | Domain |
21
+ |----------|----------|--------|--------|
22
+ | 1 | Accessibility | CRITICAL | `ux` |
23
+ | 2 | Touch & Interaction | CRITICAL | `ux` |
24
+ | 3 | Performance | HIGH | `ux` |
25
+ | 4 | Layout & Responsive | HIGH | `ux` |
26
+ | 5 | Typography & Color | MEDIUM | `typography`, `color` |
27
+ | 6 | Animation | MEDIUM | `ux` |
28
+ | 7 | Style Selection | MEDIUM | `style`, `product` |
29
+ | 8 | Charts & Data | LOW | `chart` |
30
+
31
+ ## Quick Reference
32
+
33
+ ### 1. Accessibility (CRITICAL)
34
+
35
+ - `color-contrast` - Minimum 4.5:1 ratio for normal text
36
+ - `focus-states` - Visible focus rings on interactive elements
37
+ - `alt-text` - Descriptive alt text for meaningful images
38
+ - `aria-labels` - aria-label for icon-only buttons
39
+ - `keyboard-nav` - Tab order matches visual order
40
+ - `form-labels` - Use label with for attribute
41
+
42
+ ### 2. Touch & Interaction (CRITICAL)
43
+
44
+ - `touch-target-size` - Minimum 44x44px touch targets
45
+ - `hover-vs-tap` - Use click/tap for primary interactions
46
+ - `loading-buttons` - Disable button during async operations
47
+ - `error-feedback` - Clear error messages near problem
48
+ - `cursor-pointer` - Add cursor-pointer to clickable elements
49
+
50
+ ### 3. Performance (HIGH)
51
+
52
+ - `image-optimization` - Use WebP, srcset, lazy loading
53
+ - `reduced-motion` - Check prefers-reduced-motion
54
+ - `content-jumping` - Reserve space for async content
55
+
56
+ ### 4. Layout & Responsive (HIGH)
57
+
58
+ - `viewport-meta` - width=device-width initial-scale=1
59
+ - `readable-font-size` - Minimum 16px body text on mobile
60
+ - `horizontal-scroll` - Ensure content fits viewport width
61
+ - `z-index-management` - Define z-index scale (10, 20, 30, 50)
62
+
63
+ ### 5. Typography & Color (MEDIUM)
64
+
65
+ - `line-height` - Use 1.5-1.75 for body text
66
+ - `line-length` - Limit to 65-75 characters per line
67
+ - `font-pairing` - Match heading/body font personalities
68
+
69
+ ### 6. Animation (MEDIUM)
70
+
71
+ - `duration-timing` - Use 150-300ms for micro-interactions
72
+ - `transform-performance` - Use transform/opacity, not width/height
73
+ - `loading-states` - Skeleton screens or spinners
74
+
75
+ ### 7. Style Selection (MEDIUM)
76
+
77
+ - `style-match` - Match style to product type
78
+ - `consistency` - Use same style across all pages
79
+ - `no-emoji-icons` - Use SVG icons, not emojis
80
+
81
+ ### 8. Charts & Data (LOW)
82
+
83
+ - `chart-type` - Match chart type to data type
84
+ - `color-guidance` - Use accessible color palettes
85
+ - `data-table` - Provide table alternative for accessibility
86
+
87
+ ## How to Use
88
+
89
+ Search specific domains using the CLI tool below.
90
+
91
+ ---
92
+
93
+
94
+ ## Prerequisites
95
+
96
+ Check if Python is installed:
97
+
98
+ ```bash
99
+ python3 --version || python --version
100
+ ```
101
+
102
+ If Python is not installed, install it based on user's OS:
103
+
104
+ **macOS:**
105
+ ```bash
106
+ brew install python3
107
+ ```
108
+
109
+ **Ubuntu/Debian:**
110
+ ```bash
111
+ sudo apt update && sudo apt install python3
112
+ ```
113
+
114
+ **Windows:**
115
+ ```powershell
116
+ winget install Python.Python.3.12
117
+ ```
118
+
119
+ ---
120
+
121
+ ## How to Use This Skill
122
+
123
+ When user requests UI/UX work (design, build, create, implement, review, fix, improve), follow this workflow:
124
+
125
+ ### Step 1: Analyze User Requirements
126
+
127
+ Extract key information from user request:
128
+ - **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
129
+ - **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
130
+ - **Industry**: healthcare, fintech, gaming, education, etc.
131
+ - **Stack**: React, Vue, Next.js, or default to `html-tailwind`
132
+
133
+ ### Step 2: Generate Design System (REQUIRED)
134
+
135
+ **Always start with `--design-system`** to get comprehensive recommendations with reasoning:
136
+
137
+ ```bash
138
+ python3 skills/ui-ux-pro-max/scripts/search.py "<product_type> <industry> <keywords>" --design-system [-p "Project Name"]
139
+ ```
140
+
141
+ This command:
142
+ 1. Searches 5 domains in parallel (product, style, color, landing, typography)
143
+ 2. Applies reasoning rules from `ui-reasoning.csv` to select best matches
144
+ 3. Returns complete design system: pattern, style, colors, typography, effects
145
+ 4. Includes anti-patterns to avoid
146
+
147
+ **Example:**
148
+ ```bash
149
+ python3 skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness service" --design-system -p "Serenity Spa"
150
+ ```
151
+
152
+ ### Step 2b: Persist Design System (Master + Overrides Pattern)
153
+
154
+ To save the design system for hierarchical retrieval across sessions, add `--persist`:
155
+
156
+ ```bash
157
+ python3 skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name"
158
+ ```
159
+
160
+ This creates:
161
+ - `design-system/MASTER.md` β€” Global Source of Truth with all design rules
162
+ - `design-system/pages/` β€” Folder for page-specific overrides
163
+
164
+ **With page-specific override:**
165
+ ```bash
166
+ python3 skills/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name" --page "dashboard"
167
+ ```
168
+
169
+ This also creates:
170
+ - `design-system/pages/dashboard.md` β€” Page-specific deviations from Master
171
+
172
+ **How hierarchical retrieval works:**
173
+ 1. When building a specific page (e.g., "Checkout"), first check `design-system/pages/checkout.md`
174
+ 2. If the page file exists, its rules **override** the Master file
175
+ 3. If not, use `design-system/MASTER.md` exclusively
176
+
177
+ ### Step 3: Supplement with Detailed Searches (as needed)
178
+
179
+ After getting the design system, use domain searches to get additional details:
180
+
181
+ ```bash
182
+ python3 skills/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
183
+ ```
184
+
185
+ **When to use detailed searches:**
186
+
187
+ | Need | Domain | Example |
188
+ |------|--------|---------|
189
+ | More style options | `style` | `--domain style "glassmorphism dark"` |
190
+ | Chart recommendations | `chart` | `--domain chart "real-time dashboard"` |
191
+ | UX best practices | `ux` | `--domain ux "animation accessibility"` |
192
+ | Alternative fonts | `typography` | `--domain typography "elegant luxury"` |
193
+ | Landing structure | `landing` | `--domain landing "hero social-proof"` |
194
+
195
+ ### Step 4: Stack Guidelines (Default: html-tailwind)
196
+
197
+ Get implementation-specific best practices. If user doesn't specify a stack, **default to `html-tailwind`**.
198
+
199
+ ```bash
200
+ python3 skills/ui-ux-pro-max/scripts/search.py "<keyword>" --stack html-tailwind
201
+ ```
202
+
203
+ Available stacks: `html-tailwind`, `react`, `nextjs`, `vue`, `svelte`, `swiftui`, `react-native`, `flutter`, `shadcn`, `jetpack-compose`
204
+
205
+ ---
206
+
207
+ ## Search Reference
208
+
209
+ ### Available Domains
210
+
211
+ | Domain | Use For | Example Keywords |
212
+ |--------|---------|------------------|
213
+ | `product` | Product type recommendations | SaaS, e-commerce, portfolio, healthcare, beauty, service |
214
+ | `style` | UI styles, colors, effects | glassmorphism, minimalism, dark mode, brutalism |
215
+ | `typography` | Font pairings, Google Fonts | elegant, playful, professional, modern |
216
+ | `color` | Color palettes by product type | saas, ecommerce, healthcare, beauty, fintech, service |
217
+ | `landing` | Page structure, CTA strategies | hero, hero-centric, testimonial, pricing, social-proof |
218
+ | `chart` | Chart types, library recommendations | trend, comparison, timeline, funnel, pie |
219
+ | `ux` | Best practices, anti-patterns | animation, accessibility, z-index, loading |
220
+ | `react` | React/Next.js performance | waterfall, bundle, suspense, memo, rerender, cache |
221
+ | `web` | Web interface guidelines | aria, focus, keyboard, semantic, virtualize |
222
+ | `prompt` | AI prompts, CSS keywords | (style name) |
223
+
224
+ ### Available Stacks
225
+
226
+ | Stack | Focus |
227
+ |-------|-------|
228
+ | `html-tailwind` | Tailwind utilities, responsive, a11y (DEFAULT) |
229
+ | `react` | State, hooks, performance, patterns |
230
+ | `nextjs` | SSR, routing, images, API routes |
231
+ | `vue` | Composition API, Pinia, Vue Router |
232
+ | `svelte` | Runes, stores, SvelteKit |
233
+ | `swiftui` | Views, State, Navigation, Animation |
234
+ | `react-native` | Components, Navigation, Lists |
235
+ | `flutter` | Widgets, State, Layout, Theming |
236
+ | `shadcn` | shadcn/ui components, theming, forms, patterns |
237
+ | `jetpack-compose` | Composables, Modifiers, State Hoisting, Recomposition |
238
+
239
+ ---
240
+
241
+ ## Example Workflow
242
+
243
+ **User request:** "LΓ m landing page cho dα»‹ch vα»₯ chΔƒm sΓ³c da chuyΓͺn nghiệp"
244
+
245
+ ### Step 1: Analyze Requirements
246
+ - Product type: Beauty/Spa service
247
+ - Style keywords: elegant, professional, soft
248
+ - Industry: Beauty/Wellness
249
+ - Stack: html-tailwind (default)
250
+
251
+ ### Step 2: Generate Design System (REQUIRED)
252
+
253
+ ```bash
254
+ python3 skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness service elegant" --design-system -p "Serenity Spa"
255
+ ```
256
+
257
+ **Output:** Complete design system with pattern, style, colors, typography, effects, and anti-patterns.
258
+
259
+ ### Step 3: Supplement with Detailed Searches (as needed)
260
+
261
+ ```bash
262
+ # Get UX guidelines for animation and accessibility
263
+ python3 skills/ui-ux-pro-max/scripts/search.py "animation accessibility" --domain ux
264
+
265
+ # Get alternative typography options if needed
266
+ python3 skills/ui-ux-pro-max/scripts/search.py "elegant luxury serif" --domain typography
267
+ ```
268
+
269
+ ### Step 4: Stack Guidelines
270
+
271
+ ```bash
272
+ python3 skills/ui-ux-pro-max/scripts/search.py "layout responsive form" --stack html-tailwind
273
+ ```
274
+
275
+ **Then:** Synthesize design system + detailed searches and implement the design.
276
+
277
+ ---
278
+
279
+ ## Output Formats
280
+
281
+ The `--design-system` flag supports two output formats:
282
+
283
+ ```bash
284
+ # ASCII box (default) - best for terminal display
285
+ python3 skills/ui-ux-pro-max/scripts/search.py "fintech crypto" --design-system
286
+
287
+ # Markdown - best for documentation
288
+ python3 skills/ui-ux-pro-max/scripts/search.py "fintech crypto" --design-system -f markdown
289
+ ```
290
+
291
+ ---
292
+
293
+ ## Tips for Better Results
294
+
295
+ 1. **Be specific with keywords** - "healthcare SaaS dashboard" > "app"
296
+ 2. **Search multiple times** - Different keywords reveal different insights
297
+ 3. **Combine domains** - Style + Typography + Color = Complete design system
298
+ 4. **Always check UX** - Search "animation", "z-index", "accessibility" for common issues
299
+ 5. **Use stack flag** - Get implementation-specific best practices
300
+ 6. **Iterate** - If first search doesn't match, try different keywords
301
+
302
+ ---
303
+
304
+ ## Common Rules for Professional UI
305
+
306
+ These are frequently overlooked issues that make UI look unprofessional:
307
+
308
+ ### Icons & Visual Elements
309
+
310
+ | Rule | Do | Don't |
311
+ |------|----|----- |
312
+ | **No emoji icons** | Use SVG icons (Heroicons, Lucide, Simple Icons) | Use emojis like 🎨 πŸš€ βš™οΈ as UI icons |
313
+ | **Stable hover states** | Use color/opacity transitions on hover | Use scale transforms that shift layout |
314
+ | **Correct brand logos** | Research official SVG from Simple Icons | Guess or use incorrect logo paths |
315
+ | **Consistent icon sizing** | Use fixed viewBox (24x24) with w-6 h-6 | Mix different icon sizes randomly |
316
+
317
+ ### Interaction & Cursor
318
+
319
+ | Rule | Do | Don't |
320
+ |------|----|----- |
321
+ | **Cursor pointer** | Add `cursor-pointer` to all clickable/hoverable cards | Leave default cursor on interactive elements |
322
+ | **Hover feedback** | Provide visual feedback (color, shadow, border) | No indication element is interactive |
323
+ | **Smooth transitions** | Use `transition-colors duration-200` | Instant state changes or too slow (>500ms) |
324
+
325
+ ### Light/Dark Mode Contrast
326
+
327
+ | Rule | Do | Don't |
328
+ |------|----|----- |
329
+ | **Glass card light mode** | Use `bg-white/80` or higher opacity | Use `bg-white/10` (too transparent) |
330
+ | **Text contrast light** | Use `#0F172A` (slate-900) for text | Use `#94A3B8` (slate-400) for body text |
331
+ | **Muted text light** | Use `#475569` (slate-600) minimum | Use gray-400 or lighter |
332
+ | **Border visibility** | Use `border-gray-200` in light mode | Use `border-white/10` (invisible) |
333
+
334
+ ### Layout & Spacing
335
+
336
+ | Rule | Do | Don't |
337
+ |------|----|----- |
338
+ | **Floating navbar** | Add `top-4 left-4 right-4` spacing | Stick navbar to `top-0 left-0 right-0` |
339
+ | **Content padding** | Account for fixed navbar height | Let content hide behind fixed elements |
340
+ | **Consistent max-width** | Use same `max-w-6xl` or `max-w-7xl` | Mix different container widths |
341
+
342
+ ---
343
+
344
+ ## Pre-Delivery Checklist
345
+
346
+ Before delivering UI code, verify these items:
347
+
348
+ ### Visual Quality
349
+ - [ ] No emojis used as icons (use SVG instead)
350
+ - [ ] All icons from consistent icon set (Heroicons/Lucide)
351
+ - [ ] Brand logos are correct (verified from Simple Icons)
352
+ - [ ] Hover states don't cause layout shift
353
+ - [ ] Use theme colors directly (bg-primary) not var() wrapper
354
+
355
+ ### Interaction
356
+ - [ ] All clickable elements have `cursor-pointer`
357
+ - [ ] Hover states provide clear visual feedback
358
+ - [ ] Transitions are smooth (150-300ms)
359
+ - [ ] Focus states visible for keyboard navigation
360
+
361
+ ### Light/Dark Mode
362
+ - [ ] Light mode text has sufficient contrast (4.5:1 minimum)
363
+ - [ ] Glass/transparent elements visible in light mode
364
+ - [ ] Borders visible in both modes
365
+ - [ ] Test both modes before delivery
366
+
367
+ ### Layout
368
+ - [ ] Floating elements have proper spacing from edges
369
+ - [ ] No content hidden behind fixed navbars
370
+ - [ ] Responsive at 375px, 768px, 1024px, 1440px
371
+ - [ ] No horizontal scroll on mobile
372
+
373
+ ### Accessibility
374
+ - [ ] All images have alt text
375
+ - [ ] Form inputs have labels
376
+ - [ ] Color is not the only indicator
377
+ - [ ] `prefers-reduced-motion` respected
@@ -0,0 +1,26 @@
1
+ No,Data Type,Keywords,Best Chart Type,Secondary Options,Color Guidance,Performance Impact,Accessibility Notes,Library Recommendation,Interactive Level
2
+ 1,Trend Over Time,"trend, time-series, line, growth, timeline, progress",Line Chart,"Area Chart, Smooth Area",Primary: #0080FF. Multiple series: use distinct colors. Fill: 20% opacity,⚑ Excellent (optimized),βœ“ Clear line patterns for colorblind users. Add pattern overlays.,"Chart.js, Recharts, ApexCharts",Hover + Zoom
3
+ 2,Compare Categories,"compare, categories, bar, comparison, ranking",Bar Chart (Horizontal or Vertical),"Column Chart, Grouped Bar",Each bar: distinct color. Category: grouped same color. Sorted: descending order,⚑ Excellent,βœ“ Easy to compare. Add value labels on bars for clarity.,"Chart.js, Recharts, D3.js",Hover + Sort
4
+ 3,Part-to-Whole,"part-to-whole, pie, donut, percentage, proportion, share",Pie Chart or Donut,"Stacked Bar, Treemap",Colors: 5-6 max. Contrasting palette. Large slices first. Use labels.,⚑ Good (limit 6 slices),⚠ Hard for accessibility. Better: Stacked bar with legend. Avoid pie if >5 items.,"Chart.js, Recharts, D3.js",Hover + Drill
5
+ 4,Correlation/Distribution,"correlation, distribution, scatter, relationship, pattern",Scatter Plot or Bubble Chart,"Heat Map, Matrix",Color axis: gradient (blue-red). Size: relative. Opacity: 0.6-0.8 to show density,⚠ Moderate (many points),⚠ Provide data table alternative. Use pattern + color distinction.,"D3.js, Plotly, Recharts",Hover + Brush
6
+ 5,Heatmap/Intensity,"heatmap, heat-map, intensity, density, matrix",Heat Map or Choropleth,"Grid Heat Map, Bubble Heat",Gradient: Cool (blue) to Hot (red). Scale: clear legend. Divergent for ±data,⚑ Excellent (color CSS),⚠ Colorblind: Use pattern overlay. Provide numerical legend.,"D3.js, Plotly, ApexCharts",Hover + Zoom
7
+ 6,Geographic Data,"geographic, map, location, region, geo, spatial","Choropleth Map, Bubble Map",Geographic Heat Map,Regional: single color gradient or categorized colors. Legend: clear scale,⚠ Moderate (rendering),⚠ Include text labels for regions. Provide data table alternative.,"D3.js, Mapbox, Leaflet",Pan + Zoom + Drill
8
+ 7,Funnel/Flow,funnel/flow,"Funnel Chart, Sankey",Waterfall (for flows),Stages: gradient (starting color β†’ ending color). Show conversion %,⚑ Good,βœ“ Clear stage labels + percentages. Good for accessibility if labeled.,"D3.js, Recharts, Custom SVG",Hover + Drill
9
+ 8,Performance vs Target,performance-vs-target,Gauge Chart or Bullet Chart,"Dial, Thermometer",Performance: Redβ†’Yellowβ†’Green gradient. Target: marker line. Threshold colors,⚑ Good,βœ“ Add numerical value + percentage label beside gauge.,"D3.js, ApexCharts, Custom SVG",Hover
10
+ 9,Time-Series Forecast,time-series-forecast,Line with Confidence Band,Ribbon Chart,Actual: solid line #0080FF. Forecast: dashed #FF9500. Band: light shading,⚑ Good,βœ“ Clearly distinguish actual vs forecast. Add legend.,"Chart.js, ApexCharts, Plotly",Hover + Toggle
11
+ 10,Anomaly Detection,anomaly-detection,Line Chart with Highlights,Scatter with Alert,Normal: blue #0080FF. Anomaly: red #FF0000 circle/square marker + alert,⚑ Good,βœ“ Circle/marker for anomalies. Add text alert annotation.,"D3.js, Plotly, ApexCharts",Hover + Alert
12
+ 11,Hierarchical/Nested Data,hierarchical/nested-data,Treemap,"Sunburst, Nested Donut, Icicle",Parent: distinct hues. Children: lighter shades. White borders 2-3px.,⚠ Moderate,⚠ Poor - provide table alternative. Label large areas.,"D3.js, Recharts, ApexCharts",Hover + Drilldown
13
+ 12,Flow/Process Data,flow/process-data,Sankey Diagram,"Alluvial, Chord Diagram",Gradient from source to target. Opacity 0.4-0.6 for flows.,⚠ Moderate,⚠ Poor - provide flow table alternative.,"D3.js (d3-sankey), Plotly",Hover + Drilldown
14
+ 13,Cumulative Changes,cumulative-changes,Waterfall Chart,"Stacked Bar, Cascade",Increases: #4CAF50. Decreases: #F44336. Start: #2196F3. End: #0D47A1.,⚑ Good,βœ“ Good - clear directional colors with labels.,"ApexCharts, Highcharts, Plotly",Hover
15
+ 14,Multi-Variable Comparison,multi-variable-comparison,Radar/Spider Chart,"Parallel Coordinates, Grouped Bar",Single: #0080FF 20% fill. Multiple: distinct colors per dataset.,⚑ Good,⚠ Moderate - limit 5-8 axes. Add data table.,"Chart.js, Recharts, ApexCharts",Hover + Toggle
16
+ 15,Stock/Trading OHLC,stock/trading-ohlc,Candlestick Chart,"OHLC Bar, Heikin-Ashi",Bullish: #26A69A. Bearish: #EF5350. Volume: 40% opacity below.,⚑ Good,⚠ Moderate - provide OHLC data table.,"Lightweight Charts (TradingView), ApexCharts",Real-time + Hover + Zoom
17
+ 16,Relationship/Connection Data,relationship/connection-data,Network Graph,"Hierarchical Tree, Adjacency Matrix",Node types: categorical colors. Edges: #90A4AE 60% opacity.,❌ Poor (500+ nodes struggles),❌ Very Poor - provide adjacency list alternative.,"D3.js (d3-force), Vis.js, Cytoscape.js",Drilldown + Hover + Drag
18
+ 17,Distribution/Statistical,distribution/statistical,Box Plot,"Violin Plot, Beeswarm",Box: #BBDEFB. Border: #1976D2. Median: #D32F2F. Outliers: #F44336.,⚑ Excellent,"βœ“ Good - include stats table (min, Q1, median, Q3, max).","Plotly, D3.js, Chart.js (plugin)",Hover
19
+ 18,Performance vs Target (Compact),performance-vs-target-(compact),Bullet Chart,"Gauge, Progress Bar","Ranges: #FFCDD2, #FFF9C4, #C8E6C9. Performance: #1976D2. Target: black 3px.",⚑ Excellent,βœ“ Excellent - compact with clear values.,"D3.js, Plotly, Custom SVG",Hover
20
+ 19,Proportional/Percentage,proportional/percentage,Waffle Chart,"Pictogram, Stacked Bar 100%",10x10 grid. 3-5 categories max. 2-3px spacing between squares.,⚑ Good,βœ“ Good - better than pie for accessibility.,"D3.js, React-Waffle, Custom CSS Grid",Hover
21
+ 20,Hierarchical Proportional,hierarchical-proportional,Sunburst Chart,"Treemap, Icicle, Circle Packing",Center to outer: darker to lighter. 15-20% lighter per level.,⚠ Moderate,⚠ Poor - provide hierarchy table alternative.,"D3.js (d3-hierarchy), Recharts, ApexCharts",Drilldown + Hover
22
+ 21,Root Cause Analysis,"root cause, decomposition, tree, hierarchy, drill-down, ai-split",Decomposition Tree,"Decision Tree, Flow Chart",Nodes: #2563EB (Primary) vs #EF4444 (Negative impact). Connectors: Neutral grey.,⚠ Moderate (calculation heavy),βœ“ clear hierarchy. Allow keyboard navigation for nodes.,"Power BI (native), React-Flow, Custom D3.js",Drill + Expand
23
+ 22,3D Spatial Data,"3d, spatial, immersive, terrain, molecular, volumetric",3D Scatter/Surface Plot,"Volumetric Rendering, Point Cloud",Depth cues: lighting/shading. Z-axis: color gradient (cool to warm).,❌ Heavy (WebGL required),❌ Poor - requires alternative 2D view or data table.,"Three.js, Deck.gl, Plotly 3D",Rotate + Zoom + VR
24
+ 23,Real-Time Streaming,"streaming, real-time, ticker, live, velocity, pulse",Streaming Area Chart,"Ticker Tape, Moving Gauge",Current: Bright Pulse (#00FF00). History: Fading opacity. Grid: Dark.,⚑ Optimized (canvas/webgl),⚠ Flashing elements - provide pause button. High contrast.,Smoothed D3.js, CanvasJS
25
+ 24,Sentiment/Emotion,"sentiment, emotion, nlp, opinion, feeling",Word Cloud with Sentiment,"Sentiment Arc, Radar Chart",Positive: #22C55E. Negative: #EF4444. Neutral: #94A3B8. Size = Frequency.,⚑ Good,⚠ Word clouds poor for screen readers. Use list view.,"D3-cloud, Highcharts, Nivo",Hover + Filter
26
+ 25,Process Mining,"process, mining, variants, path, bottleneck, log",Process Map / Graph,"Directed Acyclic Graph (DAG), Petri Net",Happy path: #10B981 (Thick). Deviations: #F59E0B (Thin). Bottlenecks: #EF4444.,⚠ Moderate to Heavy,⚠ Complex graphs hard to navigate. Provide path summary.,"React-Flow, Cytoscape.js, Recharts",Drag + Node-Click