Design Token logo

Design Token

Community
crane-in-clear-sky
design_token

| 按文档类型(genre)选择主题并输出标准化设计令牌(Design Tokens),驱动 doc-typeset skill 的所有样式决策。 支持公文、学术论文、商务报告、创意营销、通用五大场景,输出含 typography/color/spacing/layout 的 W3C DTCG 格式 JSON 和 CSS 变量映射。 当 generate_word 流水线需要确定排版风格、需要字体/颜色/间距/页边距决策时,必须调用此 skill; 不要跳过它直接写裸值——所有样式决策的唯一入口就是这里。

Overview

Publishercrane-in-clear-sky
RepositoryWorkWit-AI-Agent
Skill namedesign_token
Stars
118
Forks
5
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by crane-in-clear-sky on GitHub. Read the source before you install it.

Installation

Install the Design Token AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/crane-in-clear-sky/WorkWit-AI-Agent/tree/main/workwit/backend/builtin_skills/design_token
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/crane-in-clear-sky/WorkWit-AI-Agent.git /tmp/WorkWit-AI-Agent
mkdir -p .claude/skills
cp -r /tmp/WorkWit-AI-Agent/workwit/backend/builtin_skills/design_token .claude/skills/design_token
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Design Token in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Design Token on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Design Token is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

⚠️ 环境适配:本技能原输出设计令牌驱动 HTML 排版,当前系统排版由 generate_word 完成,正文中的字体/配色规范可作方法论参考。

📎 参考文件说明:正文中引用的 references/、rules/、workflows/ 等子文件未随技能导入(系统仅存单 SKILL.md),请直接依据本文方法论执行,不要尝试读取不存在的参考文件。

design-token Skill

1. 职责

根据文档类型(genre)选择合适的设计令牌主题和版式规则,输出标准化的 DesignTokenOutput,供 doc-typeset skill 消费。版式规则文件作为补充上下文,描述该 genre 对应的国标排版规范(如 GB/T 9704)。

2. 输入/输出

输入

输出

3. Genre → 主题映射

genre说明theme_file预编译产物(直接查表)rules_file
government-doc党政机关公文tokens/themes/formal-government.jsontokens/compiled/government-doc.jsontokens/rules/gb-t-9704-government.md
academic-paper学术论文 / 学位论文tokens/themes/academic-paper.jsontokens/compiled/academic-paper.jsontokens/rules/gb-t-7713-academic.md(含 7714 引用规则)
business-report商务报告 / 分析报告tokens/themes/business-modern.jsontokens/compiled/business-report.json—
marketing-doc创意营销 / 活动方案tokens/themes/creative-marketing.jsontokens/compiled/marketing-doc.json—
general(默认)其他/未明确场景tokens/themes/modern-minimal.jsontokens/compiled/general.json—

当 genre 不在上表时,使用 general 兜底策略。

4. 执行方式(预编译查表,0 次 LLM 往返)

所有主题的 DesignTokenOutput(含 theme_name / tokens / css_variables / typography_rules)已由 scripts/build_tokens.py 预编译为静态产物,存放在 tokens/compiled/。运行时本 skill 只做静态查表:

  1. 按 genre 从 tokens/compiled/index.json 定位对应产物文件(未命中 → general);
  2. 直接读取该 compiled JSON 作为 DesignTokenOutput 返回,无需任何转换或 LLM 推理。

主题 JSON 的字面值已内含精确规范(如 GB/T 9704 页边距、行距磅数),typography_rules 仅作可选溯源上下文,运行时无需读取。

CSS 变量命名 = token 路径扁平化(与 doc-typeset 模板的 token 注入层一致,语义变量 --fs-*/--ff-* 由模板通过 var(--typography-*, fallback) 消费):

维护:修改 tokens/themes/*.json 后,须重跑 python3 scripts/build_tokens.py 重建 tokens/compiled/。

5. 文件结构

Frequently asked questions

What does the Design Token AI skill do?

| 按文档类型(genre)选择主题并输出标准化设计令牌(Design Tokens),驱动 doc-typeset skill 的所有样式决策。 支持公文、学术论文、商务报告、创意营销、通用五大场景,输出含 typography/color/spacing/layout 的 W3C DTCG 格式 JSON 和 CSS 变量映射。 当 generate_word 流水线需要确定排版风格、需要字体/颜色/间距/页边距决策时,必须调用此 skill; 不要跳过它直接写裸值——所有样式决策的唯一入口就是这里。

Why use Design Token on TypingMind?

Because you install it once and use it with any model. Design Token is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Design Token in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/crane-in-clear-sky/WorkWit-AI-Agent/tree/main/workwit/backend/builtin_skills/design_token. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Design Token?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Design Token?

As many as you like. As long as a model supports skills, you can use Design Token with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Design Token AI skill free?

It is published on GitHub by crane-in-clear-sky. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇