ui-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUI Skills
UI 技能
When invoked, apply these opinionated constraints for building better interfaces.
调用时,请应用这些约束性规范来构建更优质的界面。
MANDATORY: Kimi Delegation for UI Implementation
强制要求:UI实现的Kimi代理机制
All UI implementation work MUST be delegated to Kimi K2.5 via MCP.
Kimi excels at frontend development. Claude reviews, Kimi builds:
javascript
// Delegate UI implementation to Kimi
mcp__kimi__spawn_agent({
prompt: `Implement [component/feature].
Apply ui-skills constraints:
- Tailwind CSS defaults, cn() utility
- Accessible primitives (Base UI/Radix/React Aria)
- No h-screen (use h-dvh), respect safe-area-inset
- Animator only transform/opacity, max 200ms feedback
- text-balance for headings, tabular-nums for data
Existing patterns: [reference files]
Output: ${targetPath}`,
thinking: true
})Workflow:
- Define constraints → Claude (this skill)
- Implement UI → Kimi (Agent Swarm)
- Review quality → Claude (expert panel review)
Anti-pattern: Implementing UI yourself instead of delegating to Kimi.
所有UI实现工作必须通过MCP委托给Kimi K2.5完成。
Kimi擅长前端开发,Claude负责评审,Kimi负责实现:
javascript
// Delegate UI implementation to Kimi
mcp__kimi__spawn_agent({
prompt: `Implement [component/feature].
Apply ui-skills constraints:
- Tailwind CSS defaults, cn() utility
- Accessible primitives (Base UI/Radix/React Aria)
- No h-screen (use h-dvh), respect safe-area-inset
- Animator only transform/opacity, max 200ms feedback
- text-balance for headings, tabular-nums for data
Existing patterns: [reference files]
Output: ${targetPath}`,
thinking: true
})工作流程:
- 定义约束 → Claude(本技能)
- 实现UI → Kimi(Agent集群)
- 质量评审 → Claude(专家小组评审)
反模式: 自行实现UI而非委托给Kimi。
How to use
使用方法
-
Apply these constraints to any UI work in this conversation.
/ui-skills -
Review the file against all constraints below and output:
/ui-skills <file>- violations (quote the exact line/snippet)
- why it matters (1 short sentence)
- a concrete fix (code-level suggestion)
-
将这些约束应用于本次对话中的所有UI工作。
/ui-skills -
根据以下所有约束评审文件并输出:
/ui-skills <文件>- 违规内容(引用确切代码行/片段)
- 违规影响(一句话说明)
- 具体修复方案(代码级建议)
Stack
技术栈
- MUST use Tailwind CSS defaults unless custom values already exist or are explicitly requested
- MUST use (formerly
motion/react) when JavaScript animation is requiredframer-motion - SHOULD use for entrance and micro-animations in Tailwind CSS
tw-animate-css - MUST use utility (
cn+clsx) for class logictailwind-merge
- 除非已有自定义值或被明确要求,否则必须使用Tailwind CSS默认配置
- 当需要JavaScript动画时,必须使用(原
motion/react)framer-motion - 在Tailwind CSS中,入场动画和微动画应使用
tw-animate-css - 类逻辑必须使用工具(
cn+clsx)tailwind-merge
Components
组件
- MUST use accessible component primitives for anything with keyboard or focus behavior (,
Base UI,React Aria)Radix - MUST use the project’s existing component primitives first
- NEVER mix primitive systems within the same interaction surface
- SHOULD prefer for new primitives if compatible with the stack
Base UI - MUST add an to icon-only buttons
aria-label - NEVER rebuild keyboard or focus behavior by hand unless explicitly requested
- 任何涉及键盘或焦点交互的元素,必须使用可访问的组件基础库(、
Base UI、React Aria)Radix - 必须优先使用项目中已有的组件基础库
- 同一交互界面内不得混合使用不同的组件基础库
- 如果与技术栈兼容,新组件基础库应优先选择
Base UI - 纯图标按钮必须添加属性
aria-label - 除非被明确要求,否则不得手动重写键盘或焦点交互逻辑
Interaction
交互设计
- MUST use an for destructive or irreversible actions
AlertDialog - SHOULD use structural skeletons for loading states
- NEVER use , use
h-screenh-dvh - MUST respect for fixed elements
safe-area-inset - MUST show errors next to where the action happens
- NEVER block paste in or
inputelementstextarea
- 破坏性或不可逆操作必须使用组件
AlertDialog - 加载状态应使用结构化骨架屏
- 禁止使用,应使用
h-screenh-dvh - 固定定位元素必须遵循规范
safe-area-inset - 错误提示必须显示在操作发生的位置附近
- 禁止阻止或
input元素的粘贴功能textarea
Animation
动画设计
- NEVER add animation unless it is explicitly requested
- MUST animate only compositor props (,
transform)opacity - NEVER animate layout properties (,
width,height,top,left,margin)padding - SHOULD avoid animating paint properties (,
background) except for small, local UI (text, icons)color - SHOULD use on entrance
ease-out - NEVER exceed for interaction feedback
200ms - MUST pause looping animations when off-screen
- SHOULD respect
prefers-reduced-motion - NEVER introduce custom easing curves unless explicitly requested
- SHOULD avoid animating large images or full-screen surfaces
- 除非被明确要求,否则不得添加动画
- 仅允许对合成器属性(、
transform)添加动画opacity - 禁止对布局属性(、
width、height、top、left、margin)添加动画padding - 除小型局部UI(文本、图标)外,应避免对绘制属性(、
background)添加动画color - 入场动画应使用缓动函数
ease-out - 交互反馈动画时长不得超过
200ms - 循环动画在元素离开屏幕时必须暂停
- 应遵循系统设置
prefers-reduced-motion - 除非被明确要求,否则不得使用自定义缓动曲线
- 应避免对大型图片或全屏元素添加动画
Typography
排版设计
- MUST use for headings and
text-balancefor body/paragraphstext-pretty - MUST use for data
tabular-nums - SHOULD use or
truncatefor dense UIline-clamp - NEVER modify (
letter-spacing) unless explicitly requestedtracking-*
- 标题必须使用,正文/段落必须使用
text-balancetext-pretty - 数据内容必须使用
tabular-nums - 密集型UI应使用或
truncate处理文本溢出line-clamp - 除非被明确要求,否则不得修改(
letter-spacing)tracking-*
Layout
布局设计
- MUST use a fixed scale (no arbitrary
z-index)z-* - SHOULD use for square elements instead of
size-*+w-*h-*
- 必须使用固定的层级规范(不得使用任意
z-index值)z-* - 方形元素应使用替代
size-*+w-*h-*
Performance
性能优化
- NEVER animate large or
blur()surfacesbackdrop-filter - NEVER apply outside an active animation
will-change - NEVER use for anything that can be expressed as render logic
useEffect
- 禁止对大型区域的或
blur()添加动画backdrop-filter - 仅在动画活跃时才能使用属性
will-change - 任何可通过渲染逻辑实现的功能,不得使用
useEffect
Design
设计规范
- NEVER use gradients unless explicitly requested
- NEVER use purple or multicolor gradients
- NEVER use glow effects as primary affordances
- SHOULD use Tailwind CSS default shadow scale unless explicitly requested
- MUST give empty states one clear next action
- SHOULD limit accent color usage to one per view
- SHOULD use existing theme or Tailwind CSS color tokens before introducing new ones
- 除非被明确要求,否则不得使用渐变效果
- 禁止使用紫色或多色渐变
- 禁止将发光效果作为主要交互提示
- 除非被明确要求,否则应使用Tailwind CSS默认阴影层级
- 空状态必须提供明确的下一步操作指引
- 每个视图中强调色的使用应限制为一种
- 引入新颜色前,应优先使用现有主题或Tailwind CSS颜色变量
Expert Panel Review (MANDATORY)
专家小组评审(强制要求)
Before returning ANY design output to the user, it MUST pass expert panel review.
See full details:
references/expert-panel-review.md向用户交付任何设计输出前,必须通过专家小组评审。
详细说明请见:
references/expert-panel-review.mdQuick Reference
快速参考
-
Simulate 10 world-class advertorial experts:
- Ogilvy (advertising), Rams (industrial design), Scher (typography)
- Wiebe (conversion copy), Laja (CRO), Walter (UX)
- Cialdini (persuasion), Ive (product design), Wroblewski (mobile)
- Millman (brand strategy)
-
Each expert scores 0-100 with specific improvement feedback
-
Threshold: 90+ average required
-
If below 90: implement feedback, iterate, re-review
-
Only return design to user when 90+ achieved
-
模拟10位世界级广告与设计专家:
- Ogilvy(广告)、Rams(工业设计)、Scher(排版设计)
- Wiebe(转化文案)、Laja(转化率优化)、Walter(用户体验)
- Cialdini(说服心理学)、Ive(产品设计)、Wroblewski(移动设计)
- Millman(品牌策略)
-
每位专家给出0-100分的评分,并提供具体的改进意见
-
评分阈值:平均得分需达到90分以上
-
若低于90分:落实改进意见、迭代优化、重新评审
-
仅当平均得分达到90分以上时,方可向用户交付设计
Example Output
输出示例
markdown
Expert Panel Review: Hero Section
| Expert | Score | Critical Improvement |
|--------|-------|---------------------|
| Ogilvy | 88 | Lead with benefit, not feature |
| Rams | 94 | Clean, focused |
| Scher | 86 | H2 needs more weight contrast |
| Wiebe | 81 | "Get Started" → "Start Free Trial" |
| Laja | 77 | No social proof above fold |
| Walter | 90 | Good emotional resonance |
| Cialdini | 83 | Add urgency element |
| Ive | 92 | Refined execution |
| Wroblewski | 88 | Touch targets good |
| Millman | 85 | Voice slightly inconsistent |
**Average: 86.4** ❌ Below threshold
Implementing: Laja (social proof), Wiebe (CTA), Cialdini (urgency)...markdown
Expert Panel Review: Hero Section
| Expert | Score | Critical Improvement |
|--------|-------|---------------------|
| Ogilvy | 88 | Lead with benefit, not feature |
| Rams | 94 | Clean, focused |
| Scher | 86 | H2 needs more weight contrast |
| Wiebe | 81 | "Get Started" → "Start Free Trial" |
| Laja | 77 | No social proof above fold |
| Walter | 90 | Good emotional resonance |
| Cialdini | 83 | Add urgency element |
| Ive | 92 | Refined execution |
| Wroblewski | 88 | Touch targets good |
| Millman | 85 | Voice slightly inconsistent |
**Average: 86.4** ❌ Below threshold
Implementing: Laja (social proof), Wiebe (CTA), Cialdini (urgency)...Anti-Patterns
反模式
- ❌ Skipping review for "quick fixes"
- ❌ Accepting 85+ as "close enough"
- ❌ Generic feedback ("make it better")
- ❌ Returning design without 90+ score
- ❌ 为“快速修复”跳过评审
- ❌ 将85分以上视为“足够接近”
- ❌ 给出泛泛的反馈(如“做得更好”)
- ❌ 未达到90分以上就交付设计