design-tokens
Generate, extend, or audit design tokens in DTCG format with the 3-tier architecture (primitive → semantic → component). Use when the user wants a c…
它会碰到什么
扫了多少1 个文本文件,2 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Skill: Design Tokens
Produce and maintain DTCG ($type/$value) tokens following the project's 3-tier system.
Steps
- Read
.claude/rules/tokens-and-color.md→ "Token System" + "Color Guidelines" and.claude/rules/typography-and-spacing.mdfor the rules (4px base, Major Third scale, OKLCH palette generation, dark-mode-at-semantic-layer). - Read the relevant existing files in
tokens/to match structure:colors.json,typography.json,spacing.json,shadows.json,borders.json,breakpoints.json,motion.json,gradients.json,opacity.json,blur.json,sizing.json,states.json,theming.json. - Generate/extend tokens:
- Primitives = raw values (never used directly). Semantic = purpose aliases. Component = component-scoped.
- New palettes: generate 11 OKLCH shades; verify 500 ≥ 4.5:1 on white (text), 600 ≥ 3:1 (UI) using the
a11y-auditskill /scripts/contrast.py. - Multi-brand/density →
theming.json.
- Validate: run
python3 scripts/validate_tokens.py(JSON validity + alias resolution).
Output
DTCG JSON. Preserve $description on every token. Reference, never hardcode.
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。