slides-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSlides Generator
幻灯片生成器
Generate professional, interactive presentation slides with React + Tailwind.
使用React + Tailwind生成专业的交互式演示幻灯片。
Project Structure
项目结构
Each slide project is organized in a dedicated folder:
<project-folder>/
├── context.md ← Collected knowledge and context from user
├── researches/ ← Research documents (when topic requires research)
│ └── YYYY-MM-DD-topic.md
├── slides.md ← Markdown slides for preview/discussion
├── source/ ← React source code (from template)
│ ├── package.json
│ ├── vite.config.js
│ ├── vite.standalone.config.js
│ ├── tailwind.config.js
│ ├── index.html
│ └── src/
│ ├── App.jsx
│ ├── index.css
│ └── slides/
│ ├── 01-hero.jsx
│ ├── 02-content.jsx
│ └── ...
├── verify/ ← Verification screenshots (from browser testing)
└── slide.html ← Final standalone HTML (auto-generated)每个幻灯片项目都组织在一个专用文件夹中:
<project-folder>/
├── context.md ← 收集的用户需求和上下文信息
├── researches/ ← 调研文档(当主题需要调研时)
│ └── YYYY-MM-DD-topic.md
├── slides.md ← 用于预览/讨论的Markdown幻灯片
├── source/ ← React源代码(来自模板)
│ ├── package.json
│ ├── vite.config.js
│ ├── vite.standalone.config.js
│ ├── tailwind.config.js
│ ├── index.html
│ └── src/
│ ├── App.jsx
│ ├── index.css
│ └── slides/
│ ├── 01-hero.jsx
│ ├── 02-content.jsx
│ └── ...
├── verify/ ← 浏览器测试的验证截图
└── slide.html ← 自动生成的最终独立HTML文件Workflow Overview
工作流程概述
Step 1: Initialize Project Folder
↓
Step 2: Collect Requirements (Progressive Disclosure)
Phase 1: Topic → Phase 2: Audience → Phase 3: Style → Phase 4: Content
↓
Step 2.5: Research Checkpoint
"Would you like me to research [topic]?" → User confirms
↓
Step 3: Create context.md + slides.md
↓
Step 4: Confirm Outline with User
↓
Step 5: Create Source Code → source/
↓
Step 6: Generate Slides (parallel subagents)
↓
Step 7: Dev Mode + Browser Verification (REQUIRED)
↓
Step 8: Build & Export → slide.htmlStep 1: 初始化项目文件夹
↓
Step 2: 收集需求(渐进式问询)
阶段1:主题 → 阶段2:受众 → 阶段3:风格 → 阶段4:内容
↓
Step 2.5: 调研检查点
“是否需要我调研[主题]相关内容?” → 用户确认
↓
Step 3: 创建context.md + slides.md
↓
Step 4: 与用户确认大纲
↓
Step 5: 创建源代码 → source/
↓
Step 6: 生成幻灯片(并行子代理)
↓
Step 7: 开发模式 + 浏览器验证(必填)
↓
Step 8: 构建并导出 → slide.htmlStep 1: Initialize Project Folder
Step 1: 初始化项目文件夹
Ask user for project folder if not provided:
Where would you like to save this presentation?
Default: ./presentation-nameCreate folder structure:
bash
mkdir -p <project-folder>/source <project-folder>/researches <project-folder>/verify若用户未提供,询问项目文件夹路径:
您希望将演示文稿保存在哪里?
默认路径:./presentation-name创建文件夹结构:
bash
mkdir -p <project-folder>/source <project-folder>/researches <project-folder>/verifyStep 2: Collect Requirements (Progressive Disclosure)
Step 2: 收集需求(渐进式问询)
Use progressive disclosure: ask 3-5 questions at a time, reveal more based on answers.
See context-guide.md for detailed question flow.
采用渐进式问询方式:每次询问3-5个问题,根据回答逐步展开更多问题。
详细的问题流程请参考context-guide.md。
Question Flow
问题流程
Phase 1 - Quick Start (Always):
"What's the presentation about?"
"Any content or notes to include?" (optional)Phase 2 - Audience & Purpose (Always):
"Who will view this?"
- Executives / Decision makers
- Technical team / Developers
- General audience / Mixed
- Customers / External
"What's the goal?"
- Inform / Persuade / Demo / ReportPhase 3 - Style Discovery (Always):
Step 1: Get keywords from user
"Describe the vibe in a few words"
Examples: "tech, modern, dark" or "professional, clean, corporate"Step 2: Use ui-ux-pro-max skill for comprehensive design recommendations
bash
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<topic> <keywords> presentation" --design-system -p "<Presentation Name>"This provides:
- Style recommendations with reasoning
- Color palette suggestions
- Typography pairings
- Animation guidelines
Step 3: Combine with palettes.md to present 5 options
Example prompt to user:
Based on your description and design analysis, here are 5 style options:
1. **Dark Sapphire Blue** (glass) - Recommended by ui-ux-pro-max
Dark tech with blue accents, gradient glows
Typography: Sora + Source Sans 3
Best for: Tech products, developer tools
2. **Electric City Nights** (glass)
Urban dark with vibrant blue highlights
Typography: DM Sans + Work Sans
Best for: Modern SaaS, tech startups
3. **Cyberpunk** (glass)
Neon colors, futuristic sci-fi feel
Typography: Outfit + Nunito Sans
Best for: Gaming, AI/ML, futuristic topics
4. **Minimal Modern Light** (flat)
Clean light theme with blue accents
Typography: DM Sans + Work Sans
Best for: Corporate, professional presentations
5. **Hacker News** (glass)
Dark with orange accents, geek aesthetic
Typography: Sora + Source Sans 3
Best for: Developer content, technical demos
Which style? (1-5)Selection is captured in context.md under Style section.
Phase 4 - Content Depth (Conditional):
"What are 3-5 key points to cover?"
"Any specific data to include?"
- Yes, I have data → [Get details]
- Research needed → [Trigger Step 2.5]
- No data needed → [Skip]阶段1 - 快速启动(必选):
“演示文稿的主题是什么?”
“是否有需要包含的内容或笔记?”(可选)阶段2 - 受众与目的(必选):
“演示文稿的受众是谁?”
- 高管/决策者
- 技术团队/开发人员
- 普通受众/混合群体
- 客户/外部人员
“演示的目标是什么?”
- 告知 / 说服 / 演示 / 汇报阶段3 - 风格探索(必选):
步骤1:获取用户的风格关键词
“用几个词描述您想要的风格氛围”
示例:“科技感、现代、深色” 或 “专业、简洁、企业风”步骤2:使用ui-ux-pro-max技能获取全面的设计建议
bash
python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "<topic> <keywords> presentation" --design-system -p "<Presentation Name>"该命令会提供:
- 带有理由的风格建议
- 配色方案推荐
- 字体搭配
- 动画指南
步骤3:结合palettes.md为用户提供5个选项
示例用户提示:
根据您的描述和设计分析,以下是5种风格选项:
1. **暗蓝宝石色**(玻璃态)- 推荐方案
深色科技风搭配蓝色强调色,渐变发光效果
字体:Sora + Source Sans 3
适用场景:科技产品、开发工具
2. **都市霓虹夜**(玻璃态)
深色都市风搭配鲜艳蓝色高光
字体:DM Sans + Work Sans
适用场景:现代SaaS、科技初创公司
3. **赛博朋克**(玻璃态)
霓虹色彩,未来科幻感
字体:Outfit + Nunito Sans
适用场景:游戏、AI/ML、未来主题
4. **极简现代浅色**(扁平化)
简洁浅色主题搭配蓝色强调色
字体:DM Sans + Work Sans
适用场景:企业、专业演示
5. **黑客新闻风**(玻璃态)
深色搭配橙色强调色极客美学
字体:Sora + Source Sans 3
适用场景:开发者内容、技术演示
请选择风格?(1-5)选择结果会记录在context.md的Style部分。
阶段4 - 内容深度(可选):
“需要涵盖哪3-5个关键点?”
“是否需要包含特定数据?”
- 是,我有数据 → [获取详细信息]
- 需要调研 → [触发Step 2.5]
- 不需要数据 → [跳过]Drill-Down for Abstract Terms
模糊术语的追问
When users give vague terms, clarify:
| User Says | Ask |
|---|---|
| "Professional" | "Clean/minimal, or rich/detailed?" |
| "Modern" | "Can you point to an example?" |
| "Engaging" | "Animations, or compelling content?" |
当用户给出模糊表述时,进行澄清:
| 用户表述 | 追问内容 |
|---|---|
| “专业” | “是简洁极简风,还是丰富细节风?” |
| “现代” | “能否提供一个示例参考?” |
| “吸引人” | “是指动画效果,还是有说服力的内容?” |
Save to context.md
保存到context.md
After questions, create capturing:
context.md- Topic, purpose, audience from Phase 1-2
- Selected style (palette ID, name, style type) from Phase 3
- Key points and data needs from Phase 4
markdown
undefined完成问题询问后,创建记录以下内容:
context.md- 阶段1-2的主题、目的、受众
- 阶段3的选定风格(配色ID、名称、风格类型)
- 阶段4的关键点和数据需求
markdown
undefinedStyle (User Selected)
风格(用户选定)
- Palette ID: dark-sapphire-blue
- Palette Name: Dark Sapphire Blue
- Mode: dark
- Style: glass
- Typography:
- Display: Sora
- Body: Source Sans 3
- User Keywords: "tech, modern, dark"
- Design Source: ui-ux-pro-max + palettes.md
undefined- 配色ID: dark-sapphire-blue
- 配色名称: 暗蓝宝石色
- 模式: 深色
- 风格: 玻璃态
- 字体:
- 标题:Sora
- 正文:Source Sans 3
- 用户关键词: “科技感、现代、深色”
- 设计来源: ui-ux-pro-max + palettes.md
undefinedStep 2.5: Research Checkpoint
Step 2.5: 调研检查点
Always ask before researching - apply Just-In-Time research pattern.
调研前必须询问用户 - 采用即时调研模式。
When to Offer Research
何时提供调研服务
Offer research when:
- Topic involves comparisons (A vs B)
- User mentions data/statistics/benchmarks
- Topic is current events or recent technology
- User needs facts they don't have
Skip research when:
- User provides their own data
- Topic is personal/internal
- User explicitly declines
在以下情况提供调研:
- 主题涉及对比(A vs B)
- 用户提到数据/统计/基准测试
- 主题是当前事件或近期技术
- 用户需要自身不具备的事实信息
在以下情况跳过调研:
- 用户已提供自有数据
- 主题是个人/内部内容
- 用户明确拒绝调研
Research Prompt
调研提示
"This topic would benefit from research. Would you like me to:
[ ] Research current data/statistics
[ ] Find competitive comparisons
[ ] Gather industry trends
[ ] Skip research - I'll provide content"“该主题可通过调研丰富内容。是否需要我:
[ ] 调研当前数据/统计
[ ] 查找竞品对比
[ ] 收集行业趋势
[ ] 跳过调研 - 我会自行提供内容”Research Workflow
调研工作流程
1. User confirms research needed
↓
2. Conduct targeted web search
↓
3. Document in researches/ folder
↓
4. Present summary to user:
"I found: [key findings]. Does this look accurate?"
↓
5. User confirms → Update context.md1. 用户确认需要调研
↓
2. 进行定向网络搜索
↓
3. 将调研结果记录在researches/文件夹中
↓
4. 向用户展示摘要:
“我找到以下内容:[关键发现]。是否准确?”
↓
5. 用户确认 → 更新context.mdResearch Templates
调研模板
See research-templates.md for:
- Statistics & Data - Metrics, benchmarks, numbers
- Competitive Analysis - A vs B comparisons
- Trends & Forecasts - Industry outlook
- Quick Facts - Simple fact lookup
调研模板请参考research-templates.md,包括:
- 统计与数据 - 指标、基准、数值
- 竞品分析 - A vs B对比
- 趋势与预测 - 行业展望
- 快速事实 - 简单事实查询
File Organization
文件组织
researches/
├── YYYY-MM-DD-statistics.md # Data and numbers
├── YYYY-MM-DD-comparison.md # A vs B analysis
└── YYYY-MM-DD-trends.md # Industry trendsresearches/
├── YYYY-MM-DD-statistics.md # 数据与数值
├── YYYY-MM-DD-comparison.md # A vs B分析
└── YYYY-MM-DD-trends.md # 行业趋势Quality Checklist
质量检查表
Before using researched data:
- Source is authoritative
- Data is recent (<6 months for fast fields)
- Cross-referenced with another source
- User has confirmed accuracy
After research, update context.md with verified data and sources.
使用调研数据前需检查:
- 来源权威
- 数据较新(快速发展领域需6个月内)
- 已与其他来源交叉验证
- 用户已确认准确性
调研完成后,更新context.md,加入验证过的数据和来源。
Step 3: Create Markdown Slides
Step 3: 创建Markdown幻灯片
Create with complete design system and content structure. See slides-design.md for detailed patterns.
slides.md创建包含完整设计系统和内容结构的。详细模式请参考slides-design.md。
slides.md3.1 Generate Design System (Optional but Recommended)
3.1 生成设计系统(可选但推荐)
Use ui-ux-pro-max skill to get comprehensive design recommendations:
bash
python3 skills/ui-ux-pro-max/scripts/search.py "<topic> <style keywords>" --design-system -p "<Presentation Name>"Example:
bash
python3 skills/ui-ux-pro-max/scripts/search.py "tech benchmark modern dark glass" --design-system -p "Claude Benchmark"使用ui-ux-pro-max技能获取全面的设计建议:
bash
python3 skills/ui-ux-pro-max/scripts/search.py "<topic> <style keywords>" --design-system -p "<Presentation Name>"示例:
bash
python3 skills/ui-ux-pro-max/scripts/search.py "tech benchmark modern dark glass" --design-system -p "Claude Benchmark"3.2 slides.md Template
3.2 slides.md模板
markdown
undefinedmarkdown
undefined[Presentation Title]
[演示文稿标题]
Design System
设计系统
Theme
主题
- Palette: [theme-id from palettes.md]
- Mode: dark / light
- Style: glass / flat
- 配色: [来自palettes.md的主题ID]
- 模式: 深色 / 浅色
- 风格: 玻璃态 / 扁平化
Colors
颜色
| Token | Hex | Usage |
|---|---|---|
| bg-base | #0f1c2e | Main background |
| primary-500 | #4d648d | Primary accent |
| accent-500 | #3d5a80 | Contrast accent |
| text-primary | #ffffff | Main text |
| text-secondary | #cee8ff | Secondary text |
| 标识 | 十六进制值 | 用途 |
|---|---|---|
| bg-base | #0f1c2e | 主背景 |
| primary-500 | #4d648d | 主强调色 |
| accent-500 | #3d5a80 | 对比强调色 |
| text-primary | #ffffff | 主文本 |
| text-secondary | #cee8ff | 次要文本 |
Typography
字体
- Display: Sora (headings)
- Body: Source Sans 3 (content)
- 标题: Sora(标题)
- 正文: Source Sans 3(内容)
Effects
效果
- Cards: glass with border-white/20
- Animations: stagger reveal (0.1s delay)
- Background: gradient glow + grid pattern
- 卡片: 玻璃态,border-white/20
- 动画: stagger reveal(0.1s延迟)
- 背景: 渐变发光 + 网格图案
Slide 1: Hero
Slide 1: 封面
Type: Hero
Layout: centered
Title: Main Title Here
Subtitle: Supporting tagline
Background: gradient glow (primary top-left, accent bottom-right)
Animation: fade-in + scale (0.6s)
类型: 封面
布局: 居中
标题: 主标题
副标题: 支持性标语
背景: 渐变发光(左上主色,右下强调色)
动画: 淡入 + 缩放(0.6s)
Slide 2: Overview
Slide 2: 概述
Type: Content
Layout: three-column
Title: What We'll Cover
Cards: 3 cards, glass style
Points:
- [icon: Zap] First key point
- [icon: Shield] Second key point
- [icon: Rocket] Third key point Animation: stagger reveal (0.1s)
类型: 内容
布局: 三列
标题: 我们将涵盖的内容
卡片: 3张玻璃态卡片
要点:
- [图标: Zap] 第一个关键点
- [图标: Shield] 第二个关键点
- [图标: Rocket] 第三个关键点 动画: stagger reveal(0.1s)
Slide 3: Details
Slide 3: 详情
Type: Data
Layout: stat-cards
Title: Key Metrics
Stats:
| Metric | Value | Trend | Context |
|---|---|---|---|
| Users | 10K+ | +25% | Monthly active |
| Growth | 40% | +15% | Year over year |
| NPS | 72 | +8 | Industry avg: 45 |
| Animation: count-up numbers |
类型: 数据
布局: 统计卡片
标题: 关键指标
统计数据:
| 指标 | 数值 | 趋势 | 上下文 |
|---|---|---|---|
| 用户数 | 10K+ | +25% | 月活跃用户 |
| 增长率 | 40% | +15% | 同比 |
| NPS | 72 | +8 | 行业平均: 45 |
| 动画: 数字滚动 |
Slide 4: Comparison
Slide 4: 对比
Type: Comparison
Layout: versus
Title: Head to Head
Comparison:
| Feature | Option A | Option B |
|---|---|---|
| Speed | ✓ Fast | ○ Medium |
| Cost | $99/mo | $149/mo |
| Support | 24/7 | Business |
| Highlight: Option A for performance |
类型: 对比
布局: 左右对比
标题: 正面交锋
对比内容:
| 功能 | 选项A | 选项B |
|---|---|---|
| 速度 | ✓ 快 | ○ 中等 |
| 成本 | $99/月 | $149/月 |
| 支持 | 24/7 | 工作日 |
| 重点: 选项A性能更优 |
Slide 5: Summary
Slide 5: 总结
Type: Summary
Layout: takeaways
Title: Key Takeaways
Takeaways:
- First key insight
- Second key insight
- Third key insight CTA: "Get Started" → [link] Animation: fade-in sequential
undefined类型: 总结
布局: 要点
标题: 关键结论
结论:
- 第一个关键见解
- 第二个关键见解
- 第三个关键见解 行动号召: “立即开始” → [链接] 动画: 依次淡入
undefined3.3 Slide Types Reference
3.3 幻灯片类型参考
| Type | Use For | Layouts |
|---|---|---|
| Hero | Opening slide | centered, split, asymmetric |
| Content | Information, bullets | single-column, two-column, icon-list |
| Data | Statistics, metrics | stat-cards, chart-focus, dashboard |
| Comparison | Side-by-side analysis | versus, feature-matrix, ranking |
| Timeline | Process, roadmap | horizontal, vertical, milestone |
| Grid | Multiple cards | 2x2, 2x3, bento |
| Quote | Testimonials | centered, with-avatar |
| Summary | Closing, CTA | takeaways, cta-focused |
| 类型 | 用途 | 布局 |
|---|---|---|
| 封面 | 开场幻灯片 | 居中、分栏、不对称 |
| 内容 | 信息、项目符号 | 单栏、双栏、图标列表 |
| 数据 | 统计、指标 | 统计卡片、图表聚焦、仪表盘 |
| 对比 | 并列分析 | 左右对比、功能矩阵、排名 |
| 时间线 | 流程、路线图 | 水平、垂直、里程碑 |
| 网格 | 多张卡片 | 2x2、2x3、便当式布局 |
| 引用 | 推荐语 | 居中、带头像 |
| 总结 | 结尾、行动号召 | 要点、行动号召聚焦 |
3.4 Design Patterns by Scenario
3.4 场景化设计模式
| Scenario | Theme | Style | Typography |
|---|---|---|---|
| Tech/Product | dark-sapphire-blue | glass | Sora + Source Sans 3 |
| Professional | banking-website | flat | DM Sans + Work Sans |
| Creative | cyberpunk or neon | glass | Outfit + Nunito Sans |
| Nature | summer-meadow | flat | Manrope + Source Sans 3 |
| Minimal | black-and-white | flat | DM Sans + Work Sans |
| 场景 | 主题 | 风格 | 字体 |
|---|---|---|---|
| 科技/产品 | dark-sapphire-blue | 玻璃态 | Sora + Source Sans 3 |
| 专业商务 | banking-website | 扁平化 | DM Sans + Work Sans |
| 创意设计 | cyberpunk或neon | 玻璃态 | Outfit + Nunito Sans |
| 自然主题 | summer-meadow | 扁平化 | Manrope + Source Sans 3 |
| 极简风格 | black-and-white | 扁平化 | DM Sans + Work Sans |
Step 4: Confirm with User
Step 4: 与用户确认
Present the outline for confirmation:
markdown
undefined向用户展示大纲以获得确认:
markdown
undefinedPresentation Outline
演示文稿大纲
Title: [Title]
Theme: [theme-id] ([glass/flat] style)
Folder: [project-folder]
Slides:
- Hero - Title and overview
- Content - Key points
- Data - Metrics/charts
- Summary - Conclusions
Files to create:
- context.md ✓
- slides.md ✓
- source/ (React project)
- slide.html (final output)
Confirm to generate?
undefined标题: [标题]
主题: [主题ID] ([玻璃态/扁平化]风格)
文件夹: [项目文件夹]
幻灯片:
- 封面 - 标题与概述
- 内容 - 关键点
- 数据 - 指标/图表
- 总结 - 结论
将创建的文件:
- context.md ✓
- slides.md ✓
- source/ (React项目)
- slide.html (最终输出)
确认生成?
undefinedStep 5: Create Source Code
Step 5: 创建源代码
Copy template and configure:
bash
undefined复制模板并进行配置:
bash
undefined1. Copy template
1. 复制模板
cp -r <skill-path>/assets/template/* <project-folder>/source/
cp -r <skill-path>/assets/template/* <project-folder>/source/
2. Update tailwind.config.js with theme colors
2. 更新tailwind.config.js中的主题颜色
3. Update index.html title
3. 更新index.html的标题
4. Update App.jsx with presentation name
4. 更新App.jsx中的演示文稿名称
undefinedundefinedStep 6: Generate Slides
Step 6: 生成幻灯片
Generate each slide JSX file based on content.
slides.mdBefore generating, read:
- aesthetics.md - Design philosophy
- principles.md - Technical principles
Use vercel-react-best-practices skill for React code generation to ensure:
- Proper component composition and patterns
- Performance-optimized rendering
- Clean, maintainable code structure
Technical Requirements:
- Framework: React function component
- Styling: Tailwind CSS
- Icons: lucide-react
- Animations: framer-motion
- Export: default function component
Theme Colors (use variables, not hardcoded):
- primary-50 to primary-950
- accent-50 to accent-950
- bg-base, bg-card, bg-elevated
- text-primary, text-secondary, text-muted
- border-default, border-subtle
Style Options:
- Glass: class or
glassbg-white/10 backdrop-blur-md border-white/20 - Flat:
bg-bg-card shadow-sm border-border-default
Layout Rules (CRITICAL):
⛔ FORBIDDEN:
- ,
h-screen- breaks layoutmin-h-screen - on content wrappers
h-full - Extra padding on
slide-page
✅ REQUIRED Structure:
jsx
<div className="slide-page">
{/* Background - absolute positioning */}
<div className="absolute inset-0 pointer-events-none">...</div>
{/* Header */}
<header className="relative z-10 mb-6 shrink-0">
<h1>Title</h1>
</header>
{/* Content - auto-fills remaining space */}
<div className="slide-content relative z-10">
{/* Grid/cards here */}
</div>
</div>Grid Layouts:
- 2 cards:
grid-auto-fit grid-cols-2 - 3 cards:
grid-auto-fit grid-1x3 - 4 cards (2x2):
grid-auto-fit grid-2x2 - 6 cards (2x3):
grid-auto-fit grid-2x3
Animation Patterns:
jsx
import { motion } from 'framer-motion';
// Stagger container
const container = {
hidden: { opacity: 0 },
show: { opacity: 1, transition: { staggerChildren: 0.1 } }
};
// Child item
const item = {
hidden: { opacity: 0, y: 20 },
show: { opacity: 1, y: 0 }
};
// Hover effect
<motion.div whileHover={{ scale: 1.02 }}>...</motion.div>File naming: , , etc.
01-hero.jsx02-overview.jsxUpdate App.jsx after all slides generated:
jsx
// Add imports at top
import Slide01 from './slides/01-hero';
import Slide02 from './slides/02-content';
// ...
// Update SLIDES array
const SLIDES = [Slide01, Slide02, ...];
// Update NAV_ITEMS array (used for navigation labels)
const NAV_ITEMS = [
{ slideIndex: 0, label: 'Hero' },
{ slideIndex: 1, label: 'Content' },
// ...
];
// Update PRESENTATION_NAME
const PRESENTATION_NAME = 'Your Presentation Title';Navigation Features:
The template includes quick-jump navigation:
| Feature | How to Use |
|---|---|
| Slide dots | Click dots at bottom center (≤12 slides) |
| Number keys | Press 1-9 to jump to slides 1-9 |
| Quick nav | Press G or click progress bar to open grid picker |
| Menu | Click hamburger for full slide list with labels |
| Arrows | ← → keys or click chevron buttons |
根据内容生成每个幻灯片的JSX文件。
slides.md生成前请阅读:
- aesthetics.md - 设计理念
- principles.md - 技术原则
使用vercel-react-best-practices技能生成React代码,确保:
- 正确的组件组合与模式
- 性能优化的渲染
- 清晰、可维护的代码结构
技术要求:
- 框架:React函数组件
- 样式:Tailwind CSS
- 图标:lucide-react
- 动画:framer-motion
- 导出:默认函数组件
主题颜色(使用变量,避免硬编码):
- primary-50 至 primary-950
- accent-50 至 accent-950
- bg-base, bg-card, bg-elevated
- text-primary, text-secondary, text-muted
- border-default, border-subtle
风格选项:
- 玻璃态: 类或
glassbg-white/10 backdrop-blur-md border-white/20 - 扁平化:
bg-bg-card shadow-sm border-border-default
布局规则(至关重要):
⛔ 禁止:
- ,
h-screen- 破坏布局min-h-screen - 内容容器使用
h-full - 添加额外内边距
slide-page
✅ 必需结构:
jsx
<div className="slide-page">
{/* 背景 - 绝对定位 */}
<div className="absolute inset-0 pointer-events-none">...</div>
{/* 页眉 */}
<header className="relative z-10 mb-6 shrink-0">
<h1>Title</h1>
</header>
{/* 内容 - 自动填充剩余空间 */}
<div className="slide-content relative z-10">
{/* 网格/卡片内容 */}
</div>
</div>网格布局:
- 2张卡片:
grid-auto-fit grid-cols-2 - 3张卡片:
grid-auto-fit grid-1x3 - 4张卡片(2x2):
grid-auto-fit grid-2x2 - 6张卡片(2x3):
grid-auto-fit grid-2x3
动画模式:
jsx
import { motion } from 'framer-motion';
// 容器动画
const container = {
hidden: { opacity: 0 },
show: { opacity: 1, transition: { staggerChildren: 0.1 } }
};
// 子元素动画
const item = {
hidden: { opacity: 0, y: 20 },
show: { opacity: 1, y: 0 }
};
// 悬停效果
<motion.div whileHover={{ scale: 1.02 }}>...</motion.div>文件命名: , 等。
01-hero.jsx02-overview.jsx所有幻灯片生成后更新App.jsx:
jsx
// 在顶部添加导入
import Slide01 from './slides/01-hero';
import Slide02 from './slides/02-content';
// ...
// 更新SLIDES数组
const SLIDES = [Slide01, Slide02, ...];
// 更新NAV_ITEMS数组(用于导航标签)
const NAV_ITEMS = [
{ slideIndex: 0, label: '封面' },
{ slideIndex: 1, label: '内容' },
// ...
];
// 更新PRESENTATION_NAME
const PRESENTATION_NAME = '您的演示文稿标题';导航功能:
模板包含快速跳转导航:
| 功能 | 使用方式 |
|---|---|
| 幻灯片圆点 | 点击底部中心的圆点(≤12张幻灯片) |
| 数字键 | 按1-9跳转到第1-9张幻灯片 |
| 快速导航 | 按G键或点击进度条打开网格选择器 |
| 菜单 | 点击汉堡图标查看带标签的完整幻灯片列表 |
| 箭头 | ← → 键或点击箭头按钮 |
Step 7: Dev Mode + Browser Verification (REQUIRED)
Step 7: 开发模式 + 浏览器验证(必填)
IMPORTANT: Always verify slides in dev mode BEFORE building the standalone export. This catches UI, animation, and interaction issues early.
See browser-verification.md for detailed verification procedures.
重要提示: 在构建独立导出文件前,务必在开发模式下验证幻灯片。这可以提前发现UI、动画和交互问题。
详细的验证流程请参考browser-verification.md。
7.1 Start Dev Server
7.1 启动开发服务器
bash
cd <project-folder>/source
npm install
npm run devbash
cd <project-folder>/source
npm install
npm run devServer runs at http://localhost:5173
服务器运行在 http://localhost:5173
undefinedundefined7.2 Browser Verification with agent-browser
7.2 使用agent-browser进行浏览器验证
Check if agent-browser is available:
bash
undefined检查agent-browser是否可用:
bash
undefinedTry to run agent-browser
尝试运行agent-browser
agent-browser --version
**If not installed, prompt user:**Browser verification requires agent-browser skill.
Install with:
npx skills add vercel-labs/agent-browser
Then restart Claude Code and retry.
undefinedagent-browser --version
**若未安装,提示用户**:浏览器验证需要agent-browser技能。
安装命令:
npx skills add vercel-labs/agent-browser
安装后请重启Claude Code并重试。
undefined7.3 Verification Workflow
7.3 验证工作流程
bash
undefinedbash
undefinedOpen presentation in browser
在浏览器中打开演示文稿
agent-browser open http://localhost:5173
agent-browser set viewport 1920 1080
agent-browser open http://localhost:5173
agent-browser set viewport 1920 1080
Create verify folder
创建verify文件夹
mkdir -p <project-folder>/verify
mkdir -p <project-folder>/verify
Capture first slide
捕获第一张幻灯片
agent-browser wait 2000
agent-browser screenshot <project-folder>/verify/slide-01.png
agent-browser wait 2000
agent-browser screenshot <project-folder>/verify/slide-01.png
Navigate and capture each slide
导航并捕获每张幻灯片
agent-browser press ArrowRight
agent-browser wait 1000
agent-browser screenshot <project-folder>/verify/slide-02.png
agent-browser press ArrowRight
agent-browser wait 1000
agent-browser screenshot <project-folder>/verify/slide-02.png
... repeat for all slides
... 重复此步骤直到所有幻灯片都被捕获
undefinedundefined7.4 Verification Checklist
7.4 验证检查表
| Check | How | Pass Criteria |
|---|---|---|
| Layout | Screenshot each slide | No content overflow, proper spacing |
| Navigation | Press ArrowRight/Left | Slides transition smoothly |
| Quick jump | Press 1-5 or G key | Jumps to correct slide |
| Slide dots | Click dots at bottom | Navigates correctly (≤12 slides) |
| Animations | Watch transitions | No jank, elements animate in |
| Interactive | Hover elements | Visual feedback works |
| Responsive | Change viewport | Layout adapts correctly |
| 检查项 | 检查方式 | 通过标准 |
|---|---|---|
| 布局 | 捕获每张幻灯片的截图 | 无内容溢出,间距合理 |
| 导航 | 按左右箭头键 | 幻灯片切换流畅 |
| 快速跳转 | 按1-5键或G键 | 跳转到正确的幻灯片 |
| 幻灯片圆点 | 点击底部圆点 | 导航正确(≤12张幻灯片) |
| 动画 | 观看切换效果 | 无卡顿,元素正确动画 |
| 交互 | 悬停元素 | 视觉反馈正常 |
| 响应式 | 更改视口大小 | 布局自适应正确 |
7.5 Common Issues to Check
7.5 常见问题检查
Layout Problems:
- Content extending beyond viewport
- Navigation bar hidden or overlapped
- Cards cramped or overflowing
Animation Problems:
- Stuttering transitions
- Elements not animating
- Flash of unstyled content
Interaction Problems:
- Keyboard navigation not working
- Click areas not responsive
- Hover states missing
布局问题:
- 内容超出视口
- 导航栏被隐藏或重叠
- 卡片拥挤或溢出
动画问题:
- 切换卡顿
- 元素未动画
- 未样式内容闪烁
交互问题:
- 键盘导航无效
- 点击区域无响应
- 缺少悬停状态
7.6 Fix and Re-verify
7.6 修复并重验证
If issues found:
- Fix the problematic slide JSX
- Browser auto-reloads (hot reload)
- Re-verify the specific slide
- Take new screenshot to confirm fix
若发现问题:
- 修复有问题的幻灯片JSX文件
- 浏览器自动重载(热重载)
- 重新验证特定幻灯片
- 捕获新截图确认修复
Step 8: Build & Export
Step 8: 构建并导出
Only after verification passes, build the standalone HTML:
bash
cd <project-folder>/source仅在验证通过后,构建独立HTML文件:
bash
cd <project-folder>/sourceBuild standalone HTML
构建独立HTML
npm run build:standalone
npm run build:standalone
Copy to project root
复制到项目根目录
cp dist-standalone/index.html ../slide.html
undefinedcp dist-standalone/index.html ../slide.html
undefined8.1 Final Verification
8.1 最终验证
Verify the standalone file works correctly:
bash
undefined验证独立文件是否正常工作:
bash
undefinedTest standalone file
测试独立文件
agent-browser open file://<absolute-path>/slide.html
agent-browser set viewport 1920 1080
agent-browser screenshot <project-folder>/verify/final-standalone.png
agent-browser open file://<absolute-path>/slide.html
agent-browser set viewport 1920 1080
agent-browser screenshot <project-folder>/verify/final-standalone.png
Quick navigation test
快速导航测试
agent-browser press ArrowRight
agent-browser wait 500
agent-browser press ArrowLeft
**Final output**: `<project-folder>/slide.html`
This single HTML file:
- Contains all JS, CSS, and fonts embedded
- Works offline (no server needed)
- Opens directly in any browser (file://)
- Full React interactivity and animationsagent-browser press ArrowRight
agent-browser wait 500
agent-browser press ArrowLeft
**最终输出**: `<project-folder>/slide.html`
该单文件HTML具备以下特性:
- 包含所有嵌入的JS、CSS和字体
- 可离线使用(无需服务器)
- 可直接在任何浏览器中打开(file://协议)
- 完整的React交互性和动画8.2 Close Browser
8.2 关闭浏览器
bash
agent-browser closebash
agent-browser closeStep 5.5: Generate Images (When Required)
Step 5.5: 生成图片(按需)
When slides require custom images, diagrams, or illustrations, use the ai-multimodal skill.
When to use:
- Hero slides needing background illustrations
- Diagrams (architecture, flowcharts, processes)
- Product mockups or screenshots
- Custom icons or illustrations
Workflow:
- Identify slides needing images during Step 3
- After generating slide JSX, invoke ai-multimodal
- Save images to
source/public/images/ - Reference in slides:
<img src="/images/generated-image.png" />
当幻灯片需要自定义图片、图表或插图时,使用ai-multimodal技能。
使用场景:
- 封面幻灯片需要背景插图
- 图表(架构、流程图、流程)
- 产品模型或截图
- 自定义图标或插图
工作流程:
- 在Step3期间识别需要图片的幻灯片
- 生成幻灯片JSX后,调用ai-multimodal
- 将图片保存到
source/public/images/ - 在幻灯片中引用:
<img src="/images/generated-image.png" />
Theme System
主题系统
Themes are defined in palettes.md.
Quick recommendations:
| User says | Recommend |
|---|---|
| "Tech", "Modern" | dark-sapphire-blue (glass) |
| "Professional", "Business" | banking-website (flat) |
| "Cyberpunk", "Neon" | cyberpunk (glass) |
| "Natural", "Organic" | summer-meadow (flat) |
| "Minimal", "Clean" | black-and-white (flat) |
主题定义在palettes.md中。
快速推荐:
| 用户需求 | 推荐方案 |
|---|---|
| “科技感、产品” | dark-sapphire-blue(玻璃态) |
| “专业商务” | banking-website(扁平化) |
| “创意设计” | cyberpunk或neon(玻璃态) |
| “自然主题” | summer-meadow(扁平化) |
| “极简风格” | black-and-white(扁平化) |
Design Principles
设计原则
See principles.md for:
- Color variable usage
- Typography scale
- Spacing conventions
- Component structure
请参考principles.md了解:
- 颜色变量使用
- 字体比例
- 间距规范
- 组件结构
Example Interaction
示例交互
User: "Create a benchmark presentation for Claude vs GPT"
Claude: "I'll help create benchmark slides.
Where would you like to save this presentation?
Default: ./claude-benchmark"
User: "OK"
Claude: "What's this presentation about? Give me a brief description."
User: "Comparing Claude and GPT coding abilities for our dev team"
Claude: "Who will view this?
- Executives / Decision makers
- Technical team / Developers ←
- General audience
- Customers"
User: "Technical team"
Claude: "What's the goal?
- Inform - Share findings
- Persuade - Recommend one model
- Demo - Show capabilities
- Report - Present data"
User: "Inform"
Claude: "Describe the vibe in a few words (e.g., tech, modern, professional)"
User: "tech, modern, dark, sleek"
Claude: [Runs ui-ux-pro-max: python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "AI benchmark tech modern dark presentation" --design-system]
Claude: "Based on design analysis, here are 5 style options:
1. **Dark Sapphire Blue** (glass) - Recommended
Dark tech with blue accents, gradient glows
Typography: Sora + Source Sans 3
Best for: Tech products, developer tools
2. **Electric City Nights** (glass)
Urban dark with vibrant blue highlights
Typography: DM Sans + Work Sans
Best for: Modern SaaS, tech startups
3. **Purple Dark Black Blue** (glass)
Deep purple-blue, cyberpunk undertones
Typography: Outfit + Nunito Sans
Best for: AI/ML, futuristic topics
4. **Hacker News** (glass)
Dark with orange accents, geek aesthetic
Typography: Sora + Source Sans 3
Best for: Developer content, technical demos
5. **Space** (glass)
Deep space theme with gold accents
Typography: Manrope + Source Sans 3
Best for: Innovation, visionary topics
Which style? (1-5)"
User: "1"
Claude: "Selected: Dark Sapphire Blue (glass) with Sora + Source Sans 3"
Claude: "What are 3-5 key points to cover?"
User: "Coding ability, reasoning, context window, speed"
Claude: "This topic would benefit from current benchmark data.
Would you like me to research:
[ ] Current benchmark statistics
[ ] Model comparison data
[ ] Skip research"
User: "Yes, research current benchmarks"
Claude: [Conducts web search for current AI benchmarks]
Claude: "I found the following data:
- Claude scores 92% on HumanEval (coding)
- GPT-4 scores 87% on HumanEval
- Claude has 200K context, GPT-4 has 128K
[Sources: official docs, research papers]
Does this look accurate?"
User: "Yes, use that"
Claude: [Creates ./claude-benchmark/ folder structure]
Claude: [Saves research to ./claude-benchmark/researches/2026-01-29-benchmark-data.md]
Claude: [Creates ./claude-benchmark/context.md with verified data]
Claude: [Creates ./claude-benchmark/slides.md]
Claude: "Here's the outline:用户: “创建一个Claude vs GPT的基准测试演示文稿”
Claude: “我将帮您创建基准测试幻灯片。
您希望将演示文稿保存在哪里?
默认路径: ./claude-benchmark"
用户: “好的”
Claude: “演示文稿的主题是什么?请简要描述。”
用户: “为我们的开发团队对比Claude和GPT的编码能力”
Claude: “演示文稿的受众是谁?
- 高管/决策者
- 技术团队/开发人员 ←
- 普通受众
- 客户”
用户: “技术团队”
Claude: “演示的目标是什么?
- 告知 - 分享发现
- 说服 - 推荐某一模型
- 演示 - 展示能力
- 汇报 - 呈现数据”
用户: “告知”
Claude: “用几个词描述您想要的风格氛围(例如:科技感、现代、专业)”
用户: “科技感、现代、深色、简洁”
Claude: [运行ui-ux-pro-max: python3 ~/.claude/skills/ui-ux-pro-max/scripts/search.py "AI benchmark tech modern dark presentation" --design-system]
Claude: “根据设计分析,以下是5种风格选项:
1. **暗蓝宝石色**(玻璃态)- 推荐方案
深色科技风搭配蓝色强调色,渐变发光效果
字体:Sora + Source Sans 3
适用场景:科技产品、开发工具
2. **都市霓虹夜**(玻璃态)
深色都市风搭配鲜艳蓝色高光
字体:DM Sans + Work Sans
适用场景:现代SaaS、科技初创公司
3. **深紫黑蓝**(玻璃态)
深紫蓝色,赛博朋克基调
字体:Outfit + Nunito Sans
适用场景:AI/ML、未来主题
4. **黑客新闻风**(玻璃态)
深色搭配橙色强调色极客美学
字体:Sora + Source Sans 3
适用场景:开发者内容、技术演示
5. **太空主题**(玻璃态)
深空主题搭配金色强调色
字体:Manrope + Source Sans 3
适用场景:创新、前瞻性主题
请选择风格?(1-5)"
用户: “1”
Claude: “已选定:暗蓝宝石色(玻璃态),字体Sora + Source Sans 3”
Claude: “需要涵盖哪3-5个关键点?”
用户: “编码能力、推理能力、上下文窗口、速度”
Claude: “该主题可通过当前基准测试数据丰富内容。
是否需要我调研:
[ ] 当前基准测试统计
[ ] 模型对比数据
[ ] 跳过调研”
用户: “是的,调研当前基准测试数据”
Claude: [进行网络搜索获取当前AI基准测试数据]
Claude: “我找到以下数据:
- Claude在HumanEval(编码)中得分为92%
- GPT-4在HumanEval中得分为87%
- Claude的上下文窗口为200K,GPT-4为128K
[来源:官方文档、研究论文]
这些数据是否准确?"
用户: “是的,使用这些数据”
Claude: [创建./claude-benchmark/文件夹结构]
Claude: [将调研结果保存到./claude-benchmark/researches/2026-01-29-benchmark-data.md]
Claude: [创建./claude-benchmark/context.md并记录验证后的数据]
Claude: [创建./claude-benchmark/slides.md]
Claude: “以下是演示文稿大纲:Presentation Outline
演示文稿大纲
Title: Claude vs GPT Coding Benchmark
Theme: dark-sapphire-blue (glass)
Slides:
- Hero - Title and model overview
- Framework - Evaluation methodology
- Task 1 - API development
- Task 2 - React components
- Task 3 - CLI tools
- Summary - Results and recommendations
Confirm to generate?"
User: "OK"
Claude: [Creates source/ from template]
Claude: [Generates 6 slide JSX files]
Claude: [Updates App.jsx with imports]
Claude: [Starts dev server: npm run dev]
Claude: [Opens browser: agent-browser open http://localhost:5173]
Claude: [Verifies each slide, takes screenshots]
Claude: "Verification complete. All slides look good:
- Layout: ✓ No overflow issues
- Navigation: ✓ Arrow keys work
- Animations: ✓ Smooth transitions
Building standalone export..."
Claude: [Runs npm run build:standalone]
Claude: [Copies to slide.html]
Claude: [Final verification of slide.html]
Claude: [Closes browser]
Claude: "Presentation complete!
Files created:
- ./claude-benchmark/context.md
- ./claude-benchmark/researches/2026-01-29-benchmark-data.md
- ./claude-benchmark/slides.md
- ./claude-benchmark/source/ (React project)
- ./claude-benchmark/verify/ (verification screenshots)
- ./claude-benchmark/slide.html ← Open this in browser
Open slide.html to view your presentation."
undefined标题: Claude vs GPT编码基准测试
主题: dark-sapphire-blue(玻璃态)
文件夹: ./claude-benchmark
幻灯片:
- 封面 - 标题和模型概述
- 框架 - 评估方法
- 任务1 - API开发
- 任务2 - React组件
- 任务3 - CLI工具
- 总结 - 结果与建议
确认生成?"
用户: “好的”
Claude: [从模板创建source/文件夹]
Claude: [生成6张幻灯片的JSX文件]
Claude: [更新App.jsx的导入]
Claude: [启动开发服务器: npm run dev]
Claude: [在浏览器中打开: agent-browser open http://localhost:5173]
Claude: [验证每张幻灯片,捕获截图]
Claude: “验证完成。所有幻灯片均正常:
- 布局: ✓ 无溢出问题
- 导航: ✓ 箭头键正常工作
- 动画: ✓ 切换流畅
正在构建独立导出文件...”
Claude: [运行npm run build:standalone]
Claude: [复制到slide.html]
Claude: [验证slide.html的最终版本]
Claude: [关闭浏览器]
Claude: “演示文稿已完成!
创建的文件:
- ./claude-benchmark/context.md
- ./claude-benchmark/researches/2026-01-29-benchmark-data.md
- ./claude-benchmark/slides.md
- ./claude-benchmark/source/ (React项目)
- ./claude-benchmark/verify/ (验证截图)
- ./claude-benchmark/slide.html ← 可在浏览器中打开该文件
打开slide.html即可查看您的演示文稿。"
undefinedReference Documentation
参考文档
| Reference | Description |
|---|---|
| context-guide.md | Progressive disclosure question flow for gathering requirements |
| research-templates.md | Templates for statistics, comparison, and trends research |
| slides-design.md | Design system patterns, slide types, layouts, animations |
| browser-verification.md | Browser testing with agent-browser |
| aesthetics.md | Design philosophy and visual guidelines |
| principles.md | Technical layout and component rules |
| palettes.md | 76 color themes with usage guide |
| 参考文档 | 描述 |
|---|---|
| context-guide.md | 收集需求的渐进式问询流程 |
| research-templates.md | 统计、对比和趋势调研的模板 |
| slides-design.md | 设计系统模式、幻灯片类型、布局、动画 |
| browser-verification.md | 使用agent-browser进行浏览器测试 |
| aesthetics.md | 设计理念和视觉指南 |
| principles.md | 技术布局和组件规则 |
| palettes.md | 76种配色主题及使用指南 |
External Skill Integration
外部技能集成
| Skill | Use For |
|---|---|
| vercel-react-best-practices | React code generation best practices (REQUIRED for slide JSX) |
| ui-ux-pro-max | Design system generation, typography, color palettes |
| agent-browser | Browser verification before export |
| ai-multimodal | Custom image/diagram generation |
| 技能 | 用途 |
|---|---|
| vercel-react-best-practices | React代码生成最佳实践(幻灯片JSX必填) |
| ui-ux-pro-max | 设计系统生成、字体、配色方案 |
| agent-browser | 导出前的浏览器验证 |
| ai-multimodal | 自定义图片/图表生成 |