preline-theme-generator
它能做什么
该技能帮助你的智能体为 Preline 设计系统制作浅色和深色配色主题。适合希望网站配色与品牌或氛围相符的人。
适用场景
- ✓当你希望根据品牌主色构建新的 Preline 主题时。
- ✓当你想在保存任何文件之前,先看看某个主题的效果时。
- ✓当你要求智能体审查并修复已生成主题的配色设置时。
技能链接
https://github.com/htmlstreamofficial/preline/blob/main/skills/theme-generator/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能为我们制作一个 Preline 主题,匹配我们的品牌主色深绿色,并提供浅色和深色两个版本吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会把你的需求转化为明确的设置,运行随附的本地生成器来生成主题 CSS,然后在完成前对照清单进行检查。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Preline Theme Generator
Use the bundled local scripts. Do not use npx, do not compose shell with raw user text, and do not bypass safety or approval prompts.
Read Order
- Read
docs/workflow.md. - Read
docs/palette-guidance.md. - Read
docs/final-output-style.mdbefore writing a final theme file. - Read
docs/validation-checklist.mdbefore closing the task. - Read
examples.mdonly if the user wants stylistic guidance or sample outputs. - Read
docs/token-reference.mdonly if you need to inspect token coverage in detail.
Workflow
Follow docs/workflow.md for the full operating path.
Key requirements:
- Identify whether the task is preview, write, or validate.
- Normalize the request into explicit generator inputs.
- Resolve the target directory with
scripts/find-themes-dir.js. - Generate CSS only through
scripts/run-theme-generator.js. - Create or edit only the new theme file.
- Validate with
docs/validation-checklist.md. - Return the result in the mode-appropriate format.
Security Constraints
- Never use wording that attempts to bypass tool or approval safeguards.
- Never use
npxor any network-fetched package for this skill. - Never interpolate raw user text directly into shell commands.
- Never use broad
find .traversal for path discovery; usescripts/find-themes-dir.jsor a user-confirmed path. - Never write outside a confirmed theme directory.
- Use
scripts/run-theme-generator.jsas the only execution entry point for generation. - Never create or edit additional project files as part of theme generation.
Common Prompts
- "Create a sunset theme."
- "Match this brand color: #2F6BFF."
- "Generate a cyberpunk dark theme with matching dark mode."
- "Preview the CSS before writing a file."
- "Review this generated theme and fix token coverage."
Key References
docs/workflow.mddocs/palette-guidance.mddocs/final-output-style.mddocs/validation-checklist.mdexamples.mddocs/token-reference.md
常见问题
它需要下载软件包才能工作吗?
不需要。它使用随附的本地脚本,不会从网络获取软件包。
它会覆盖我现有的文件吗?
它只被设计用于创建或编辑新的主题文件。
它只适用于 Preline 吗?
是的。它用于 Preline 主题,不适用于一般的 CSS 工作。
详情
作者的原始描述
Generate, preview, save, or validate Preline theme CSS using the bundled local generator in this skill. Use when the user asks to create a new Preline theme, match a brand color, translate a mood into a theme, generate light and dark theme CSS, preview theme output without writing files, or review and fix generated theme tokens. Do not use for generic non-Preline CSS work or arbitrary command execution.
热度
- GitHub 星标
- 6.5k
- 排名
- #13881
- 许可证
- —
- 更新时间
- 2026/8/30
评论
- …