.claude/skills/ui-design-brain/SKILL.md
UI 设计大脑 — 使用 60+ 真实组件模式和最佳实践生成生产级 UI。触发词:web 界面、页面、仪表盘、表单、导航。确保现代、简约、SaaS 级输出,基于设计系统规范而非 AI 泛化模式。
npx skillsauth add sundanian1991/openmino ui-design-brainInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides a curated knowledge base of 60+ UI component patterns sourced from component.gallery and enriched with best practices, layout guidance, and usage rules. It replaces generic guessing with real design-system knowledge when generating interfaces.
Before writing any UI code, consult this skill to select the right components and follow their best practices. Read components.md for the full reference.
Apply whenever the user asks to build, design, or generate:
Every generated interface should feel modern, minimal, and production-ready — not like a template.
The output should match what you'd expect from a senior product designer at a top SaaS company:
Read the user's request and determine which UI components are needed. Reference components.md to find each component by name or alias.
Common mappings:
For each component in the interface, follow its best practices from the reference. Key rules that apply broadly:
Layout
Interaction
Typography & Spacing
States
Select the style preset that best matches the user's intent, or ask if unclear:
Modern SaaS (default)
Apple-level Minimal
Enterprise / Corporate
Creative / Portfolio
Data Dashboard
Write production-ready code following these rules:
Stack: React + Tailwind CSS (unless user specifies otherwise)
Spacing: Tailwind spacing scale (p-2, gap-4, etc.) on an 8px grid
Colors: CSS variables or Tailwind config for palette consistency
Typography: Tailwind text utilities; expressive font pairings via Google Fonts
States: Implement hover, focus, active, disabled for all interactive elements
Responsive: Mobile-first; test at 375, 768, 1440 px
Accessibility: Semantic HTML, ARIA where needed, focus management
Below are the 15 most commonly needed components. For the full 60+ component reference with best practices, aliases, and layout examples, see components.md.
| Component | When to use | Key rule | |-----------|------------|----------| | Button | Trigger actions | Verb-first labels; one primary per section | | Card | Represent an entity | Media → title → meta → action; shadow OR border, not both | | Modal | Focused attention | Trap focus; X + Cancel + Escape to close | | Navigation | Page/section links | 5–7 items max; clear active state | | Table | Structured data | Sticky header; right-align numbers; sortable columns | | Tabs | Switch panels | 2–7 tabs; active indicator; accordion on mobile | | Form | Collect input | Single column; labels above; inline validation on blur | | Toast | Brief confirmation | Auto-dismiss 4–6 s; undo action for destructive ops | | Alert | Important status | Semantic colors + icon; max 2 sentences | | Drawer | Secondary panel | Right for detail, left for nav; 320–480 px desktop | | Search input | Find content | Cmd/Ctrl+K shortcut; debounce 200–300 ms | | Empty state | No data | Illustration + headline + CTA; positive framing | | Skeleton | Loading placeholder | Match actual layout shape; shimmer animation | | Badge | Status/metadata label | 1–2 words; pill shape for status; limited color palette | | Dropdown menu | Action/nav options | 7±2 items; destructive actions last in red |
Never generate these — they signal generic, low-quality UI:
documentation
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
tools
Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) using the officecli CLI tool. Use when the user wants to create, inspect, check formatting, find issues, add charts, or modify Office documents.
development
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
testing
Scheduled task management - create, query, delete scheduled tasks to automatically execute operations at specified times.