slide-authoring
它能做什么
这是编写或修改 open-slide 页面的技术参考,涵盖版式、颜色、字体、图片、演讲者备注和过渡效果。适合用代码制作幻灯片的人。
适用场景
- ✓当你的智能体即将编写或修改幻灯片页面文件时。
- ✓当幻灯片需要分步显示、页面切换或变形(morph)过渡效果时。
- ✓当你想为幻灯片添加演讲者备注或统一的配色方案时。
技能链接
https://github.com/open-slide/open-slide/blob/main/packages/core/skills/slide-authoring/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为第三张幻灯片添加演讲者备注和淡入过渡,风格与其他页面保持一致。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能规定了页面代码必须遵守的规则:固定的画布尺寸、字号比例、通过设计令牌设置的颜色,以及既定的文件布局。它还为每个构建模块指向一个参考文件,智能体在使用前会先读取它。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Authoring open-slide pages
This skill is the technical reference for everything that happens inside slides/<id>/index.tsx. It does not own a workflow:
create-slideowns "draft a new deck" — it asks the user scoping questions, then delegates the how to this skill.apply-commentsowns "process inspector markers" — it finds markers and applies edits, but the edits themselves follow the rules here.current-slideresolves deictic references ("this page", "the slide I'm on") to a concreteslideId+pageIndex. Consult it first when the user references the current slide without naming it, then come back here for how to edit it.- Any ad-hoc slide edit (manual tweak, one-off fix) should also consult this skill before touching the file.
When any of those paths reach the point of writing React code for a page, this is the source of truth. Do not duplicate the knowledge below into other skills — link here instead.
Primitive references
Each framework primitive has a full reference file under references/ in this skill — contract, worked examples, and its own anti-patterns. This file keeps only the always-on rules and a short summary per primitive. Read the relevant reference file before using a primitive on a page:
| Primitive | Read before | File |
|---|---|---|
design const + var(--osd-X) tokens |
writing any new slide (default baseline) | references/design-system.md |
Assets + <ImagePlaceholder> |
importing images/videos or leaving a placeholder | references/assets.md |
| Webfonts | loading any non-system font | references/webfonts.md |
useSlidePageNumber() |
rendering a page-number footer | references/page-numbers.md |
<Steps> / <Step> |
staging a page's reveal | references/steps.md |
SlideTransition |
declaring any enter/exit animation | references/transitions.md |
MorphElement + morph |
morphing a shared element across pages | references/morph.md |
Hard rules
- Put the slide under
slides/<kebab-case-id>/. - Entry is
slides/<id>/index.tsx. Images/videos/fonts go underslides/<id>/assets/. - Do not touch
package.json,open-slide.config.ts, or other slides. - Do not add dependencies. Only
react,@open-slide/core, and standard web APIs are available. - A slide is one
index.tsxplusassets/— nothing else. Do not create sibling.tsx/.tsfiles (Card.tsx,components/,helpers.ts, etc.); helper components and constants go insideindex.tsx. Do not createREADME.mdor other prose files either — speaker notes / a talk script belong in thenotesexport (see Speaker notes below), not in a markdown file.
File contract
// slides/<id>/index.tsx
import type { Page, SlideMeta } from '@open-slide/core';
const Cover: Page = () => <div>…</div>;
const Body: Page = () => <div>…</div>;
export const meta: SlideMeta = {
title: 'My slide',
createdAt: '2026-05-16T12:00:00Z',
};
export default [Cover, Body] satisfies Page[];
export defaultis a non-empty array of zero-prop React components, one per page, in order.meta.title(optional) shows in the slide header. Default is the folder name.- The slide id is the kebab-case folder name. Pick something short and descriptive (
q2-roadmap,team-offsite-2026). meta.theme(optional) marks the slide as built from a theme underthemes/. The id must match a<id>.mdbasename. Surfaces a back-link chip on the slide card and lists the slide on/themes/<id>. Omit if the slide isn't derived from a registered theme.meta.createdAtis an ISO 8601 string literal (e.g.'2026-05-16T12:00:00Z') set once when the slide is scaffolded. The home page uses it for the default "newest first" sort. Always include it on new slides — immediately before writing the file, runnode -e "console.log(new Date().toISOString())"via Bash and paste the exact output as the value. Don't type a timestamp from memory — you will get the date or time wrong. Must be a plain string literal (nonew Date(...)or imports in the slide itself) — the framework reads it via a regex at build time, not by evaluating the module.
Speaker notes (notes export)
The framework has built-in speaker notes: an optional notes export in index.tsx, index-aligned with the default page array. The viewer shows them in the notes drawer and present mode shows them in the presenter view next to the timer.
**When the user asks for a speech script, talk
常见问题
画布尺寸是多少?
幻灯片使用固定的 1920 × 1080 画布。
设计设置存放在哪里?
存放在每张幻灯片索引文件顶部的设计设置中,你可以对其进行调整。
它是单独使用的吗?
它是基础参考,幻灯片创建和评论工作流都会遵循它。
详情
作者的原始描述
Technical reference for writing or editing open-slide pages — file contract, 1920×1080 canvas, type scale, layout, palette/visual direction, assets, speaker notes, stepped reveals, page transitions, and morph transitions. Consult this whenever you are about to write or modify any file under `slides/<id>/`, including from inside the `create-slide` or `apply-comments` workflows, or for any ad-hoc slide edit. Triggers on phrases like "edit slide", "tweak this page", "fix the layout", "change the palette", "reveal one by one", "add a transition", "morph transition", "write the speaker notes", "gen
repo: open-slide/open-slide
热度
- GitHub 星标
- 9.6k
- 排名
- #12222
- 许可证
- MIT
- 更新时间
- 2026/10/29
评论
- …
同一仓库的更多技能
apply-comments
9.6k帮你的智能体应用你在 open-slide 编辑器中对幻灯片留下的评论,逐条完成所需修改,并删除标记。
create-slide
9.6k帮你的智能体在 open-slide 项目中起草新的幻灯片或演示文稿,选择主题并为你编写页面文件。
create-theme
9.6k帮你的智能体为 open-slide 项目创建可复用的幻灯片主题,包括配色、字体和版式,并附上实时预览文件。
current-slide
9.6k帮你的智能体找出你在 open-slide 查看器中正在看的幻灯片、页面和元素,让“这一页”指向正确的内容。