npx skills add https://github.com/pproenca/dot-skills --skill ui-design全面的 UI/UX 和前端设计最佳实践指南。包含 8 个类别共 42 条规则,按影响优先级排序,以指导开发无障碍、高性能且用户友好的界面。
在以下情况下参考这些指南:
| 优先级 | 类别 | 影响 | 前缀 |
|---|---|---|---|
| 1 | 无障碍访问与 WCAG 合规性 | 关键 | access- |
| 2 | 核心 Web 指标优化 | 关键 | cwv- |
| 3 | 视觉层次与布局 | 高 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
layout-| 4 | 响应式与移动优先设计 | 高 | resp- |
| 5 | 排版与字体加载 | 中高 | typo- |
| 6 | 颜色与对比度 | 中 | color- |
| 7 | 表单与验证用户体验 | 中 | form- |
| 8 | 动画与性能 | 低中 | anim- |
access-semantic-html - 为屏幕阅读器使用语义化 HTML 元素access-keyboard-navigation - 确保完整的键盘导航access-focus-indicators - 提供可见的焦点指示器access-alt-text - 为图像提供有意义的替代文本access-aria-labels - 为纯图标控件使用 ARIA 标签access-target-size - 确保最小触摸目标尺寸 (24×24px)access-heading-hierarchy - 保持逻辑化的标题层级cwv-optimize-lcp - 将最大内容绘制优化至 2.5 秒以内cwv-minimize-cls - 将累积布局偏移最小化至 0.1 以下cwv-improve-inp - 将下次绘制交互时间改善至 200 毫秒以内cwv-responsive-images - 使用 srcset 提供响应式图像cwv-lazy-load-offscreen - 延迟加载屏幕外的图像和 iframecwv-critical-css - 内联关键 CSS 并延迟加载其余部分layout-visual-hierarchy - 建立清晰的视觉层次layout-whitespace - 使用留白提高可读性layout-f-pattern - 为 F 型阅读模式进行设计layout-grid-system - 使用一致的网格系统layout-single-cta - 每个屏幕限制一个主要行动号召layout-proximity-grouping - 通过邻近原则分组相关元素resp-mobile-first - 采用移动优先设计,使用 min-width 查询resp-fluid-typography - 使用 clamp() 实现流式排版resp-container-queries - 为组件使用容器查询resp-touch-targets - 为移动设备调整触摸目标尺寸 (44×44px)resp-viewport-meta - 正确配置视口 meta 标签typo-font-display - 使用 font-display 控制加载行为typo-preload-fonts - 预加载关键网络字体typo-readable-line-length - 限制行长 (45-75ch)typo-line-height - 设置合适的行高 (1.5-1.7)typo-system-font-stack - 为 UI 元素使用系统字体栈color-contrast-ratio - 满足 WCAG 对比度要求 (4.5:1)color-not-only-indicator - 切勿仅用颜色传达信息color-dark-mode - 通过 prefers-color-scheme 支持深色模式color-semantic-palette - 在设计令牌中使用语义化颜色名称form-inline-validation - 在字段失去焦点后使用行内验证form-error-messages - 编写可操作的错误信息form-labels-above - 将标签置于输入字段上方form-input-types - 为移动设备使用正确的 HTML 输入类型form-autocomplete - 使用正确的属性启用浏览器自动填充anim-gpu-properties - 仅对 GPU 加速的属性进行动画处理anim-will-change - 谨慎使用 will-change 提供动画提示anim-reduced-motion - 尊重用户的运动偏好设置anim-duration-easing - 使用合适的动画时长和缓动函数阅读单独的参考文件以获取详细解释和代码示例:
获取包含所有规则详细说明的完整指南:AGENTS.md
每周安装量
200
代码仓库
GitHub 星标数
85
首次出现
2026年1月22日
安全审计
安装于
opencode169
codex166
gemini-cli161
claude-code157
github-copilot147
cursor146
Comprehensive UI/UX and frontend design best practices guide. Contains 42 rules across 8 categories, prioritized by impact to guide accessible, performant, and user-friendly interface development.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Accessibility & WCAG Compliance | CRITICAL | access- |
| 2 | Core Web Vitals Optimization | CRITICAL | cwv- |
| 3 | Visual Hierarchy & Layout | HIGH | layout- |
| 4 | Responsive & Mobile-First Design | HIGH | resp- |
| 5 | Typography & Font Loading | MEDIUM-HIGH | typo- |
| 6 | Color & Contrast | MEDIUM | color- |
| 7 | Forms & Validation UX | MEDIUM | form- |
| 8 | Animation & Performance | LOW-MEDIUM | anim- |
access-semantic-html - Use semantic HTML elements for screen readersaccess-keyboard-navigation - Ensure full keyboard navigationaccess-focus-indicators - Provide visible focus indicatorsaccess-alt-text - Provide meaningful alt text for imagesaccess-aria-labels - Use ARIA labels for icon-only controlsaccess-target-size - Ensure minimum touch target size (24×24px)access-heading-hierarchy - Maintain logical heading hierarchycwv-optimize-lcp - Optimize Largest Contentful Paint under 2.5scwv-minimize-cls - Minimize Cumulative Layout Shift under 0.1cwv-improve-inp - Improve Interaction to Next Paint under 200mscwv-responsive-images - Serve responsive images with srcsetcwv-lazy-load-offscreen - Lazy load offscreen images and iframescwv-critical-css - Inline critical CSS and defer the restlayout-visual-hierarchy - Establish clear visual hierarchylayout-whitespace - Use whitespace to improve readabilitylayout-f-pattern - Design for F-pattern reading behaviorlayout-grid-system - Use a consistent grid systemlayout-single-cta - Limit to one primary CTA per screenlayout-proximity-grouping - Group related elements with proximityresp-mobile-first - Design mobile-first with min-width queriesresp-fluid-typography - Use fluid typography with clamp()resp-container-queries - Use container queries for componentsresp-touch-targets - Size touch targets for mobile (44×44px)resp-viewport-meta - Configure viewport meta tag correctlytypo-font-display - Use font-display to control loading behaviortypo-preload-fonts - Preload critical web fontstypo-readable-line-length - Constrain line length (45-75ch)typo-line-height - Set appropriate line height (1.5-1.7)typo-system-font-stack - Use system font stack for UI elementscolor-contrast-ratio - Meet WCAG contrast ratio requirements (4.5:1)color-not-only-indicator - Never use color alone to convey informationcolor-dark-mode - Support dark mode with prefers-color-schemecolor-semantic-palette - Use semantic color names in design tokensform-inline-validation - Use inline validation after field blurform-error-messages - Write actionable error messagesform-labels-above - Place labels above input fieldsform-input-types - Use correct HTML input types for mobileform-autocomplete - Enable browser autocomplete with correct attributesanim-gpu-properties - Animate only GPU-accelerated propertiesanim-will-change - Use will-change sparingly for animation hintsanim-reduced-motion - Respect user motion preferencesanim-duration-easing - Use appropriate animation duration and easingRead individual reference files for detailed explanations and code examples:
For the complete guide with all rules expanded: AGENTS.md
Weekly Installs
200
Repository
GitHub Stars
85
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode169
codex166
gemini-cli161
claude-code157
github-copilot147
cursor146
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
111,800 周安装