create-theme
它能做什么
这个技能会为 open-slide 幻灯片构建主题,涵盖颜色、字体、版式和动效,让以后的演示文稿可以共享同一种外观。适合设置幻灯片样式的设计师和开发者。
适用场景
- ✓当你想创建一个拥有独特外观的新幻灯片主题时。
- ✓当你想从现有幻灯片或一组图片中提取主题时。
- ✓当你想要一个预览文件,展示该主题在示例幻灯片上的效果时。
技能链接
https://github.com/open-slide/open-slide/blob/main/packages/core/skills/create-theme/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用这三张参考图片创建一个名为 midnight 的主题。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能会写入两个配对的文件:一个主题文档,包含配色、字体、版式和动效规则;以及一张可运行的小型演示幻灯片,用于主题预览。它只在 themes 文件夹中写入。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Create a slide theme
This skill produces a theme bundle under themes/: two paired files that together describe a reusable visual identity.
themes/<id>.md— agent-facing documentation: palette, typography, layout, fixed Title/Footer/Eyebrow components, motion. This is whatcreate-slidereads when an author picks the theme.themes/<id>.demo.tsx— a runnable mini-slide (a normal slide module:export default Page[]) that demonstrates the theme on 2–3 pages. The dev UI's Themes panel loads this file and renders it as the theme's live preview.
Both files share the same stem so the runtime can pair them automatically.
A theme is distinct from a slide's design const. The theme markdown is authoring-time aesthetic direction (copied into a real slide's source by create-slide). The demo .tsx is a self-contained preview, not a real slide — it does not appear in the slides list. A per-slide const design: DesignSystem = { … } (declared at the top of slides/<id>/index.tsx) is the runtime tokens object the user can tweak from the Design panel. The markdown commits the direction; the per-slide design const makes the slide tweakable; the demo .tsx makes the theme previewable.
You only write files under themes/<id>.md and themes/<id>.demo.tsx. Never modify real slides or other configuration. The canvas / type-scale defaults that themes can override live in the slide-authoring skill — read it before writing the theme so your overrides are stated explicitly.
Step 1 — Identify the input source
A theme can be derived from any combination of three input shapes:
- Image references — paths or URLs to slide screenshots, mood-board images, brand assets.
- Free-text description — prose describing the desired palette, fonts, feel.
- An existing slide —
slides/<id>/index.tsxwhose visual identity should be lifted out into a reusable theme.
If the user's original message already specifies the inputs unambiguously, skip the question and proceed. Otherwise call AskUserQuestion (multi-select) so they can pick one or more sources, and ask follow-ups (paths, slide id, prose) only as needed.
Step 2 — Gather raw inputs
- Images: read each path with the
Readtool (it accepts images). Note dominant colors as hex, type weight/style, layout rhythm, decorative motifs, and any recurring chrome (header bar, footer line, page numbers). - Text: extract explicit tokens (hex codes, font names, motion verbs) and implicit tone words ("editorial", "playful", "brutalist"). Resolve vague language into concrete decisions before writing.
- Existing slide: read
slides/<id>/index.tsxand pull:- The
design.paletteobject (or a legacy top-of-filepaletteconst) → Palette section. design.fonts/ font constants and anyfont-sizepatterns → Typography section.- Padding / alignment patterns → Layout section.
- Recurring components (TrafficLights, Eyebrow, Footer-style helpers, WindowShell, …) → Fixed components section.
@keyframesblocks and the sharedstylesstring → Motion section.- The aesthetic feel implied by the design → Aesthetic paragraph.
- The
When inputs disagree (e.g. images use blue but the description says green), ask the user which to honor.
Step 3 — Pick a theme id
Use kebab-case, short, descriptive. Examples: editorial-noir, brutalist-mono, pastel-soft, dev-terminal. Check themes/ to avoid collisions.
Step 4 — Write themes/<id>.md
Produce a file with this exact section order. Section bodies adapt to the theme; the headings stay consistent across all themes.
---
name: <Human title, e.g. "Editorial Noir">
description: <one-line elevator pitch>
mode: <dark | light — whichever matches the palette's bg>
---
# <Theme name>
## Palette
| Role | Value | Notes |
| ------ | --------- | ------------------------------ |
| bg | `#0f172a` | page background |
| text | `#f8fafc` | primary copy |
| accent | `#fbbf24` | callouts, eyebrow, key numbers |
| muted | `#94a3b8` | secondary copy, dividers |
| ... | ... | extend as the theme requires |
## Typography
- Display font: `<stack>` — weight 800–900 for headlines.
- Body font: `<stack>` — weight 400–500.
- Webfont import (omit for system stacks): `<stylesheet URL>` — see `references/webfonts.md` in `slide-authoring` for loading rules.
- Type-scale overrides (only list
常见问题
主题和幻灯片的设计设置是一回事吗?
不是。主题给出总体方向,而每张幻灯片的设计设置是可以调整的具体数值。
演示幻灯片会出现在我的幻灯片列表中吗?
不会。演示幻灯片只是预览,显示在主题面板中。
它会修改我的实际幻灯片吗?
不会。它只写入主题文件。
详情
作者的原始描述
Use this skill when the user wants to create, draft, author, or extract a slide theme in this open-slide repo. Triggers on phrases like "create a theme", "make a theme called X", "extract a theme from <slide>", "build a theme from these images". Produces two paired files under `themes/` — `<id>.md` (palette, typography, layout, fixed Title/Footer components, motion) and `<id>.demo.tsx` (a runnable demo slide that the dev-UI Themes panel previews). Do NOT use for editing real slides — only for authoring the theme bundle.
repo: open-slide/open-slide
热度
- GitHub 星标
- 9.6k
- 排名
- #12220
- 许可证
- MIT
- 更新时间
- 2026/10/29
评论
- …
同一仓库的更多技能
apply-comments
9.6k帮你的智能体应用你在 open-slide 编辑器中对幻灯片留下的评论,逐条完成所需修改,并删除标记。
create-slide
9.6k帮你的智能体在 open-slide 项目中起草新的幻灯片或演示文稿,选择主题并为你编写页面文件。
current-slide
9.6k帮你的智能体找出你在 open-slide 查看器中正在看的幻灯片、页面和元素,让“这一页”指向正确的内容。
slide-authoring
9.6k为你的智能体提供编写 open-slide 页面的技术规则,包括画布尺寸、字号比例、颜色、图片、备注和过渡效果。