重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
slide-deck by code-on-sunday/slide-deck-generator
npx skills add https://github.com/code-on-sunday/slide-deck-generator --skill slide-deck你正在构建一个基于浏览器的演示幻灯片,它是一个 React + Vite 应用。你的工作是制作出感觉是手工精心制作、富有意图的幻灯片——绝不能看起来是通用或 AI 生成的。
在开始编写任何幻灯片代码之前,如果用户没有提供演示内容/主题,你必须向用户询问。 不要编造内容。你可以先搭建应用外壳和样式系统,但所有实际的幻灯片内容必须来自用户或本目录中的 slide-guidelines.md 文件。
| 层级 | 选择 |
|---|---|
| 构建工具 | Vite |
| 框架 | React 18+ 配合 TypeScript |
| 动画 | Framer Motion (motion/react) |
| 样式 | Tailwind CSS v4 |
| 图表 | Recharts |
| 图标 | Lucide React |
| 路由 | 键盘/点击导航(无需路由库) |
| 代码高亮 | (仅在需要时)Prism React Renderer |
只安装你需要的库。不要推测性地添加库。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
slides/
├── index.html
├── package.json
├── vite.config.ts
├── tailwind.config.ts
├── tsconfig.json
├── public/
│ └── images/ # 所有幻灯片图片放在这里
├── src/
│ ├── main.tsx
│ ├── App.tsx # 幻灯片外壳、导航、键盘控制
│ ├── index.css # Tailwind 导入 + 自定义字体 + 基础样式
│ ├── slides/
│ │ ├── index.ts # 导出所有幻灯片的顺序数组
│ │ ├── 01-intro.tsx
│ │ ├── 02-problem.tsx
│ │ └── ... # 每个文件对应一张幻灯片或一小组相关幻灯片
│ ├── components/
│ │ ├── SlideLayout.tsx # 共享的幻灯片包装器(缩放、内边距、背景)
│ │ ├── AnimatedText.tsx # 可复用的文本入场动画
│ │ ├── Chart.tsx # Recharts 包装器
│ │ ├── ImageSlide.tsx # 图片显示组件
│ │ ├── InteractiveBlock.tsx # 用于每张幻灯片的自定义交互式 UI
│ │ └── ...
│ └── lib/
│ ├── animations.ts # 共享的 Framer Motion 变体和过渡效果
│ ├── theme.ts # 调色板、字体大小、间距标记
│ └── useSlideScale.ts # 用于适应视口的缩放钩子
在选择颜色和字体之前,询问用户希望观众产生什么感觉:
| 氛围 | 描述 |
|---|---|
| 印象深刻 / 自信 | 专业、可信、大胆 |
| 兴奋 / 充满活力 | 创新、大胆、富有创意 |
| 平静 / 专注 | 清晰、深思熟虑、极简 |
| 受启发 / 感动 | 情感化、令人难忘、优雅 |
根据氛围,从下表中建议 2-3 个预设。每个预设都定义了字体、颜色和标志性视觉元素。不要随意混搭——完全遵循一个预设。
| 预设 | 氛围 | 标题字体 | 正文字体 | 颜色 | 标志性元素 |
|---|---|---|---|---|---|
| Bold Signal | 自信 | Archivo Black (900) | Space Grotesk (400) | #1a1a1a 背景, #FF5722 强调色卡片, 白色文字 | 彩色卡片作为焦点,大号章节数字,网格布局 |
| Electric Studio | 自信 | Manrope (800) | Manrope (400) | #0a0a0a 背景, #4361ee 强调蓝色, 白色文字 | 垂直两栏分割,边缘强调条 |
| Creative Voltage | 充满活力 | Syne (700) | Space Mono (400) | #0066ff 主色, #1a1a2e 深色, #d4ff00 霓虹色 | 电光蓝 + 霓虹黄,半色调纹理 |
| Dark Botanical | 受启发 | Cormorant (400) 衬线体 | IBM Plex Sans (300) | #0f0f0f 背景, #d4a574 暖色强调, #e8b4b8 粉色 | 抽象模糊渐变圆形,细强调线 |
| 预设 | 氛围 | 标题字体 | 正文字体 | 颜色 | 标志性元素 |
|---|---|---|---|---|---|
| Notebook Tabs | 有条理 | Bodoni Moda (700) 衬线体 | DM Sans (400) | #f8f6f1 页面, #2d2d2d 外部, 彩色标签 | 深色背景上的纸片卡片,彩色章节标签 |
| Pastel Geometry | 友好 | Plus Jakarta Sans (700) | Plus Jakarta Sans (400) | #c8d9e6 背景, #faf9f7 卡片, 柔和色块 | 圆角卡片,垂直色块,柔和阴影 |
| Vintage Editorial | 受启发 | Fraunces (700) 衬线体 | Work Sans (400) | #f5f3ee 奶油色, #1a1a1a 文字, #e8d4c0 暖色 | 几何形状(圆形 + 线条 + 点),粗边框 |
| Swiss Modern | 专注 | Archivo (800) | Nunito (400) | 纯白色, 纯黑色, #ff3300 红色强调 | 可见网格,不对称布局,几何形状 |
| 预设 | 氛围 | 字体 | 颜色 | 标志性元素 |
|---|---|---|---|---|
| Neon Cyber | 科技感 | Clash Display + Satoshi | #0a0f1c 海军蓝, #00ffcc 青色, #ff00aa 品红色 | 霓虹发光,网格图案,粒子状效果 |
| Terminal Green | 黑客风 | JetBrains Mono | #0d1117 深色, #39d353 绿色 | 扫描线,闪烁光标,代码美学 |
| Paper & Ink | 编辑风 | Cormorant Garamond + Source Serif 4 | #faf9f7 奶油色, #1a1a1a 炭黑色, #c41e3a 深红色 | 首字下沉,引文,优雅的水平线 |
一旦选定,在 src/lib/theme.ts 中定义完整主题,并在 src/index.css 中作为 CSS 自定义属性定义:
使用你选择的预设中的字体搭配。通过 CSS 中的 @import 从 Google Fonts 或 Fontshare 加载。
字体族不超过 2 个。
标题:大号且粗体。正文:稀少。
永远不要居中对齐正文段落。 左对齐或使用精心设计的布局。
所有字体大小必须使用 clamp(min, preferred, max) —— 永远不要为文本使用固定的 px/rem。这确保了跨视口大小的可读性。
/* clamp 值示例 */ --title-size: clamp(2rem, 6vw, 5rem); --subtitle-size: clamp(0.875rem, 2vw, 1.25rem); --body-size: clamp(0.75rem, 1.2vw, 1rem);
完全遵循你预设的调色板。定义为 CSS 自定义属性。
营造氛围,而非扁平色彩。 使用 CSS 渐变叠加来创造深度,而不是单一纯色背景:
/* 用于深度的分层渐变 */ background: radial-gradient(ellipse at 20% 80%, rgba(120, 0, 255, 0.15) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(0, 255, 200, 0.1) 0%, transparent 50%), var(--bg-primary);
/* 用于结构的微妙网格图案 */ background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 50px 50px;
带有鲜明强调色的主色调胜过胆怯、均匀分布的调色板。
transform: scale() 缩放以适应视口(类似于 reveal.js)。所有内容都以 1280×720 创作并统一缩放。style={{}},而不是 Tailwind 的内边距类。style={{ padding: '20px 48px' }},内容卡片使用 style={{ padding: '24px 32px' }},按钮使用 style={{ padding: '16px 32px' }}。SlideLayout 组件处理缩放 + 居中。每张幻灯片必须适应 1280×720 容器。内容溢出?分割成多张幻灯片。永远不要塞满,永远不要滚动。
| 幻灯片类型 | 最大内容量 |
|---|---|
| 标题幻灯片 | 1 个标题 + 1 个副标题 + 可选标语 |
| 内容幻灯片 | 1 个标题 + 4-6 个要点 或 1 个标题 + 2 个短段落 |
| 功能网格 | 1 个标题 + 最多 6 张卡片 (2×3 或 3×2) |
| 图表幻灯片 | 1 个标题 + 1 个图表 |
| 引用幻灯片 | 1 条引用(最多 3 行)+ 出处 |
| 图片幻灯片 | 1 个标题 + 1 张图片(最大为幻灯片高度的 60%) |
| 交互式幻灯片 | 1 个标题 + 交互式元素(保持控件最少) |
bg-white/5 配合 border border-white/10 —— 永远不要使用纯色表面颜色。border-l border-muted/20 作为左侧强调,永远不要用 border-l-2。使用 border border-white/10 作为容器边框。| 类别 | 禁止项 |
|---|---|
| 字体 | Inter, Roboto, Arial, 系统字体作为标题字体。同时避免每个幻灯片都使用 Space Grotesk —— 改变你的选择。 |
| 颜色 | #6366f1(通用靛蓝色),紫色-白色渐变,柔和彩虹色,均匀分布的“安全”调色板 |
| 布局 | 所有内容垂直堆叠居中,相同的卡片网格,通用的英雄区域 |
| 装饰 | 写实插图,无意义的毛玻璃效果,无目的的投影,渐变网格背景 |
| 感觉 | 动画风格 | 视觉提示 |
|---|---|---|
| 戏剧性 / 电影感 | 缓慢淡入 (0.8-1.2s),大比例过渡 (0.9→1) | 深色背景,聚光灯效果 |
| 科技感 / 未来感 | 霓虹发光,文字打乱/揭示效果 | 网格图案,等宽字体强调,青色/品红色 |
| 俏皮 / 友好 | 弹性缓动(柔和弹簧),浮动动效 | 圆角,明亮色彩 |
| 专业 | 微妙快速的动画 (200-300ms),干净的幻灯片 | 精确间距,数据可视化焦点 |
| 平静 / 极简 | 非常缓慢的微妙动效,柔和淡入淡出 | 高留白,柔和调色板,衬线字体 |
| 编辑风 | 错开的文字揭示,图文互动 | 强烈的字体层次结构,引文,打破网格 |
[0.25, 0.1, 0.25, 1](平滑减速,相当于 ease-out-expo)AnimatePresence 配合 mode="wait" 进行幻灯片切换标题:淡入 + translateY,首先到达
支持内容:标题后错开淡入
图表/图片:淡入 + 从 0.95 到 1 的微妙缩放
使用 variants 模式进行编排动画:
const container = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.1 } } };
const item = { hidden: { opacity: 0, y: 20 }, show: { opacity: 1, y: 0, transition: { duration: 0.5, ease: [0.25, 0.1, 0.25, 1] } } };
step 状态spring(欠阻尼弹簧看起来像玩具)rotate 动画prefers-reduced-motion 支持始终包含减少动效支持。包装动画变体:
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
const item = prefersReducedMotion
? { hidden: { opacity: 0 }, show: { opacity: 1 } }
: { hidden: { opacity: 0, y: 20 }, show: { opacity: 1, y: 0, transition: { duration: 0.5 } } };
clamp(2.5rem, 6vw, 5rem)public/images/ 中/images/文件名.扩展名clamp(1.5rem, 3vw, 2.5rem),居中或左对齐data-interactive 属性以防止点击时意外切换幻灯片target="_blank")file:/// 协议链接data-interactive、button、input 的元素)step 子导航,然后再前进到下一张幻灯片参考本目录中的 slide-guidelines.md 获取教学结构:
在创建幻灯片之前,你必须向用户询问实际内容/主题。 上面的内容指南描述的是结构,而不是幻灯片中应该放什么。
npm create vite@latest . -- --template react-ts # 仅当全新开始时
npm install
npm run dev
应用应该可以通过 npm run dev 运行,并可在 localhost 查看。没有构建错误。没有 TypeScript 错误。
在交付任何一批幻灯片之前,请验证:
npm run dev 启动无错误npx tsc --noEmit)npx vite build 成功public/images/ 中style={{}} 实现,而不是 Tailwind 类border-white/10, border-muted/20,永远不要使用纯色表面颜色边框clamp() —— 文本没有固定的 px/rempublic/images/)。使用带有文件名的可见占位符,以便他们知道缺少什么。始终保持应用处于可运行状态。永远不要留下损坏的导入或缺失的文件。
每周安装
59
仓库
GitHub 星标
78
首次出现
10 天前
安全审计
安装于
codex59
opencode58
gemini-cli58
github-copilot58
amp58
cline58
You are building a browser-based presentation slide deck as a React + Vite app. Your job is to produce slides that feel handcrafted and intentional — never generic or AI-generated looking.
Before you begin coding any slides, you MUST ask the user for the presentation content/topic if it has not been provided. Do not invent content. You may scaffold the app shell and styling system first, but all actual slide content must come from the user or from slide-guidelines.md in this directory.
| Layer | Choice |
|---|---|
| Build | Vite |
| Framework | React 18+ with TypeScript |
| Animation | Framer Motion (motion/react) |
| Styling | Tailwind CSS v4 |
| Charts | Recharts |
| Icons | Lucide React |
| Routing | Keyboard/click navigation (no router needed) |
| Code highlighting | (only if needed) Prism React Renderer |
Install only what you need. Do not add libraries speculatively.
slides/
├── index.html
├── package.json
├── vite.config.ts
├── tailwind.config.ts
├── tsconfig.json
├── public/
│ └── images/ # All slide images go here
├── src/
│ ├── main.tsx
│ ├── App.tsx # Slide deck shell, navigation, keyboard controls
│ ├── index.css # Tailwind imports + custom fonts + base styles
│ ├── slides/
│ │ ├── index.ts # Export ordered array of all slides
│ │ ├── 01-intro.tsx
│ │ ├── 02-problem.tsx
│ │ └── ... # One file per slide or small group of related slides
│ ├── components/
│ │ ├── SlideLayout.tsx # Shared slide wrapper (scaling, padding, background)
│ │ ├── AnimatedText.tsx # Reusable text entrance animations
│ │ ├── Chart.tsx # Recharts wrapper
│ │ ├── ImageSlide.tsx # Image display component
│ │ ├── InteractiveBlock.tsx # For custom interactive UI per slide
│ │ └── ...
│ └── lib/
│ ├── animations.ts # Shared Framer Motion variants and transitions
│ ├── theme.ts # Color palette, font sizes, spacing tokens
│ └── useSlideScale.ts # Hook for viewport-fitting scale
Before choosing colors and fonts, ask the user what feeling the audience should have:
| Mood | Description |
|---|---|
| Impressed / Confident | Professional, trustworthy, bold |
| Excited / Energized | Innovative, bold, creative |
| Calm / Focused | Clear, thoughtful, minimal |
| Inspired / Moved | Emotional, memorable, elegant |
Based on mood, suggest 2-3 presets from the table below. Each preset defines fonts, colors, and signature visual elements. Do NOT mix and match randomly — commit to one preset fully.
| Preset | Mood | Display Font | Body Font | Colors | Signature |
|---|---|---|---|---|---|
| Bold Signal | Confident | Archivo Black (900) | Space Grotesk (400) | #1a1a1a bg, #FF5722 accent card, white text | Colored card as focal, large section numbers, grid layout |
| Electric Studio | Confident | Manrope (800) | Manrope (400) | #0a0a0a bg, #4361ee accent blue, white text | Two-panel vertical split, accent bar on edge |
| Preset | Mood | Display Font | Body Font | Colors | Signature |
|---|---|---|---|---|---|
| Notebook Tabs | Organized | Bodoni Moda (700) serif | DM Sans (400) | #f8f6f1 page, #2d2d2d outer, colorful tabs | Paper card on dark bg, colored section tabs |
| Pastel Geometry | Friendly | Plus Jakarta Sans (700) | Plus Jakarta Sans (400) | #c8d9e6 bg, #faf9f7 card, pastel pills | Rounded card, vertical pills, soft shadow |
| Preset | Mood | Font | Colors | Signature |
|---|---|---|---|---|
| Neon Cyber | Techy | Clash Display + Satoshi | #0a0f1c navy, #00ffcc cyan, #ff00aa magenta | Neon glow, grid patterns, particle-like effects |
| Terminal Green | Hacker | JetBrains Mono | #0d1117 dark, #39d353 green | Scan lines, blinking cursor, code aesthetic |
Once chosen, define the full theme in src/lib/theme.ts and as CSS custom properties in src/index.css:
Use the font pairing from your chosen preset. Load from Google Fonts or Fontshare via @import in CSS.
No more than 2 font families.
Headlines: large and bold. Body text: scarce.
Never center-align body paragraphs. Left-align or use deliberate layout.
ALL font sizes must useclamp(min, preferred, max) — never fixed px/rem for text. This ensures readability across viewport sizes.
/* Example clamp values */ --title-size: clamp(2rem, 6vw, 5rem); --subtitle-size: clamp(0.875rem, 2vw, 1.25rem); --body-size: clamp(0.75rem, 1.2vw, 1rem);
Commit fully to your preset's palette. Define as CSS custom properties.
Create atmosphere, not flat colors. Layer CSS gradients for depth instead of a single solid background color:
/* Layered gradient for depth */ background: radial-gradient(ellipse at 20% 80%, rgba(120, 0, 255, 0.15) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(0, 255, 200, 0.1) 0%, transparent 50%), var(--bg-primary);
/* Subtle grid pattern for structure */ background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 50px 50px;
Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
transform: scale() to fit the viewport (like reveal.js). All content is authored at 1280×720 and uniformly scaled.style={{}} with px values instead of Tailwind padding classes.style={{ padding: '20px 48px' }} for horizontal chips, style={{ padding: '24px 32px' }} for content cards, style={{ padding: '16px 32px' }} for buttons.SlideLayout component handles the scaling + centering.Every slide MUST fit within the 1280×720 container. Content overflows? Split into multiple slides. Never cram, never scroll.
| Slide Type | Maximum Content |
|---|---|
| Title slide | 1 heading + 1 subtitle + optional tagline |
| Content slide | 1 heading + 4-6 bullet points OR 1 heading + 2 short paragraphs |
| Feature grid | 1 heading + 6 cards maximum (2×3 or 3×2) |
| Chart slide | 1 heading + 1 chart |
| Quote slide | 1 quote (max 3 lines) + attribution |
| Image slide | 1 heading + 1 image (max 60% slide height) |
| Interactive slide | 1 heading + interactive element (keep controls minimal) |
bg-white/5 with border border-white/10 — never solid surface colors.border-l border-muted/20 for left accents, never border-l-2. Use border border-white/10 for containers.| Category | Banned |
|---|---|
| Fonts | Inter, Roboto, Arial, system fonts as display. Also avoid converging on Space Grotesk for every deck — vary your choices. |
| Colors | #6366f1 (generic indigo), purple-on-white gradients, pastel rainbow, evenly-distributed "safe" palettes |
| Layouts | Everything centered in a vertical stack, identical card grids, generic hero sections |
| Decorations | Realistic illustrations, gratuitous glassmorphism, drop shadows without purpose, gradient mesh backgrounds |
| Feeling | Animation Style | Visual Cues |
|---|---|---|
| Dramatic / Cinematic | Slow fade-ins (0.8-1.2s), large scale transitions (0.9→1) | Dark backgrounds, spotlight effects |
| Techy / Futuristic | Neon glow, text scramble/reveal effects | Grid patterns, monospace accents, cyan/magenta |
| Playful / Friendly | Bouncy easing (gentle spring), floating motion | Rounded corners, bright colors |
| Professional | Subtle fast animations (200-300ms), clean slides | Precise spacing, data visualization focus |
| Calm / Minimal | Very slow subtle motion, gentle fades | High whitespace, muted palette, serif type |
| Editorial | Staggered text reveals, image-text interplay | Strong type hierarchy, pull quotes, grid-breaking |
[0.25, 0.1, 0.25, 1] (smooth deceleration, equivalent to ease-out-expo)AnimatePresence with mode="wait" for slide changesHeadline: fade in + translateY, arrives first
Supporting content: staggered fade in after headline
Charts/images: fade in + subtle scale from 0.95 to 1
Use variants pattern for orchestrated animations:
const container = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.1 } } };
const item = { hidden: { opacity: 0, y: 20 }, show: { opacity: 1, y: 0, transition: { duration: 0.5, ease: [0.25, 0.1, 0.25, 1] } } };
step state per slide when neededspring with high bounce (underdamped springs look toyish)rotate animations on textprefers-reduced-motion SupportAlways include reduced-motion support. Wrap animation variants:
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
const item = prefersReducedMotion
? { hidden: { opacity: 0 }, show: { opacity: 1 } }
: { hidden: { opacity: 0, y: 20 }, show: { opacity: 1, y: 0, transition: { duration: 0.5 } } };
clamp(2.5rem, 6vw, 5rem)public/images/ by the user/images/filename.extclamp(1.5rem, 3vw, 2.5rem), centered or left-aligneddata-interactive attribute to prevent accidental slide navigation on clicktarget="_blank")file:/// protocol links with a folder icondata-interactive, button, input)step sub-navigation within slides before advancing to next slideRefer to slide-guidelines.md in this directory for the pedagogical structure:
You MUST ask the user for the actual content/topic before creating slides. The content guidelines above describe structure, not what goes in the slides.
npm create vite@latest . -- --template react-ts # Only if starting fresh
npm install
npm run dev
The app should run with npm run dev and be viewable at localhost. No build errors. No TypeScript errors.
Before delivering any batch of slides, verify:
npm run dev starts without errorsnpx tsc --noEmit)npx vite build succeedspublic/images/border-white/10, border-muted/20, never solid surface colorspublic/images/). Use a visible placeholder with the filename so they know what's missing.Always keep the app in a runnable state. Never leave broken imports or missing files.
Weekly Installs
59
Repository
GitHub Stars
78
First Seen
10 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex59
opencode58
gemini-cli58
github-copilot58
amp58
cline58
Pollinations.ai 免费AI图像生成:无需API密钥,通过URL参数快速创建营销与创意图片
10,200 周安装
| Creative Voltage | Energized | Syne (700) | Space Mono (400) | #0066ff primary, #1a1a2e dark, #d4ff00 neon | Electric blue + neon yellow, halftone textures |
| Dark Botanical | Inspired | Cormorant (400) serif | IBM Plex Sans (300) | #0f0f0f bg, #d4a574 warm accent, #e8b4b8 pink | Abstract blurred gradient circles, thin accent lines |
| Vintage Editorial | Inspired | Fraunces (700) serif | Work Sans (400) | #f5f3ee cream, #1a1a1a text, #e8d4c0 warm | Geometric shapes (circle + line + dot), bold borders |
| Swiss Modern | Focused | Archivo (800) | Nunito (400) | Pure white, pure black, #ff3300 red accent | Visible grid, asymmetric layouts, geometric shapes |
| Paper & Ink |
| Editorial |
| Cormorant Garamond + Source Serif 4 |
#faf9f7 cream, #1a1a1a charcoal, #c41e3a crimson |
| Drop caps, pull quotes, elegant horizontal rules |
clamp() — no fixed px/rem for text