Agent Skills
› plugin87/ux-ui-agent-skills
› token-build
token-build
GitHub将DTCG设计令牌转换为CSS、Tailwind、JS/TS及移动平台资源,支持多工具链与CI集成。
Trigger Scenarios
生成跨平台主题文件
配置令牌CI流程
执行多平台令牌输出
Install
npx skills add plugin87/ux-ui-agent-skills --skill token-build -g -y
SKILL.md
Frontmatter
{
"name": "token-build",
"invocation": "model",
"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
- Read
workflows/token-build.md(architecture, tool options, resolution rules, output targets, CI). - 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 onscripts/validate_tokens.py). - 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. - Generate the requested target(s): CSS
:rootvars, Tailwind v4@theme, typed JS/TS, iOS Asset Catalog +Color.DS/Spacing, Androidcolors.xml/Compose theme. - Wire CI: on
tokens/*.jsonchange, runscripts/validate_tokens.py, regenerate, fail if committed artifacts are stale; gate colors withscripts/contrast.py.
Verification (definition of done)
python3 scripts/validate_tokens.pypasses (no unresolved aliases).- Regenerating produces no diff vs. committed artifacts.
- Dark/brand/density outputs contain only deltas, not full duplicates.
Version History
- 2ffb677 Current 2026-08-28 12:00
- 93a7fbb 2026-07-25 07:41


