token-build

GitHub

将 DTCG token 源转换为 CSS、Tailwind、JS/TS、iOS/Android 等多平台主题文件,支持 Style Dictionary 等工具,并集成 CI 验证与对比度检查。

.claude/skills/token-build/SKILL.md plugin87/ux-ui-agent-skills

Trigger Scenarios

生成多平台主题文件 配置 Token 构建流水线 同步 Figma 设计令牌

Install

npx skills add plugin87/ux-ui-agent-skills --skill token-build -g -y
More Options

Non-standard path

npx skills add https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/token-build -g -y

Use without installing

npx skills use plugin87/ux-ui-agent-skills@token-build

指定 Agent (Claude Code)

npx skills add plugin87/ux-ui-agent-skills --skill token-build -a claude-code -g -y

安装 repo 全部 skill

npx skills add plugin87/ux-ui-agent-skills --all -g -y

预览 repo 内 skill

npx skills add plugin87/ux-ui-agent-skills --list

SKILL.md

Frontmatter
{
    "name": "token-build",
    "description": "Set up or run the token build pipeline — transform the DTCG tokens\/*.json (source of truth) into platform artifacts (CSS variables, Tailwind @theme, JS\/TS, iOS Asset Catalog, Android, Compose) with Style Dictionary \/ Tokens Studio \/ W3C DTCG export. Use when the user wants to generate platform theme files from tokens, wire token CI, or multi-platform token output."
}

Skill: Token Build

Turn the DTCG token source of truth into platform-ready outputs. Tokens are authored once; every platform output is generated.

Steps

  1. Read workflows/token-build.md (architecture, tool options, resolution rules, output targets, CI).
  2. Pick the tool: Style Dictionary (multi-platform, the default), Tokens Studio (Figma-owned tokens — pairs with figma-integration), W3C DTCG export, or a small custom script (model on scripts/validate_tokens.py).
  3. Honor the resolution rules: resolve aliases to final values per platform; expose semantic + component tokens (primitives stay internal); emit base + dark/brand/density overrides (tokens/theming.json) as deltas only; format by $type.
  4. Generate the requested target(s): CSS :root vars, Tailwind v4 @theme, typed JS/TS, iOS Asset Catalog + Color.DS/Spacing, Android colors.xml/Compose theme.
  5. Wire CI: on tokens/*.json change, run scripts/validate_tokens.py, regenerate, fail if committed artifacts are stale; gate colors with scripts/contrast.py.

Verification (definition of done)

  • python3 scripts/validate_tokens.py passes (no unresolved aliases).
  • Regenerating produces no diff vs. committed artifacts.
  • Dark/brand/density outputs contain only deltas, not full duplicates.

Version History

  • 93a7fbb Current 2026-07-25 07:41

Same Skill Collection

.claude/skills/a11y-audit/SKILL.md
.claude/skills/apply-aesthetic/SKILL.md
.claude/skills/brandkit/SKILL.md
.claude/skills/design-code/SKILL.md
.claude/skills/design-component/SKILL.md
.claude/skills/design-qa/SKILL.md
.claude/skills/design-review/SKILL.md
.claude/skills/design-tokens/SKILL.md
.claude/skills/figma-integration/SKILL.md
.claude/skills/governance/SKILL.md
.claude/skills/image-to-code/SKILL.md
.claude/skills/migrate-design-system/SKILL.md
.claude/skills/performance/SKILL.md
.claude/skills/prototype/SKILL.md
.claude/skills/redesign/SKILL.md
.claude/skills/ux-writing/SKILL.md

Metadata

Files
0
Version
93a7fbb
Hash
d922d765
Indexed
2026-07-25 07:41

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 06:01
浙ICP备14020137号-1 $Гость$