shade-no-dark-variants
它能做什么
这个技能告诉 AI 智能体如何在基于 Shade 的界面中处理深色模式。适合希望其界面在浅色和深色主题下都显示正确的开发者。
适用场景
- ✓当你在 Shade 界面中编写或审查深色模式类的时候。
- ✓当某个界面只在深色模式下显示错误的时候。
- ✓当你不确定是否需要深色颜色类的时候。
技能链接
https://github.com/TryGhost/Ghost/blob/main/apps/shade/skills/shade-no-dark-variants/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的 Ghost 应用界面只在深色模式下显示有问题,我想用正确的方法修复它。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会找出所有深色模式颜色类,并将它们替换为 Shade 的语义令牌,这些令牌会自动在主题之间切换。只有少数有文档记录的例外情况才保留深色类。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Shade no dark variants
Shade's semantic tokens carry both themes. The rules, the fix and the exceptions live in Tokens: Dark mode.
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
- Find every
dark:class in the code you're writing or reviewing. - For each one that sets a colour, follow the three fix steps in
Dark mode. Pick the replacement token
with
shade-tokens-not-hex. - Keep a
dark:class only when it matches an exception that section names. - When debugging a dark-mode-only problem, change the token rather than adding a variant.
Self-check
- Each remaining
dark:class is one of the documented exceptions. - You viewed the changed screen in both themes.
常见问题
为什么要避免单独的深色颜色类?
Shade 的语义令牌已经能同时处理两种主题,因此该技能优先使用它们,而不是单独的深色类。
有没有例外?
有。文档列出了一些仍允许使用深色类的情况。
改动后应检查什么?
该技能要求在浅色和深色两种主题下查看改动后的界面。
详情
作者的原始描述
Make dark mode work through Shade's semantic tokens. Use when writing or reviewing `dark:` classes, or when something looks wrong only in dark mode.
repo: TryGhost/Ghost
热度
- GitHub 星标
- 56k
- 排名
- #3283
- 许可证
- 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 应用的界面,并将它指向正确的文档和技能。