token-build

GitHub

将 DTCG JSON 令牌源转换为 CSS、Tailwind、JS/TS、iOS 及 Android 等平台产物,支持 Style Dictionary 等工具,并集成 CI 验证与对比度检查。

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

触发场景

用户希望从令牌生成平台主题文件 配置令牌持续集成流程 需要多平台令牌输出

安装

npx skills add plugin87/ux-ui-agent-skills --skill token-build -g -y
更多选项

非标准路径

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

不安装直接使用

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

Step 0: is the kit here? This skill reads files from the kit. Check once: ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING On KIT_MISSING only the skill folders were installed, which is what npx skills add does. Say so plainly, point the user at npx ux-ui-agent-skills init or the plugin install, and stop. Do not guess the contents of a file you could not open.

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

Steps

  1. Read ${CLAUDE_SKILL_DIR}/../../../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 ${CLAUDE_SKILL_DIR}/../../../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 (${CLAUDE_SKILL_DIR}/../../../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 ${CLAUDE_SKILL_DIR}/../../../tokens/*.json change, run ${CLAUDE_SKILL_DIR}/../../../scripts/validate_tokens.py, regenerate, fail if committed artifacts are stale; gate colors with ${CLAUDE_SKILL_DIR}/../../../scripts/contrast.py.

Verification (definition of done)

  • python3 ${CLAUDE_SKILL_DIR}/../../../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.

版本历史

  • def84a7 当前 2026-11-03 02:22

    统一代码库中所有连字符为普通短横线,移除 emoji 检查中的例外,更新 README 标语及截图逻辑,修复文档与脚本中的标点格式问题。

  • 62092bd 2026-10-19 09:20

    增加安装路径可达性检测机制,修复插件在不同安装方式下无法正确引用资源的问题。

  • 2ffb677 2026-08-28 12:00
  • 93a7fbb 2026-07-25 07:41

同 Skill 集合

.claude/skills/a11y-audit/SKILL.md
.claude/skills/apply-aesthetic/SKILL.md
.claude/skills/brandkit/SKILL.md
.claude/skills/critique/SKILL.md
.claude/skills/design-code/SKILL.md
.claude/skills/design-component/SKILL.md
.claude/skills/design-doctrine/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/gate/SKILL.md
.claude/skills/governance/SKILL.md
.claude/skills/grill-me/SKILL.md
.claude/skills/image-to-code/SKILL.md
.claude/skills/migrate-design-system/SKILL.md
.claude/skills/observe/SKILL.md
.claude/skills/performance/SKILL.md
.claude/skills/prototype/SKILL.md
.claude/skills/redesign/SKILL.md
.claude/skills/scaffold-project/SKILL.md
.claude/skills/ship/SKILL.md
.claude/skills/ux-writing/SKILL.md
.claude/skills/data-dashboard/SKILL.md
.claude/skills/design-screen/SKILL.md

元信息

文件数
0
版本
def84a7
Hash
66ae1ed8
收录时间
2026-07-25 07:41

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-04 14:07
浙ICP备14020137号-1