PPT 生成技能
概述
此技能通过为每张幻灯片创建AI生成的图像并将其组合成PPTX文件,从而生成专业的PowerPoint演示文稿。工作流程包括:规划具有一致视觉风格的演示文稿结构,按顺序生成幻灯片图像(使用前一张幻灯片作为参考以保持风格一致),最后将其组装成最终的演示文稿。
核心能力
- 规划并构建具有统一视觉风格的多幻灯片演示文稿
- 支持多种演示文稿风格:商务、学术、极简、Apple Keynote、创意
- 使用图像生成技能为每张幻灯片生成独特的AI图像
- 通过将前一张幻灯片作为参考图像来保持视觉一致性
- 将图像组合成专业的PPTX文件
演示文稿风格
创建演示文稿计划时,请选择以下一种风格:
| 风格 | 描述 | 最适合用于 |
|---|---|---|
| glassmorphism | 带有模糊效果的毛玻璃面板、浮动半透明卡片、鲜艳的渐变背景,通过分层营造深度感 | 科技产品、AI/SaaS演示、未来主义推介 |
| dark-premium | 深黑色背景(#0a0a0a)、发光强调色、微妙发光效果、奢华品牌美学 | 高端产品、高管演示、高端品牌 |
| gradient-modern | 大胆的网格渐变、流畅的色彩过渡、现代字体、鲜艳而精致 | 初创公司、创意机构、品牌发布 |
| neo-brutalist | 原始粗体字体、高对比度、有意的“丑陋”美学、反设计即设计、Memphis风格 | 边缘品牌、面向Z世代、颠覆性初创公司 |
| 3d-isometric | 干净的等距插图、浮动3D元素、柔和阴影、技术前瞻美学 | 技术解释、产品特性、SaaS演示文稿 |
| editorial | 杂志品质布局、精细的字体层级、戏剧性的摄影、Vogue/Bloomberg美学 | 年度报告、奢华品牌、思想领导力 |
| minimal-swiss | 基于网格的精确性、Helvetica风格字体、对负空间的巧妙运用、永恒的现代主义 | 建筑、设计公司、高端咨询 |
| keynote | 苹果风格的审美,具有大胆的字体、戏剧性的图像、高对比度、电影感 | 主题演讲、产品发布、鼓舞人心的演讲 |
工作流程
步骤1:理解需求
当用户请求生成演示文稿时,请确定:
- 主题/题目:演示文稿是关于什么的
- 幻灯片数量:需要多少张幻灯片(默认:5-10)
- 风格:商务 / 学术 / 极简 / 主题演讲 / 创意
- 宽高比:标准 (16:9) 还是经典 (4:3)
- 内容大纲:每张幻灯片的关键点
- 你不需要检查
/mnt/user-data下的文件夹
场景预设
阅读 templates/presets.json 以获取5个预构建的演示文稿场景:
- pitch-deck:创业路演(10张幻灯片,gradient-modern 风格)
- quarterly-report:业务回顾(12张幻灯片,minimal-swiss 风格)
- product-launch:产品发布主题演讲(8张幻灯片,keynote 风格)
- training-workshop:教育培训(15张幻灯片,3d-isometric 风格)
- annual-review:年终回顾(15张幻灯片,editorial 风格)
每个预设都包含推荐的叙事弧线、幻灯片数量、风格和详细的 style_guidelines。将这些作为起点,并根据用户需求进行自定义。
步骤2:创建演示文稿计划
在 /mnt/user-data/workspace/ 中创建一个包含演示文稿结构的JSON文件。重要:包含 style 字段以定义整体视觉一致性。
{
"title": "演示文稿标题",
"style": "keynote",
"author": "作者姓名",
"keywords": ["关键字1", "关键字2"],
"image_fit": "覆盖",
"transition": {
"speed": "中等",
"advance_after_seconds": null
},
"style_guidelines": {
"color_palette": "深黑色背景,白色文字,单一强调色(蓝色或橙色)",
"typography": "粗体无衬线标题,干净的正文字体,戏剧性的尺寸对比",
"imagery": "高质量摄影,全出血图像,电影构图",
"layout": "宽裕的留白,居中焦点,每张幻灯片元素最少化"
},
"aspect_ratio": "16:9",
"slides": [
{
"slide_number": 1,
"type": "title",
"title": "主标题",
"subtitle": "副标题或标语",
"visual_description": "用于图像生成的详细描述"
},
{
"slide_number": 2,
"type": "content",
"title": "幻灯片标题",
"key_points": ["要点1", "要点2", "要点3"],
"visual_description": "用于图像生成的详细描述"
}
]
}
步骤3:按顺序生成幻灯片图像
重要:严格按顺序,一张一张地生成幻灯片。不要并行或批量生成图像。每张幻灯片都依赖于前一张幻灯片的输出作为参考图像。并行生成幻灯片会破坏视觉一致性,这是不允许的。
-
阅读图像生成技能:
/mnt/skills/public/image-generation/SKILL.md -
对于第一张幻灯片(幻灯片1),创建一个建立视觉风格的提示:
{
"prompt": "专业演示文稿幻灯片。[来自计划的style_guidelines]。标题:'你的标题'。[visual_description]。此幻灯片为整个演示文稿建立视觉语言。",
"style": "[基于所选风格 - 例如,Apple Keynote美学,戏剧性灯光,电影感]",
"composition": "具有清晰文本层次的干净布局,[特定风格的构图]",
"color_palette": "[来自style_guidelines]",
"typography": "[来自style_guidelines]"
}
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/slide-01-prompt.json \
--output-file /mnt/user-data/outputs/slide-01.jpg \
--aspect-ratio 16:9
- 对于后续幻灯片(幻灯片2+),使用前一张幻灯片作为参考图像:
{
"prompt": "专业演示文稿幻灯片,延续参考图像的视觉风格。保持相同的配色方案、字体风格和整体美学。标题:'幻灯片标题'。[visual_description]。保持与参考图像视觉一致。",
"style": "完全匹配参考图像的风格",
"composition": "与参考图像相似的布局原则,为此内容调整",
"color_palette": "与参考图像相同",
"consistency_note": "此幻灯片必须看起来与参考图像属于同一演示文稿"
}
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/slide-02-prompt.json \
--reference-images /mnt/user-data/outputs/slide-01.jpg \
--output-file /mnt/user-data/outputs/slide-02.jpg \
--aspect-ratio 16:9
- 对剩余的所有幻灯片继续操作,始终参考前一张幻灯片:
# 幻灯片3参考幻灯片2
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/slide-03-prompt.json \
--reference-images /mnt/user-data/outputs/slide-02.jpg \
--output-file /mnt/user-data/outputs/slide-03.jpg \
--aspect-ratio 16:9
# 幻灯片4参考幻灯片3
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/slide-04-prompt.json \
--reference-images /mnt/user-data/outputs/slide-03.jpg \
--output-file /mnt/user-data/outputs/slide-04.jpg \
--aspect-ratio 16:9
步骤4:合成PPT
生成所有幻灯片图像后,调用合成脚本:
python /mnt/skills/public/ppt-generation/scripts/generate.py \
--plan-file /mnt/user-data/workspace/presentation-plan.json \
--slide-images /mnt/user-data/outputs/slide-01.jpg /mnt/user-data/outputs/slide-02.jpg /mnt/user-data/outputs/slide-03.jpg \
--output-file /mnt/user-data/outputs/presentation.pptx
参数:
--plan-file:演示文稿计划JSON文件的绝对路径(必需)--slide-images:按顺序排列的幻灯片图像的绝对路径(必需,以空格分隔)--output-file:输出PPTX文件的绝对路径(必需)
[!NOTE] 不要阅读python文件,只需使用参数调用它。
完整示例:玻璃拟态风格(最现代前卫)
用户请求:“创建一个关于AI产品发布的演示文稿”
步骤1:创建演示文稿计划
创建 /mnt/user-data/workspace/ai-product-plan.json:
{
"title": "Introducing Nova AI",
"style": "glassmorphism",
"style_guidelines": {
"color_palette": "Vibrant purple-to-cyan gradient background (#667eea→#00d4ff), frosted glass panels with 15-20% white opacity, electric accents",
"typography": "SF Pro Display style, bold 700 weight white titles with subtle text-shadow, clean 400 weight body text, excellent contrast on glass",
"imagery": "Abstract 3D glass spheres, floating translucent geometric shapes, soft luminous orbs, depth through layered transparency",
"layout": "Centered frosted glass cards with 32px rounded corners, 48-64px padding, floating above gradient, layered depth with soft shadows",
"effects": "Backdrop blur 20-40px on glass panels, subtle white border glow, soft colored shadows matching gradient, light refraction effects",
"visual_language": "Apple Vision Pro / visionOS aesthetic, premium depth through transparency, futuristic yet approachable, 2024 design trends"
},
"aspect_ratio": "16:9",
"slides": [
{
"slide_number": 1,
"type": "title",
"title": "Introducing Nova AI",
"subtitle": "Intelligence, Reimagined",
"visual_description": "Stunning gradient background flowing from deep purple (#667eea) through magenta to cyan (#00d4ff). Center: large frosted glass panel with strong backdrop blur, containing bold white title 'Introducing Nova AI' and lighter subtitle. Floating 3D glass spheres and abstract shapes around the card creating depth. Soft glow emanating from behind the glass panel. Premium visionOS aesthetic. The glass card has subtle white border (1px rgba 255,255,255,0.3) and soft purple-tinted shadow."
},
{
"slide_number": 2,
"type": "content",
"title": "Why Nova?",
"key_points": ["10x faster processing", "Human-like understanding", "Enterprise-grade security"],
"visual_description": "Same purple-cyan gradient background. Left side: floating frosted glass card with title 'Why Nova?' in bold white, three key points below with subtle glass pill badges. Right side: abstract 3D visualization of neural network as interconnected glass nodes with soft glow. Floating translucent geometric shapes (icosahedrons, tori) adding depth. Consistent glassmorphism aesthetic with previous slide."
},
{
"slide_number": 3,
"type": "content",
"title": "How It Works",
"key_points": ["Natural language input", "Multi-modal processing", "Instant insights"],
"visual_description": "Gradient background consistent with previous slides. Central composition: three stacked frosted glass cards at slight angles showing the workflow steps, connected by soft glowing lines. Each card has an abstract icon. Floating glass orbs and light particles around the composition. Title 'How It Works' in bold white at top. Depth created through card layering and transparency."
},
{
"slide_number": 4,
"type": "content",
"title": "Built for Scale",
"key_points": ["1M+ concurrent users", "99.99% uptime", "Global infrastructure"],
"visual_description": "Same gradient background. Asymmetric layout: right side features large frosted glass panel with metrics displayed in bold typography. Left side: abstract 3D globe made of glass panels and connection lines, representing global scale. Floating data visualization elements as small glass cards with numbers. Soft ambient glow throughout. Premium tech aesthetic."
},
{
"slide_number": 5,
"type": "conclusion",
"title": "The Future Starts Now",
"subtitle": "Join the waitlist",
"visual_description": "Dramatic finale slide. Gradient background with slightly increased vibrancy. Central frosted glass card with bold title 'The Future Starts Now' and call-to-action subtitle. Behind the card: burst of soft light rays and floating glass particles creating celebration effect. Multiple layered glass shapes creating depth. The most visually impactful slide while maintaining style consistency."
}
]
}
步骤2:阅读图像生成技能
阅读 /mnt/skills/public/image-generation/SKILL.md 以了解如何生成图像。
步骤3:使用参考链逐一生成幻灯片图像
幻灯片1 - 标题(建立视觉语言):
创建 /mnt/user-data/workspace/nova-slide-01.json:
{
"prompt": "Ultra-premium presentation title slide with glassmorphism design. Background: smooth flowing gradient from deep purple (#667eea) through magenta (#f093fb) to cyan (#00d4ff), soft and vibrant. Center: large frosted glass panel with strong backdrop blur effect, rounded corners 32px, containing bold white sans-serif title 'Introducing Nova AI' (72pt, SF Pro Display style, font-weight 700) with subtle text shadow, subtitle 'Intelligence, Reimagined' below in lighter weight. The glass panel has subtle white border (1px rgba 255,255,255,0.25) and soft purple-tinted drop shadow. Floating around the card: 3D glass spheres with refraction, translucent geometric shapes (icosahedrons, abstract blobs), creating depth and dimension. Soft luminous glow emanating from behind the glass panel. Small floating particles of light. Apple Vision Pro / visionOS UI aesthetic. Professional presentation slide, 16:9 aspect ratio. Hyper-modern, premium tech product launch feel.",
"style": "Glassmorphism, visionOS aesthetic, Apple Vision Pro UI style, premium tech, 2024 design trends",
"composition": "Centered layout with frosted glass panel, floating 3D glass spheres and translucent shapes around it, depth through layers and blur",
"color_palette": "Deep purple (#667eea) to cyan (#00d4ff) gradient background, white text on glass panels, electric magenta accents",
"typography": "SF Pro Display style, bold 700 weight white titles (72pt) with subtle text-shadow, clean 400 weight body text, excellent contrast on glass"
}
生成幻灯片1:
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/nova-slide-01.json \
--output-file /mnt/user-data/outputs/nova-slide-01.jpg \
--aspect-ratio 16:9
幻灯片2 - 内容(参考幻灯片1):
{
"prompt": "Professional presentation slide continuing the visual style from the reference image. Maintain the same glassmorphism aesthetic with purple-cyan gradient background, frosted glass panels, and floating translucent shapes. Title: 'Why Nova?' in bold white sans-serif. Three key points listed below: '10x faster processing', 'Human-like understanding', 'Enterprise-grade security' with subtle glass pill badges. Right side: abstract 3D visualization of neural network as interconnected glass nodes with soft glow. Keep visual consistency with the reference - same color palette, typography, composition principles, and depth effects.",
"style": "Match the style of the reference image exactly - glassmorphism with visionOS aesthetic",
"composition": "Asymmetric layout with glass card on left and abstract visualization on right, similar to reference but adapted for content",
"color_palette": "Same as reference image - purple-cyan gradient with white text on glass",
"consistency_note": "This slide must look like it belongs in the same presentation as the reference image"
}
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/nova-slide-02.json \
--reference-images /mnt/user-data/outputs/nova-slide-01.jpg \
--output-file /mnt/user-data/outputs/nova-slide-02.jpg \
--aspect-ratio 16:9
幻灯片3 - 内容(参考幻灯片2):
{
"prompt": "Professional presentation slide continuing the visual style from the reference image. Maintain the same glassmorphism aesthetic with purple-cyan gradient background and frosted glass panels. Title: 'How It Works' in bold white at top. Central composition: three stacked frosted glass cards at slight angles showing the workflow steps 'Natural language input', 'Multi-modal processing', 'Instant insights', connected by soft glowing lines. Each card has an abstract icon. Floating glass orbs and light particles around the composition. Depth created through card layering and transparency. Keep visual consistency with the reference.",
"style": "Match the style of the reference image exactly - glassmorphism with visionOS aesthetic",
"composition": "Central vertical composition with stacked glass cards, similar to reference but adapted for this content",
"color_palette": "Same as reference image - purple-cyan gradient with white text on glass",
"consistency_note": "This slide must look like it belongs in the same presentation as the reference image"
}
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/nova-slide-03.json \
--reference-images /mnt/user-data/outputs/nova-slide-02.jpg \
--output-file /mnt/user-data/outputs/nova-slide-03.jpg \
--aspect-ratio 16:9
幻灯片4 - 内容(参考幻灯片3):
{
"prompt": "Professional presentation slide continuing the visual style from the reference image. Maintain the same glassmorphism aesthetic with purple-cyan gradient background and frosted glass panels. Title: 'Built for Scale' in bold white. Asymmetric layout: right side features large frosted glass panel with metrics '1M+ concurrent users', '99.99% uptime', 'Global infrastructure' displayed in bold typography. Left side: abstract 3D globe made of glass panels and connection lines, representing global scale. Floating data visualization elements as small glass cards with numbers. Soft ambient glow throughout. Keep visual consistency with the reference.",
"style": "Match the style of the reference image exactly - glassmorphism with visionOS aesthetic",
"composition": "Asymmetric layout with data panel right and 3D globe left, similar to reference but adapted for this content",
"color_palette": "Same as reference image - purple-cyan gradient with white text on glass",
"consistency_note": "This slide must look like it belongs in the same presentation as the reference image"
}
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/nova-slide-04.json \
--reference-images /mnt/user-data/outputs/nova-slide-03.jpg \
--output-file /mnt/user-data/outputs/nova-slide-04.jpg \
--aspect-ratio 16:9
幻灯片5 - 结论(参考幻灯片4):
{
"prompt": "Dramatic finale presentation slide continuing the visual style from the reference image. Maintain the same glassmorphism aesthetic with purple-cyan gradient background, slightly increased vibrancy. Central frosted glass card with bold title 'The Future Starts Now' in bold white and call-to-action subtitle 'Join the waitlist'. Behind the card: burst of soft light rays and floating glass particles creating celebration effect. Multiple layered glass shapes creating depth. The most visually impactful slide while maintaining style consistency with previous slides. Keep visual consistency with the reference.",
"style": "Match the style of the reference image exactly - glassmorphism with visionOS aesthetic, slightly more dramatic and celebratory",
"composition": "Centered glass card with celebratory light burst behind, similar to reference but more dramatic",
"color_palette": "Same as reference image but with slightly increased vibrancy and celebration effects",
"consistency_note": "This slide must look like it belongs in the same presentation as the reference image, while being the dramatic finale"
}
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/nova-slide-05.json \
--reference-images /mnt/user-data/outputs/nova-slide-04.jpg \
--output-file /mnt/user-data/outputs/nova-slide-05.jpg \
--aspect-ratio 16:9
步骤4:合成PPT
最后,将所有幻灯片图像组合成PowerPoint文件:
python /mnt/skills/public/ppt-generation/scripts/generate.py \
--plan-file /mnt/user-data/workspace/ai-product-plan.json \
--slide-images /mnt/user-data/outputs/nova-slide-01.jpg /mnt/user-data/outputs/nova-slide-02.jpg /mnt/user-data/outputs/nova-slide-03.jpg /mnt/user-data/outputs/nova-slide-04.jpg /mnt/user-data/outputs/nova-slide-05.jpg \
--output-file /mnt/user-data/outputs/Nova_AI_Presentation.pptx
最佳实践
- 不要自动生成:除非用户明确要求,否则不要创建演示文稿
- 从预设开始:使用
templates/presets.json中的预设作为起点 - 单一来源:创建计划后,使用
style和style_guidelines保持视觉一致性 - 按顺序生成:严格按照顺序生成图像,一次一张
- 视觉一致性:始终将前一张幻灯片作为参考图像传递给后续图像生成
- 保持自定义:如果用户没有说明,使用清晰的预设;如果他们提供了具体细节,定制计划
- 清晰输出:在
/mnt/user-data/outputs/中使用描述性文件名