[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M748TCECSF5GBY5KE3BNHAEH":3,"skill-same:01M748TCECSF5GBY5KE3BNHAEH":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M748TCECSF5GBY5KE3BNHAEH","ui-design",null,"Opinionated constraints for building better interfaces with agents. Use when building UI components, implementing animations, designing layouts, reviewing frontend accessibility, or working with Tailwind CSS, motion\u002Freact, or accessible primitives like Radix\u002FBase UI.","surfingalien\u002FFinSurfing","surfingalien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F138259559?v=4","01M71XACCFHNXK70BHYFHFT657","01M71XACDJSV4YA5NZ191F1C8C",1,"MIT","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fui-design\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: ui-design\ndescription: Opinionated constraints for building better interfaces with agents. Use when building UI components, implementing animations, designing layouts, reviewing frontend accessibility, or working with Tailwind CSS, motion\u002Freact, or accessible primitives like Radix\u002FBase UI.\n---\n\n# UI Design\n\nOpinionated constraints for building better interfaces with agents.\n\n## When to Use\n\n- Building UI components with Tailwind CSS\n- Implementing animations or transitions\n- Adding interactive elements with keyboard\u002Ffocus behavior\n- Reviewing frontend code for accessibility\n- Designing layouts with proper z-index and spacing\n- Working with loading states, error handling, or empty states\n\n## Stack\n\n| Requirement | Rule |\n|-------------|------|\n| Tailwind CSS | MUST use defaults (spacing, radius, shadows) before custom values |\n| Animation library | MUST use `motion\u002Freact` (formerly `framer-motion`) for JS animation |\n| CSS animation | SHOULD use `tw-animate-css` for entrance and micro-animations |\n| Class logic | MUST use `cn` utility (`clsx` + `tailwind-merge`) |\n\n## Components\n\n| Requirement | Rule |\n|-------------|------|\n| Interactive primitives | MUST use accessible primitives (`Base UI`, `React Aria`, `Radix`) for keyboard\u002Ffocus behavior |\n| Existing components | MUST use project's existing primitives first |\n| Consistency | NEVER mix primitive systems within the same interaction surface |\n| New primitives | SHOULD prefer [`Base UI`](https:\u002F\u002Fbase-ui.com\u002Freact\u002Fcomponents) if compatible with stack |\n| Icon buttons | MUST add `aria-label` to icon-only buttons |\n| Custom behavior | NEVER rebuild keyboard or focus behavior by hand unless explicitly requested |\n\n## Interaction\n\n| Requirement | Rule |\n|-------------|------|\n| Destructive actions | MUST use `AlertDialog` for destructive or irreversible actions |\n| Loading states | SHOULD use structural skeletons |\n| Viewport height | NEVER use `h-screen`, use `h-dvh` |\n| Fixed elements | MUST respect `safe-area-inset` |\n| Error display | MUST show errors next to where the action happens |\n| Input behavior | NEVER block paste in `input` or `textarea` elements |\n\n## Animation\n\n| Requirement | Rule |\n|-------------|------|\n| Default | NEVER add animation unless explicitly requested |\n| Compositor props | MUST animate only `transform`, `opacity` |\n| Layout props | NEVER animate `width`, `height`, `top`, `left`, `margin`, `padding` |\n| Paint props | SHOULD avoid `background`, `color` except for small, local UI (text, icons) |\n| Entrance easing | SHOULD use `ease-out` on entrance |\n| Feedback timing | NEVER exceed `200ms` for interaction feedback |\n| Looping | MUST pause looping animations when off-screen |\n| Accessibility | MUST respect `prefers-reduced-motion` |\n| Custom easing | NEVER introduce custom easing curves unless explicitly requested |\n| Large surfaces | SHOULD avoid animating large images or full-screen surfaces |\n\n## Typography\n\n| Requirement | Rule |\n|-------------|------|\n| Headings | MUST use `text-balance` |\n| Body text | MUST use `text-pretty` for paragraphs |\n| Data | MUST use `tabular-nums` |\n| Dense UI | SHOULD use `truncate` or `line-clamp` |\n| Letter spacing | NEVER modify `letter-spacing` (`tracking-`) unless explicitly requested |\n\n## Layout\n\n| Requirement | Rule |\n|-------------|------|\n| Z-index | MUST use a fixed scale (no arbitrary `z-x`) |\n| Square elements | SHOULD use `size-x` instead of `w-x` + `h-x` |\n\n## Performance\n\n| Requirement | Rule |\n|-------------|------|\n| Blur effects | NEVER animate large `blur()` or `backdrop-filter` surfaces |\n| Will-change | NEVER apply `will-change` outside an active animation |\n| useEffect | NEVER use for anything expressible as render logic |\n\n## Design\n\n| Requirement | Rule |\n|-------------|------|\n| Gradients | NEVER use unless explicitly requested |\n| Purple\u002Fmulticolor gradients | NEVER use |\n| Glow effects | NEVER use as primary affordances |\n| Shadows | SHOULD use Tailwind CSS default scale unless explicitly requested |\n| Empty states | MUST give one clear next action |\n| Accent colors | SHOULD limit to one per view |\n| Color tokens | SHOULD use existing theme or Tailwind CSS tokens before introducing new ones |\n\n## Common Pitfalls\n\nThe most common UI design failures occur in spacing, color contrast, mobile responsiveness, state management, and visual hierarchy. These gotchas are discovered through repeated agent mistakes when building interfaces.\n\n### 1. Inconsistent Spacing (Arbitrary Margins, No System)\n\n**Problem:** Using an inconsistent mix of Tailwind spacing values without a deliberate system makes layouts feel incoherent.\n\n```tsx\n\u002F\u002F ❌ WRONG - arbitrary pixel values, no spacing system\n\u003Cdiv className=\"ml-[13px] mr-[22px] pt-[7px]\">Content\u003C\u002Fdiv>\n\n\u002F\u002F ✅ CORRECT - use system scales\n\u003Cdiv className=\"ml-4 mr-4 pt-4\">Content\u003C\u002Fdiv>\n```\n\n**Why it fails:** \n- Designs look accidental (some spacing is `2px`, some is `16px`, no pattern)\n- Mobile layouts break (spacing doesn't scale proportionally)\n- Alignment is impossible (gaps don't align to grid)\n\n**Fix:**\n- **ALWAYS use Tailwind spacing scale** (`0`, `1`, `2`, `3`, `4`, `6`, `8`, `12`, `16`, `24`, `32`, etc.)\n- **Define spacing systems for common patterns:**\n  - Button padding: `px-4 py-2`\n  - Card padding: `p-6`\n  - Gap between sections: `gap-8`\n  - Nested spacing: `ml-6` (not `ml-3`)\n- **Group related elements** with consistent gaps (use same `gap-x` for all horizontal lists)\n\n### 2. Poor Color Contrast (Accessibility Violations)\n\n**Problem:** Color combinations that fail WCAG AA contrast ratios (4.5:1 for text, 3:1 for UI components) making content illegible for low-vision users.\n\n```tsx\n\u002F\u002F ❌ WRONG - gray-400 text on gray-100 background fails contrast\n\u003Cp className=\"text-gray-400 bg-gray-100\">Important content\u003C\u002Fp>\n\n\u002F\u002F ✅ CORRECT - gray-700 on gray-100 passes WCAG AA\n\u003Cp className=\"text-gray-700 bg-gray-100\">Important content\u003C\u002Fp>\n```\n\n**Why it fails:**\n- Approximately 4-5% of users have color blindness, and a broader 15%+ have some form of visual impairment\n- Users on bright displays (phones) can't read low-contrast text\n- Legal liability (WCAG compliance required in many jurisdictions)\n\n**Fix:**\n- **Use color pairs with sufficient contrast:**\n  - `text-gray-900`\u002F`text-white` on any background (always safe)\n  - `text-gray-700` on light backgrounds\n  - `text-gray-300` on dark backgrounds\n- **Test colors:** Use online contrast checkers (https:\u002F\u002Fwebaim.org\u002Fresources\u002Fcontrastchecker\u002F)\n- **Avoid problematic pairs:**\n  - `gray-400` on `gray-100` ❌\n  - `red-500` on `pink-100` ❌\n  - Disabled states: use `text-gray-400` on white, `text-gray-600` on color\n- **For colored text (not gray):** Use darker tints (`red-700` not `red-300`)\n\n### 3. Mobile-Unfriendly Layouts (Small Touch Targets, Horizontal Scroll)\n\n**Problem:** Touch targets smaller than 44×44px, horizontal scrolling, or layouts that don't adapt to narrow viewports.\n\n```tsx\n\u002F\u002F ❌ WRONG - button too small, no responsive layout\n\u003Cbutton className=\"px-2 py-1 text-xs\">Click me\u003C\u002Fbutton>\n\u003Cdiv className=\"flex gap-2\">\n  \u003Cdiv className=\"w-80\">Sidebar\u003C\u002Fdiv>\n  \u003Cdiv className=\"w-80\">Content\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\n\u002F\u002F ✅ CORRECT - hit target size, responsive stack\n\u003Cbutton className=\"px-4 py-3 md:px-6 md:py-3\">Click me\u003C\u002Fbutton>\n\u003Cdiv className=\"flex flex-col md:flex-row gap-4\">\n  \u003Cdiv className=\"w-full md:w-80\">Sidebar\u003C\u002Fdiv>\n  \u003Cdiv className=\"flex-1\">Content\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n```\n\n**Why it fails:**\n- 40% of traffic is mobile; small buttons are impossible to tap\n- Horizontal scrolling is a UX nightmare on phones\n- Layouts that work on desktop can be unusable on mobile\n\n**Fix:**\n- **Minimum touch target: 44×44px**\n  - Buttons: at least `px-4 py-3` (standard: `px-6 py-3`)\n  - Links: wrap in larger clickable area\n- **Stack on mobile:** Use `flex-col` by default, `md:flex-row` for desktop\n- **Use responsive widths:**\n  - `w-full` on mobile, `md:w-80` or `md:w-1\u002F3` on desktop\n  - Use `flex-1` instead of fixed widths for flexible layouts\n- **Test responsiveness:** Check at 375px (iPhone SE) and 768px (tablet) breakpoints\n- **Avoid horizontal scroll:** Never force users to scroll sideways\n\n### 4. Missing States (Loading, Error, Empty, Disabled)\n\n**Problem:** Interfaces that only show the happy path, failing silently when loading, erroring, or empty.\n\n```tsx\n\u002F\u002F ❌ WRONG - no feedback states\n\u003Cbutton onClick={save}>Save\u003C\u002Fbutton>\n\u003Cdiv>{data.map(item => \u003CItemCard item={item} \u002F>)}\u003C\u002Fdiv>\n\n\u002F\u002F ✅ CORRECT - all states accounted for\n\u003Cbutton onClick={save} disabled={loading}>\n  {loading ? 'Saving...' : 'Save'}\n\u003C\u002Fbutton>\n\n{loading && \u003CLoadingSkeleton \u002F>}\n{error && \u003CErrorAlert message={error} \u002F>}\n{!loading && data.length === 0 && \u003CEmptyState action=\"Create your first item\" \u002F>}\n{!loading && !error && data.map(item => \u003CItemCard item={item} \u002F>)}\n```\n\n**Why it fails:**\n- Users don't know if action worked (no feedback = perceived failure)\n- Empty lists look broken (not intentionally empty)\n- No recovery path from errors\n\n**Fix:**\n- **Loading states:** Use structural skeletons (not spinners)\n  - Layout remains stable while content loads\n  - Users see what's coming, not just spinning\n- **Error states:** Show next to the failed action\n  - Explain what happened and how to fix it\n  - Include retry button\n- **Empty states:** Make intentional and actionable\n  - \"No items yet\" → \"Create your first item\" (button)\n  - Show what empty state means, how to populate\n- **Disabled states:** Always provide visual feedback\n  - `disabled={true}` + `opacity-50` or `cursor-not-allowed`\n  - Never silently disable without explaining why\n\n### 5. Unclear Hierarchy (Everything Looks Equally Important)\n\n**Problem:** All text the same size, all colors the same weight, all spacing the same distance — nothing stands out.\n\n```tsx\n\u002F\u002F ❌ WRONG - flat hierarchy\n\u003Cdiv className=\"text-lg text-gray-700\">\n  \u003Cdiv className=\"text-lg text-gray-700\">Subheading\u003C\u002Fdiv>\n  \u003Cdiv className=\"text-lg text-gray-700\">Subtitle\u003C\u002Fdiv>\n  \u003Cbutton className=\"text-lg px-4 py-2\">Action\u003C\u002Fbutton>\n\u003C\u002Fdiv>\n\n\u002F\u002F ✅ CORRECT - clear hierarchy\n\u003Cdiv>\n  \u003Ch1 className=\"text-3xl font-bold text-gray-900\">Title\u003C\u002Fh1>\n  \u003Ch2 className=\"text-xl font-semibold text-gray-700 mt-6\">Subheading\u003C\u002Fh2>\n  \u003Cp className=\"text-base text-gray-600 mt-2\">Subtitle\u003C\u002Fp>\n  \u003Cbutton className=\"mt-6 px-6 py-3 bg-blue-600 text-white font-semibold rounded\">\n    Primary Action\n  \u003C\u002Fbutton>\n\u003C\u002Fdiv>\n```\n\n**Why it fails:**\n- Users don't know where to look first\n- Scanning pages is slower (no skimmable structure)\n- Important actions get missed\n\n**Fix:**\n- **Size hierarchy:** \n  - Headings: `text-3xl` (h1) → `text-2xl` (h2) → `text-xl` (h3)\n  - Body text: `text-base` (paragraphs) → `text-sm` (secondary)\n- **Weight hierarchy:**\n  - Primary actions: `font-bold` or `font-semibold`\n  - Important text: `font-semibold`\n  - Body: `font-normal`\n  - Secondary: `font-normal` with lighter color\n- **Color hierarchy:**\n  - Primary text: `text-gray-900`\n  - Secondary text: `text-gray-600`\n  - Tertiary: `text-gray-500`\n- **Spacing hierarchy:**\n  - Section gaps: `gap-8` (largest)\n  - Component gaps: `gap-4`\n  - Dense content: `gap-2`\n- **One accent color per view:** Use a single color for CTAs, not multiple colors fighting for attention\n\n---\n\n## Quick Reference\n\n### Allowed Animation Properties\n```\ntransform, opacity\n```\n\n### Forbidden Animation Properties\n```\nwidth, height, top, left, margin, padding, blur(), backdrop-filter\n```\n\n### Required Accessibility Patterns\n```tsx\n\u002F\u002F Icon button - always add aria-label\n\u003Cbutton aria-label=\"Close dialog\">\n  \u003CXIcon \u002F>\n\u003C\u002Fbutton>\n\n\u002F\u002F Respect reduced motion\n@media (prefers-reduced-motion: reduce) {\n  * { animation: none !important; }\n}\n```\n\n### Class Utility Pattern\n```tsx\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n```\n","# UI Design\n\nOpinionated constraints for building better interfaces with agents.\n\n## When to Use\n\n- Building UI components with Tailwind CSS\n- Implementing animations or transitions\n- Adding interactive elements with keyboard\u002Ffocus behavior\n- Reviewing frontend code for accessibility\n- Designing layouts with proper z-index and spacing\n- Working with loading states, error handling, or empty states\n\n## Stack\n\n| Requirement | Rule |\n|-------------|------|\n| Tailwind CSS | MUST use defaults (spacing, radius, shadows) before custom values |\n| Animation library | MUST use `motion\u002Freact` (formerly `framer-motion`) for JS animation |\n| CSS animation | SHOULD use `tw-animate-css` for entrance and micro-animations |\n| Class logic | MUST use `cn` utility (`clsx` + `tailwind-merge`) |\n\n## Components\n\n| Requirement | Rule |\n|-------------|------|\n| Interactive primitives | MUST use accessible primitives (`Base UI`, `React Aria`, `Radix`) for keyboard\u002Ffocus behavior |\n| Existing components | MUST use project's existing primitives first |\n| Consistency | NEVER mix primitive systems within the same interaction surface |\n| New primitives | SHOULD prefer [`Base UI`](https:\u002F\u002Fbase-ui.com\u002Freact\u002Fcomponents) if compatible with stack |\n| Icon buttons | MUST add `aria-label` to icon-only buttons |\n| Custom behavior | NEVER rebuild keyboard or focus behavior by hand unless explicitly requested |\n\n## Interaction\n\n| Requirement | Rule |\n|-------------|------|\n| Destructive actions | MUST use `AlertDialog` for destructive or irreversible actions |\n| Loading states | SHOULD use structural skeletons |\n| Viewport height | NEVER use `h-screen`, use `h-dvh` |\n| Fixed elements | MUST respect `safe-area-inset` |\n| Error display | MUST show errors next to where the action happens |\n| Input behavior | NEVER block paste in `input` or `textarea` elements |\n\n## Animation\n\n| Requirement | Rule |\n|-------------|------|\n| Default | NEVER add animation unless explicitly requested |\n| Compositor props | MUST animate only `transform`, `opacity` |\n| Layout props | NEVER animate `width`, `height`, `top`, `left`, `margin`, `padding` |\n| Paint props | SHOULD avoid `background`, `color` except for small, local UI (text, icons) |\n| Entrance easing | SHOULD use `ease-out` on entrance |\n| Feedback timing | NEVER exceed `200ms` for interaction feedback |\n| Looping | MUST pause looping animations when off-screen |\n| Accessibility | MUST respect `prefers-reduced-motion` |\n| Custom easing | NEVER introduce custom easing curves unless explicitly requested |\n| Large surfaces | SHOULD avoid animating large images or full-screen surfaces |\n\n## Typography\n\n| Requirement | Rule |\n|-------------|------|\n| Headings | MUST use `text-balance` |\n| Body text | MUST use `text-pretty` for paragraphs |\n| Data | MUST use `tabular-nums` |\n| Dense UI | SHOULD use `truncate` or `line-clamp` |\n| Letter spacing | NEVER modify `letter-spacing` (`tracking-`) unless explicitly requested |\n\n## Layout\n\n| Requirement | Rule |\n|-------------|------|\n| Z-index | MUST use a fixed scale (no arbitrary `z-x`) |\n| Square elements | SHOULD use `size-x` instead of `w-x` + `h-x` |\n\n## Performance\n\n| Requirement | Rule |\n|-------------|------|\n| Blur effects | NEVER animate large `blur()` or `backdrop-filter` surfaces |\n| Will-change | NEVER apply `will-change` outside an active animation |\n| useEffect | NEVER use for anything expressible as render logic |\n\n## Design\n\n| Requirement | Rule |\n|-------------|------|\n| Gradients | NEVER use unless explicitly requested |\n| Purple\u002Fmulticolor gradients | NEVER use |\n| Glow effects | NEVER use as primary affordances |\n| Shadows | SHOULD use Tailwind CSS default scale unless explicitly requested |\n| Empty states | MUST give one clear next action |\n| Accent colors | SHOULD limit to one per view |\n| Color tokens | SHOULD use existing theme or Tailwind CSS tokens before introducing new ones |\n\n## Common Pitfalls\n\nThe most common UI design failures occur in spacing, color contrast, mobile responsiveness, state management, and visual hierarchy. These gotchas are discovered through repeated agent mistakes when building interfaces.\n\n### 1. Inconsistent Spacing (Arbitrary Margins, No System)\n\n**Problem:** Using an inconsistent mix of Tailwind spacing values without a deliberate system makes layouts feel incoherent.\n\n```tsx\n\u002F\u002F ❌ WRONG - arbitrary pixel values, no spacing system\n\u003Cdiv className=\"ml-[13px] mr-[22px] pt-[7px]\">Content\u003C\u002Fdiv>\n\n\u002F\u002F ✅ CORRECT - use system scales\n\u003Cdiv className=\"ml-4 mr-4 pt-4\">Content\u003C\u002Fdiv>\n```\n\n**Why it fails:** \n- Designs look accidental (some spacing is `2px`, some is `16px`, no pattern)\n- Mobile layouts break (spacing doesn't scale proportionally)\n- Alignment is impossible (gaps don't align to grid)\n\n**Fix:**\n- **ALWAYS use Tailwind spacing scale** (`0`, `1`, `2`, `3`, `4`, `6`, `8`, `12`, `16`, `24`, `32`, etc.)\n- **Define spacing systems for common patterns:**\n  - Button padding: `px-4 py-2`\n  - Card padding: `p-6`\n  - Gap between sections: `gap-8`\n  - Nested spacing: `ml-6` (not `ml-3`)\n- **Group related elements** with consistent gaps (use same `gap-x` for all horizontal lists)\n\n### 2. Poor Color Contrast (Accessibility Violations)\n\n**Problem:** Color combinations that fail WCAG AA contrast ratios (4.5:1 for text, 3:1 for UI components) making content illegible for low-vision users.\n\n```tsx\n\u002F\u002F ❌ WRONG - gray-400 text on gray-100 background fails contrast\n\u003Cp className=\"text-gray-400 bg-gray-100\">Important content\u003C\u002Fp>\n\n\u002F\u002F ✅ CORRECT - gray-700 on gray-100 passes WCAG AA\n\u003Cp className=\"text-gray-700 bg-gray-100\">Important content\u003C\u002Fp>\n```\n\n**Why it fails:**\n- Approximately 4-5% of users have color blindness, and a broader 15%+ have some form of visual impairment\n- Users on bright displays (phones) can't read low-contrast text\n- Legal liability (WCAG compliance required in many jurisdictions)\n\n**Fix:**\n- **Use color pairs with sufficient contrast:**\n  - `text-gray-900`\u002F`text-white` on any background (always safe)\n  - `text-gray-700` on light backgrounds\n  - `text-gray-300` on dark backgrounds\n- **Test colors:** Use online contrast checkers (https:\u002F\u002Fwebaim.org\u002Fresources\u002Fcontrastchecker\u002F)\n- **Avoid problematic pairs:**\n  - `gray-400` on `gray-100` ❌\n  - `red-500` on `pink-100` ❌\n  - Disabled states: use `text-gray-400` on white, `text-gray-600` on color\n- **For colored text (not gray):** Use darker tints (`red-700` not `red-300`)\n\n### 3. Mobile-Unfriendly Layouts (Small Touch Targets, Horizontal Scroll)\n\n**Problem:** Touch targets smaller than 44×44px, horizontal scrolling, or layouts that don't adapt to narrow viewports.\n\n```tsx\n\u002F\u002F ❌ WRONG - button too small, no responsive layout\n\u003Cbutton className=\"px-2 py-1 text-xs\">Click me\u003C\u002Fbutton>\n\u003Cdiv className=\"flex gap-2\">\n  \u003Cdiv className=\"w-80\">Sidebar\u003C\u002Fdiv>\n  \u003Cdiv className=\"w-80\">Content\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n\n\u002F\u002F ✅ CORRECT - hit target size, responsive stack\n\u003Cbutton className=\"px-4 py-3 md:px-6 md:py-3\">Click me\u003C\u002Fbutton>\n\u003Cdiv className=\"flex flex-col md:flex-row gap-4\">\n  \u003Cdiv className=\"w-full md:w-80\">Sidebar\u003C\u002Fdiv>\n  \u003Cdiv className=\"flex-1\">Content\u003C\u002Fdiv>\n\u003C\u002Fdiv>\n```\n\n**Why it fails:**\n- 40% of traffic is mobile; small buttons are impossible to tap\n- Horizontal scrolling is a UX nightmare on phones\n- Layouts that work on desktop can be unusable on mobile\n\n**Fix:**\n- **Minimum touch target: 44×44px**\n  - Buttons: at least `px-4 py-3` (standard: `px-6 py-3`)\n  - Links: wrap in larger clickable area\n- **Stack on mobile:** Use `flex-col` by default, `md:flex-row` for desktop\n- **Use responsive widths:**\n  - `w-full` on mobile, `md:w-80` or `md:w-1\u002F3` on desktop\n  - Use `flex-1` instead of fixed widths for flexible layouts\n- **Test responsiveness:** Check at 375px (iPhone SE) and 768px (tablet) breakpoints\n- **Avoid horizontal scroll:** Never force users to scroll sideways\n\n### 4. Missing States (Loading, Error, Empty, Disabled)\n\n**Problem:** Interfaces that only show the happy path, failing silently when loading, erroring, or empty.\n\n```tsx\n\u002F\u002F ❌ WRONG - no feedback states\n\u003Cbutton onClick={save}>Save\u003C\u002Fbutton>\n\u003Cdiv>{data.map(item => \u003CItemCard item={item} \u002F>)}\u003C\u002Fdiv>\n\n\u002F\u002F ✅ CORRECT - all states accounted for\n\u003Cbutton onClick={save} disabled={loading}>\n  {loading ? 'Saving...' : 'Save'}\n\u003C\u002Fbutton>\n\n{loading && \u003CLoadingSkeleton \u002F>}\n{error && \u003CErrorAlert message={error} \u002F>}\n{!loading && data.length === 0 && \u003CEmptyState action=\"Create your first item\" \u002F>}\n{!loading && !error && data.map(item => \u003CItemCard item={item} \u002F>)}\n```\n\n**Why it fails:**\n- Users don't know if action worked (no feedback = perceived failure)\n- Empty lists look broken (not intentionally empty)\n- No recovery path from errors\n\n**Fix:**\n- **Loading states:** Use structural skeletons (not spinners)\n  - Layout remains stable while content loads\n  - Users see what's coming, not just spinning\n- **Error states:** Show next to the failed action\n  - Explain what happened and how to fix it\n  - Include retry button\n- **Empty states:** Make intentional and actionable\n  - \"No items yet\" → \"Create your first item\" (button)\n  - Show what empty state means, how to populate\n- **Disabled states:** Always provide visual feedback\n  - `disabled={true}` + `opacity-50` or `cursor-not-allowed`\n  - Never silently disable without explaining why\n\n### 5. Unclear Hierarchy (Everything Looks Equally Important)\n\n**Problem:** All text the same size, all colors the same weight, all spacing the same distance — nothing stands out.\n\n```tsx\n\u002F\u002F ❌ WRONG - flat hierarchy\n\u003Cdiv className=\"text-lg text-gray-700\">\n  \u003Cdiv className=\"text-lg text-gray-700\">Subheading\u003C\u002Fdiv>\n  \u003Cdiv className=\"text-lg text-gray-700\">Subtitle\u003C\u002Fdiv>\n  \u003Cbutton className=\"text-lg px-4 py-2\">Action\u003C\u002Fbutton>\n\u003C\u002Fdiv>\n\n\u002F\u002F ✅ CORRECT - clear hierarchy\n\u003Cdiv>\n  \u003Ch1 className=\"text-3xl font-bold text-gray-900\">Title\u003C\u002Fh1>\n  \u003Ch2 className=\"text-xl font-semibold text-gray-700 mt-6\">Subheading\u003C\u002Fh2>\n  \u003Cp className=\"text-base text-gray-600 mt-2\">Subtitle\u003C\u002Fp>\n  \u003Cbutton className=\"mt-6 px-6 py-3 bg-blue-600 text-white font-semibold rounded\">\n    Primary Action\n  \u003C\u002Fbutton>\n\u003C\u002Fdiv>\n```\n\n**Why it fails:**\n- Users don't know where to look first\n- Scanning pages is slower (no skimmable structure)\n- Important actions get missed\n\n**Fix:**\n- **Size hierarchy:** \n  - Headings: `text-3xl` (h1) → `text-2xl` (h2) → `text-xl` (h3)\n  - Body text: `text-base` (paragraphs) → `text-sm` (secondary)\n- **Weight hierarchy:**\n  - Primary actions: `font-bold` or `font-semibold`\n  - Important text: `font-semibold`\n  - Body: `font-normal`\n  - Secondary: `font-normal` with lighter color\n- **Color hierarchy:**\n  - Primary text: `text-gray-900`\n  - Secondary text: `text-gray-600`\n  - Tertiary: `text-gray-500`\n- **Spacing hierarchy:**\n  - Section gaps: `gap-8` (largest)\n  - Component gaps: `gap-4`\n  - Dense content: `gap-2`\n- **One accent color per view:** Use a single color for CTAs, not multiple colors fighting for attention\n\n---\n\n## Quick Reference\n\n### Allowed Animation Properties\n```\ntransform, opacity\n```\n\n### Forbidden Animation Properties\n```\nwidth, height, top, left, margin, padding, blur(), backdrop-filter\n```\n\n### Required Accessibility Patterns\n```tsx\n\u002F\u002F Icon button - always add aria-label\n\u003Cbutton aria-label=\"Close dialog\">\n  \u003CXIcon \u002F>\n\u003C\u002Fbutton>\n\n\u002F\u002F Respect reduced motion\n@media (prefers-reduced-motion: reduce) {\n  * { animation: none !important; }\n}\n```\n\n### Class Utility Pattern\n```tsx\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n```\n",{"name":5,"description":7},"main","351d6f0a5dac78be33208c688fdbb820b9053685",".claude\u002Fskills\u002Fui-design",0,"https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing","https:\u002F\u002Fgithub.com\u002Fsurfingalien","2026-11-14 00:29:40",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add surfingalien\u002FFinSurfing --skill ui-design",{"tool":36,"command":37},"bunx","bunx skills add surfingalien\u002FFinSurfing --skill ui-design",{"tool":39,"command":40},"pnpm","pnpm dlx skills add surfingalien\u002FFinSurfing --skill ui-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fui-design\u002FSKILL.md",true,[],[45,51,57,64,71,78],{"skillNo":46,"name":47,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7490VYNX3NCT8R0PPSYHTXP","portfolio-management","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fskills\u002Fportfolio-management\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":18},"01M7490SNSG32QP06X1P1EVK7N","financial-analysis","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fskills\u002Ffinancial-analysis\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M7490MKJ5QCVWWXC8HK57EVQ","tradingview-mcp","AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, Reddit sentiment, news, and multi-market screener. Supports stocks, crypto, ETFs, indices, Turkish (BIST), and Egyptian (EGX) markets.","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fopenclaw\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7490FHXRPVEPQMZ4KHFD161","sales-engineer","Analyzes RFP\u002FRFI responses for coverage gaps, builds competitive feature comparison matrices, and plans proof-of-concept (POC) engagements for pre-sales engineering. Use when responding to RFPs, bids, or proposal requests; comparing product features against competitors; planning or scoring a customer POC or sales demo; preparing a technical proposal; or performing win\u002Floss competitor analysis. Handles tasks described as 'RFP response', 'bid response', 'proposal response', 'competitor comparison', 'feature matrix', 'POC planning', 'sales demo prep', or 'pre-sales engineering'.","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fbusiness-growth\u002Fskills\u002Fsales-engineer\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7490C91D8F7CM7AXFZK8SQE","revenue-operations","Analyzes sales pipeline health, revenue forecasting accuracy, and go-to-market efficiency metrics for SaaS revenue optimization. Use when analyzing sales pipeline coverage, forecasting revenue, evaluating go-to-market performance, reviewing sales metrics, assessing pipeline analysis, tracking forecast accuracy with MAPE, calculating GTM efficiency, or measuring sales efficiency and unit economics for SaaS teams.","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fbusiness-growth\u002Fskills\u002Frevenue-operations\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M74907FEV2YRKSYPNG649HGF","customer-success-manager","Monitors customer health, predicts churn risk, and identifies expansion opportunities using weighted scoring models for SaaS customer success. Use when analyzing customer accounts, reviewing retention metrics, scoring at-risk customers, or when the user mentions churn, customer health scores, upsell opportunities, expansion revenue, retention analysis, or customer analytics. Runs three Python CLI tools to produce deterministic health scores, churn risk tiers, and prioritized expansion recommendations across Enterprise, Mid-Market, and SMB segments.","https:\u002F\u002Fgithub.com\u002Fsurfingalien\u002FFinSurfing\u002Fblob\u002Fmain\u002Fbusiness-growth\u002Fskills\u002Fcustomer-success-manager\u002FSKILL.md",[],[]]