Skip to content

Commit ed38c9e

Browse files
committed
feat: 新增skill demo
1 parent ee349f5 commit ed38c9e

File tree

21 files changed

+1534
-0
lines changed

21 files changed

+1534
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: frontend-design
3+
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
4+
license: Complete terms in LICENSE.txt
5+
---
6+
7+
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
8+
9+
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
10+
11+
## Design Thinking
12+
13+
Before coding, understand the context and commit to a BOLD aesthetic direction:
14+
- **Purpose**: What problem does this interface solve? Who uses it?
15+
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
16+
- **Constraints**: Technical requirements (framework, performance, accessibility).
17+
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
18+
19+
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
20+
21+
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
22+
- Production-grade and functional
23+
- Visually striking and memorable
24+
- Cohesive with a clear aesthetic point-of-view
25+
- Meticulously refined in every detail
26+
27+
## Frontend Aesthetics Guidelines
28+
29+
Focus on:
30+
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
31+
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
32+
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
33+
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
34+
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
35+
36+
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
37+
38+
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
39+
40+
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
41+
42+
Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
---
2+
name: ui-ux-pro-max
3+
description: "UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). 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."
4+
---
5+
6+
# UI/UX Pro Max - Design Intelligence
7+
8+
Searchable database of UI styles, color palettes, font pairings, chart types, product recommendations, UX guidelines, and stack-specific best practices.
9+
10+
## Prerequisites
11+
12+
Check if Python is installed:
13+
14+
```bash
15+
python3 --version || python --version
16+
```
17+
18+
If Python is not installed, install it based on user's OS:
19+
20+
**macOS:**
21+
```bash
22+
brew install python3
23+
```
24+
25+
**Ubuntu/Debian:**
26+
```bash
27+
sudo apt update && sudo apt install python3
28+
```
29+
30+
**Windows:**
31+
```powershell
32+
winget install Python.Python.3.12
33+
```
34+
35+
---
36+
37+
## How to Use This Skill
38+
39+
When user requests UI/UX work (design, build, create, implement, review, fix, improve), follow this workflow:
40+
41+
### Step 1: Analyze User Requirements
42+
43+
Extract key information from user request:
44+
- **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
45+
- **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
46+
- **Industry**: healthcare, fintech, gaming, education, etc.
47+
- **Stack**: React, Vue, Next.js, or default to `html-tailwind`
48+
49+
### Step 2: Search Relevant Domains
50+
51+
Use `search.py` multiple times to gather comprehensive information. Search until you have enough context.
52+
53+
```bash
54+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
55+
```
56+
57+
**Recommended search order:**
58+
59+
1. **Product** - Get style recommendations for product type
60+
2. **Style** - Get detailed style guide (colors, effects, frameworks)
61+
3. **Typography** - Get font pairings with Google Fonts imports
62+
4. **Color** - Get color palette (Primary, Secondary, CTA, Background, Text, Border)
63+
5. **Landing** - Get page structure (if landing page)
64+
6. **Chart** - Get chart recommendations (if dashboard/analytics)
65+
7. **UX** - Get best practices and anti-patterns
66+
8. **Stack** - Get stack-specific guidelines (default: html-tailwind)
67+
68+
### Step 3: Stack Guidelines (Default: html-tailwind)
69+
70+
If user doesn't specify a stack, **default to `html-tailwind`**.
71+
72+
```bash
73+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "<keyword>" --stack html-tailwind
74+
```
75+
76+
Available stacks: `html-tailwind`, `react`, `nextjs`, `vue`, `svelte`, `swiftui`, `react-native`, `flutter`
77+
78+
---
79+
80+
## Search Reference
81+
82+
### Available Domains
83+
84+
| Domain | Use For | Example Keywords |
85+
|--------|---------|------------------|
86+
| `product` | Product type recommendations | SaaS, e-commerce, portfolio, healthcare, beauty, service |
87+
| `style` | UI styles, colors, effects | glassmorphism, minimalism, dark mode, brutalism |
88+
| `typography` | Font pairings, Google Fonts | elegant, playful, professional, modern |
89+
| `color` | Color palettes by product type | saas, ecommerce, healthcare, beauty, fintech, service |
90+
| `landing` | Page structure, CTA strategies | hero, hero-centric, testimonial, pricing, social-proof |
91+
| `chart` | Chart types, library recommendations | trend, comparison, timeline, funnel, pie |
92+
| `ux` | Best practices, anti-patterns | animation, accessibility, z-index, loading |
93+
| `prompt` | AI prompts, CSS keywords | (style name) |
94+
95+
### Available Stacks
96+
97+
| Stack | Focus |
98+
|-------|-------|
99+
| `html-tailwind` | Tailwind utilities, responsive, a11y (DEFAULT) |
100+
| `react` | State, hooks, performance, patterns |
101+
| `nextjs` | SSR, routing, images, API routes |
102+
| `vue` | Composition API, Pinia, Vue Router |
103+
| `svelte` | Runes, stores, SvelteKit |
104+
| `swiftui` | Views, State, Navigation, Animation |
105+
| `react-native` | Components, Navigation, Lists |
106+
| `flutter` | Widgets, State, Layout, Theming |
107+
108+
---
109+
110+
## Example Workflow
111+
112+
**User request:** "Làm landing page cho dịch vụ chăm sóc da chuyên nghiệp"
113+
114+
**AI should:**
115+
116+
```bash
117+
# 1. Search product type
118+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness service" --domain product
119+
120+
# 2. Search style (based on industry: beauty, elegant)
121+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "elegant minimal soft" --domain style
122+
123+
# 3. Search typography
124+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "elegant luxury" --domain typography
125+
126+
# 4. Search color palette
127+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness" --domain color
128+
129+
# 5. Search landing page structure
130+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "hero-centric social-proof" --domain landing
131+
132+
# 6. Search UX guidelines
133+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "animation" --domain ux
134+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "accessibility" --domain ux
135+
136+
# 7. Search stack guidelines (default: html-tailwind)
137+
python3 .claude/skills/ui-ux-pro-max/scripts/search.py "layout responsive" --stack html-tailwind
138+
```
139+
140+
**Then:** Synthesize all search results and implement the design.
141+
142+
---
143+
144+
## Tips for Better Results
145+
146+
1. **Be specific with keywords** - "healthcare SaaS dashboard" > "app"
147+
2. **Search multiple times** - Different keywords reveal different insights
148+
3. **Combine domains** - Style + Typography + Color = Complete design system
149+
4. **Always check UX** - Search "animation", "z-index", "accessibility" for common issues
150+
5. **Use stack flag** - Get implementation-specific best practices
151+
6. **Iterate** - If first search doesn't match, try different keywords
152+
153+
---
154+
155+
## Common Rules for Professional UI
156+
157+
These are frequently overlooked issues that make UI look unprofessional:
158+
159+
### Icons & Visual Elements
160+
161+
| Rule | Do | Don't |
162+
|------|----|----- |
163+
| **No emoji icons** | Use SVG icons (Heroicons, Lucide, Simple Icons) | Use emojis like 🎨 🚀 ⚙️ as UI icons |
164+
| **Stable hover states** | Use color/opacity transitions on hover | Use scale transforms that shift layout |
165+
| **Correct brand logos** | Research official SVG from Simple Icons | Guess or use incorrect logo paths |
166+
| **Consistent icon sizing** | Use fixed viewBox (24x24) with w-6 h-6 | Mix different icon sizes randomly |
167+
168+
### Interaction & Cursor
169+
170+
| Rule | Do | Don't |
171+
|------|----|----- |
172+
| **Cursor pointer** | Add `cursor-pointer` to all clickable/hoverable cards | Leave default cursor on interactive elements |
173+
| **Hover feedback** | Provide visual feedback (color, shadow, border) | No indication element is interactive |
174+
| **Smooth transitions** | Use `transition-colors duration-200` | Instant state changes or too slow (>500ms) |
175+
176+
### Light/Dark Mode Contrast
177+
178+
| Rule | Do | Don't |
179+
|------|----|----- |
180+
| **Glass card light mode** | Use `bg-white/80` or higher opacity | Use `bg-white/10` (too transparent) |
181+
| **Text contrast light** | Use `#0F172A` (slate-900) for text | Use `#94A3B8` (slate-400) for body text |
182+
| **Muted text light** | Use `#475569` (slate-600) minimum | Use gray-400 or lighter |
183+
| **Border visibility** | Use `border-gray-200` in light mode | Use `border-white/10` (invisible) |
184+
185+
### Layout & Spacing
186+
187+
| Rule | Do | Don't |
188+
|------|----|----- |
189+
| **Floating navbar** | Add `top-4 left-4 right-4` spacing | Stick navbar to `top-0 left-0 right-0` |
190+
| **Content padding** | Account for fixed navbar height | Let content hide behind fixed elements |
191+
| **Consistent max-width** | Use same `max-w-6xl` or `max-w-7xl` | Mix different container widths |
192+
193+
---
194+
195+
## Pre-Delivery Checklist
196+
197+
Before delivering UI code, verify these items:
198+
199+
### Visual Quality
200+
- [ ] No emojis used as icons (use SVG instead)
201+
- [ ] All icons from consistent icon set (Heroicons/Lucide)
202+
- [ ] Brand logos are correct (verified from Simple Icons)
203+
- [ ] Hover states don't cause layout shift
204+
- [ ] Use theme colors directly (bg-primary) not var() wrapper
205+
206+
### Interaction
207+
- [ ] All clickable elements have `cursor-pointer`
208+
- [ ] Hover states provide clear visual feedback
209+
- [ ] Transitions are smooth (150-300ms)
210+
- [ ] Focus states visible for keyboard navigation
211+
212+
### Light/Dark Mode
213+
- [ ] Light mode text has sufficient contrast (4.5:1 minimum)
214+
- [ ] Glass/transparent elements visible in light mode
215+
- [ ] Borders visible in both modes
216+
- [ ] Test both modes before delivery
217+
218+
### Layout
219+
- [ ] Floating elements have proper spacing from edges
220+
- [ ] No content hidden behind fixed navbars
221+
- [ ] Responsive at 320px, 768px, 1024px, 1440px
222+
- [ ] No horizontal scroll on mobile
223+
224+
### Accessibility
225+
- [ ] All images have alt text
226+
- [ ] Form inputs have labels
227+
- [ ] Color is not the only indicator
228+
- [ ] `prefers-reduced-motion` respected

0 commit comments

Comments
 (0)