shade-tokens-not-hex
它能做什么
这个技能告诉 AI 智能体从 Shade 的命名令牌中为界面选择颜色,而不是使用固定的颜色代码。适合希望其界面与 Ghost 设计保持一致的开发者。
适用场景
- ✓当你为背景、文字、边框或悬停状态选择颜色的时候。
- ✓当你在审查界面中是否有硬编码的颜色值的时候。
- ✓当你需要某种标准令牌无法覆盖的颜色的时候。
技能链接
https://github.com/TryGhost/Ghost/blob/main/apps/shade/skills/shade-tokens-not-hex/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我为 Ghost 应用中卡片的背景和边框上色,并使用正确的设计令牌。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会说明每种颜色的用途,查找对应的语义令牌,并以文档所示的形式写入。只有在文档允许的情况下,才会使用原始令牌。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Shade tokens, not hex
Every colour on a Ghost screen comes from a Shade token. The rules live in Tokens.
Docs links use https://shade.ghost.org. If the project's AGENTS.md says
where Shade's docs are (another address, or a source folder), use that
instead. Fetch web pages with curl -s.
Workflow
- Name the job of each colour you're about to write: canvas, surface, floating menu, text, border, form control, hover, destructive or focus.
- Look the job up in Common semantic tokens. Choose between close candidates with Surface elevation, Interactive surfaces and Form control borders.
- Write it the way Rules of consumption shows, in classes and in stylesheets.
- When no semantic token fits, Two flavours and Source files say what to use instead.
Self-check
- Every colour, border and hover in your diff is a semantic token, or a raw token for a case the docs allow.
- The screen looks right in both light and dark mode. For any
dark:class, runshade-no-dark-variants.
常见问题
为什么要使用令牌而不是十六进制代码?
令牌能让颜色在整个设计系统中保持一致,而且语义令牌还会随当前主题自动调整。
如果没有合适的令牌怎么办?
文档说明了在这种情况下如何使用另一种令牌或源文件。
它如何检查我的工作?
它的自检要求你的改动中每种颜色都是语义令牌,或是文档允许的原始令牌。
详情
作者的原始描述
Colour Ghost UI with Shade's semantic tokens. Use when choosing colours or styling UI, including surfaces, text, borders and hover states.
repo: TryGhost/Ghost
热度
- GitHub 星标
- 56k
- 排名
- #3286
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
tinybird-cli-guidelines
56k指导你的智能体使用 Tinybird CLI 命令进行本地开发、分支工作、构建、部署和数据管理。
tinybird
56k教你的智能体为数据源、管道、端点和物化视图编写 Tinybird 文件格式、SQL 规则和性能模式。
build-ghost-app
56k帮你的智能体使用 Vite 和 React 构建 Ghost 应用,将其连接到 Ghost Admin,并设置其清单和安装链接。
build-ghost-app-ui
56k帮你的智能体使用 Ghost 的设计系统 Shade 构建 Ghost 应用的界面,并将它指向正确的文档和技能。