brandkit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill: Brand Kit
Skill:品牌套件
Stand up the foundation (one token system everything renders from) before any screen. Get this right and every page stays consistent and themeable from one place.
在设计任何界面之前,先搭建好基础层(所有内容渲染都基于的统一token系统)。把这一步做好,所有页面都能保持一致性,且可通过单一入口进行主题定制。
Steps
步骤
- Brief Inference (mandatory) — name the industry, audience, the one mood adjective, and motion depth (→ Brief Inference). Pick an anchoring archetype from
taste/design-taste.md.taste/aesthetic-systems.md - Primitives — generate the brand color ramp in OKLCH (11 shades, consistent chroma) + a neutral ramp; verify the 500 shade ≥ 4.5:1 on white (text) and 600 ≥ 3:1 (UI) per → Color Generation.
.claude/rules/tokens-and-color.md - Semantic layer — map roles to primitives: /
action.primary/-hover,destructive,text.{primary,secondary,on-action,link},surface.{page,card,raised},border.{default,strong}— and the dark overrides (designed, not inverted).feedback.{success,warning,error,info} - Scales — Major Third type scale + composite text styles, 4px spacing scale, radius tiers, elevation, and -style durations/easings.
tokens/motion.json - Emit the DTCG (3-tier) + a single
tokens/*.json(the one shared source,theme.cssoverrides). Optionally feed the token-build pipeline ([data-theme="dark"]skill) for other platforms.token-build
- 需求简报推导(必填) —— 明确行业、受众、核心情绪形容词,以及动效深度(参考→ 需求简报推导)。从
taste/design-taste.md中选择一个锚定的美学原型。taste/aesthetic-systems.md - 基础层 —— 生成OKLCH色彩空间下的品牌色阶(11个色阶,色度一致)+ 中性色阶;根据的要求验证:500色阶在白色背景上的对比度≥4.5:1(文本用),600色阶≥3:1(UI元素用)→ 颜色生成。
.claude/rules/tokens-and-color.md - 语义层 —— 将角色映射到基础层token:/
action.primary/-hover、destructive、text.{primary,secondary,on-action,link}、surface.{page,card,raised}、border.{default,strong}——以及暗色模式的覆盖规则(专门设计,而非简单反色)。feedback.{success,warning,error,info} - 刻度体系 —— 大三度字体刻度+复合文本样式、4px间距刻度、圆角层级、高程,以及符合格式的时长/缓动函数。
tokens/motion.json - 输出 三层结构的DTCG + 单文件
tokens/*.json(唯一共享源,通过theme.css实现暗色覆盖)。可选择将其输入token构建流水线([data-theme="dark"]skill)以适配其他平台。token-build
Verification (definition of done)
验证(完成标准)
- — valid JSON, all aliases resolve.
python3 scripts/validate_tokens.py - — required text/action/border pairs pass WCAG AA in light AND dark;
python3 scripts/validate_contrast.py≥ 3:1.border.strong - — every component
python3 scripts/validate_theme_refs.pyresolves to the theme.var(--…) - One theme, no per-page palettes; destructive = danger token (not primary); zero hardcoded values.
Output is a verified token foundation — the measurable part is provable (run). Brand "feel" still benefits from a human review againstnpm run verify.taste/design-taste.md
- —— JSON格式有效,所有别名均可解析。
python3 scripts/validate_tokens.py - —— 要求的文本/操作/边框对在亮、暗模式下均通过WCAG AA标准;
python3 scripts/validate_contrast.py对比度≥3:1。border.strong - —— 每个组件的
python3 scripts/validate_theme_refs.py都能在主题中解析到对应值。var(--…) - 单一主题,无页面级独立配色;destructive对应danger token(而非primary);零硬编码值。
输出是经过验证的token基础层——可衡量的部分是可验证的(运行即可)。品牌「感觉」部分仍需人工对照npm run verify进行审核。taste/design-taste.md