slide-generation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Slide Generation Skill

幻灯片生成Skill

Create presentation slides from structured content.
This is a low-level generation skill that other agents use to create actual slide files.
从结构化内容创建演示幻灯片。
这是一个底层生成Skill,供其他Agent用来创建实际的幻灯片文件。

What It Creates

可生成的格式

FormatMethodBest For
PPTX
python-pptx
library
PowerPoint, Google Slides import
MarkdownMarp/Slidev formatDeveloper presentations
HTMLReveal.js templateWeb-based presentations
格式实现方式适用场景
PPTX
python-pptx
PowerPoint、Google Slides 导入
MarkdownMarp/Slidev 格式开发者演示文稿
HTMLReveal.js 模板基于Web的演示文稿

Prerequisites

前置依赖

bash
undefined
bash
undefined

Required for PPTX generation

PPTX生成所需依赖

pip install python-pptx Pillow
pip install python-pptx Pillow

Optional for Markdown slides

Markdown幻灯片可选依赖

npm install -g @marp-team/marp-cli
undefined
npm install -g @marp-team/marp-cli
undefined

Usage

使用方法

Script:
slides.py

脚本:
slides.py

bash
undefined
bash
undefined

Basic slide creation

基础幻灯片创建

python slides.py --content slides.json --output presentation.pptx
python slides.py --content slides.json --output presentation.pptx

With theme

使用主题

python slides.py --content slides.json --theme modern-dark --output deck.pptx
python slides.py --content slides.json --theme modern-dark --output deck.pptx

Markdown output

输出Markdown格式

python slides.py --content slides.json --format markdown --output slides.md
undefined
python slides.py --content slides.json --format markdown --output slides.md
undefined

Input Format:
slides.json

输入格式:
slides.json

json
{
  "metadata": {
    "title": "Presentation Title",
    "author": "Author Name",
    "theme": "modern-dark"
  },
  "slides": [
    {
      "type": "title",
      "title": "Main Title",
      "subtitle": "Subtitle or tagline",
      "image": "logo.png"
    },
    {
      "type": "content",
      "title": "Slide Title",
      "bullets": [
        "First point",
        "Second point",
        "Third point"
      ],
      "notes": "Speaker notes for this slide"
    },
    {
      "type": "image",
      "title": "Visual Slide",
      "image": "chart.png",
      "caption": "Optional caption"
    },
    {
      "type": "two-column",
      "title": "Comparison",
      "left": {
        "heading": "Before",
        "bullets": ["Point 1", "Point 2"]
      },
      "right": {
        "heading": "After",
        "bullets": ["Point 1", "Point 2"]
      }
    },
    {
      "type": "quote",
      "quote": "This is a customer testimonial or important quote.",
      "attribution": "- Customer Name, Company"
    },
    {
      "type": "stats",
      "title": "Key Metrics",
      "stats": [
        {"value": "10x", "label": "Faster"},
        {"value": "50%", "label": "Cost Savings"},
        {"value": "1M+", "label": "Users"}
      ]
    }
  ]
}

json
{
  "metadata": {
    "title": "Presentation Title",
    "author": "Author Name",
    "theme": "modern-dark"
  },
  "slides": [
    {
      "type": "title",
      "title": "Main Title",
      "subtitle": "Subtitle or tagline",
      "image": "logo.png"
    },
    {
      "type": "content",
      "title": "Slide Title",
      "bullets": [
        "First point",
        "Second point",
        "Third point"
      ],
      "notes": "Speaker notes for this slide"
    },
    {
      "type": "image",
      "title": "Visual Slide",
      "image": "chart.png",
      "caption": "Optional caption"
    },
    {
      "type": "two-column",
      "title": "Comparison",
      "left": {
        "heading": "Before",
        "bullets": ["Point 1", "Point 2"]
      },
      "right": {
        "heading": "After",
        "bullets": ["Point 1", "Point 2"]
      }
    },
    {
      "type": "quote",
      "quote": "This is a customer testimonial or important quote.",
      "attribution": "- Customer Name, Company"
    },
    {
      "type": "stats",
      "title": "Key Metrics",
      "stats": [
        {"value": "10x", "label": "Faster"},
        {"value": "50%", "label": "Cost Savings"},
        {"value": "1M+", "label": "Users"}
      ]
    }
  ]
}

Slide Types

幻灯片类型

1. Title Slide

1. 标题幻灯片

json
{
  "type": "title",
  "title": "Company Name",
  "subtitle": "Tagline goes here",
  "image": "logo.png",
  "date": "January 2026"
}
json
{
  "type": "title",
  "title": "Company Name",
  "subtitle": "Tagline goes here",
  "image": "logo.png",
  "date": "January 2026"
}

2. Content Slide (Bullets)

2. 内容幻灯片(项目符号)

json
{
  "type": "content",
  "title": "Slide Title",
  "bullets": ["Point 1", "Point 2", "Point 3"],
  "image": "optional-side-image.png",
  "notes": "Speaker notes"
}
json
{
  "type": "content",
  "title": "Slide Title",
  "bullets": ["Point 1", "Point 2", "Point 3"],
  "image": "optional-side-image.png",
  "notes": "Speaker notes"
}

3. Image Slide

3. 图片幻灯片

json
{
  "type": "image",
  "title": "Product Screenshot",
  "image": "screenshot.png",
  "caption": "Our new dashboard"
}
json
{
  "type": "image",
  "title": "Product Screenshot",
  "image": "screenshot.png",
  "caption": "Our new dashboard"
}

4. Two-Column Slide

4. 双栏幻灯片

json
{
  "type": "two-column",
  "title": "Before & After",
  "left": {"heading": "Before", "bullets": ["Problem 1"]},
  "right": {"heading": "After", "bullets": ["Solution 1"]}
}
json
{
  "type": "two-column",
  "title": "Before & After",
  "left": {"heading": "Before", "bullets": ["Problem 1"]},
  "right": {"heading": "After", "bullets": ["Solution 1"]}
}

5. Quote Slide

5. 引用幻灯片

json
{
  "type": "quote",
  "quote": "This product changed our business.",
  "attribution": "- CEO, Fortune 500 Company",
  "image": "headshot.png"
}
json
{
  "type": "quote",
  "quote": "This product changed our business.",
  "attribution": "- CEO, Fortune 500 Company",
  "image": "headshot.png"
}

6. Stats Slide

6. 数据统计幻灯片

json
{
  "type": "stats",
  "title": "By the Numbers",
  "stats": [
    {"value": "10x", "label": "Faster"},
    {"value": "$1M", "label": "Saved"}
  ]
}
json
{
  "type": "stats",
  "title": "By the Numbers",
  "stats": [
    {"value": "10x", "label": "Faster"},
    {"value": "$1M", "label": "Saved"}
  ]
}

7. Chart Slide

7. 图表幻灯片

json
{
  "type": "chart",
  "title": "Market Size",
  "chart_type": "bar",
  "data": {
    "labels": ["TAM", "SAM", "SOM"],
    "values": [50, 10, 2]
  }
}
json
{
  "type": "chart",
  "title": "Market Size",
  "chart_type": "bar",
  "data": {
    "labels": ["TAM", "SAM", "SOM"],
    "values": [50, 10, 2]
  }
}

8. Section Divider

8. 章节分隔幻灯片

json
{
  "type": "section",
  "title": "Part 2: The Solution"
}
json
{
  "type": "section",
  "title": "Part 2: The Solution"
}

9. Closing Slide

9. 结尾幻灯片

json
{
  "type": "closing",
  "title": "Thank You",
  "subtitle": "Questions?",
  "contact": "email@company.com"
}

json
{
  "type": "closing",
  "title": "Thank You",
  "subtitle": "Questions?",
  "contact": "email@company.com"
}

Themes

主题

ThemeDescription
modern-dark
Dark background, light text, bold accents
modern-light
Light background, clean minimalist
corporate
Professional, blue tones
startup
Bold colors, energetic
minimal
Maximum whitespace, typography focus
主题描述
modern-dark
深色背景、浅色文字、醒目强调色
modern-light
浅色背景、简洁极简风格
corporate
专业风格、蓝色调
startup
大胆配色、充满活力
minimal
最大化留白、聚焦排版

Custom Theme

自定义主题

json
{
  "theme": {
    "background": "#1a1a2e",
    "text": "#ffffff",
    "accent": "#e94560",
    "heading_font": "Montserrat",
    "body_font": "Open Sans"
  }
}

json
{
  "theme": {
    "background": "#1a1a2e",
    "text": "#ffffff",
    "accent": "#e94560",
    "heading_font": "Montserrat",
    "body_font": "Open Sans"
  }
}

Integration with Other Skills

与其他Skill的集成

pitch-deck-agent workflow:

pitch-deck-agent 工作流:

1. pitch-deck-agent generates slide content as JSON
2. Calls image-generation for visuals
3. Calls slide-generation to create PPTX
4. Returns actual .pptx file
1. pitch-deck-agent 生成JSON格式的幻灯片内容
2. 调用图片生成Skill获取视觉素材
3. 调用幻灯片生成Skill创建PPTX文件
4. 返回实际的.pptx文件

market-researcher-agent workflow:

market-researcher-agent 工作流:

1. market-researcher-agent creates market report
2. Converts report to slide format
3. Calls slide-generation for presentation
4. Returns market-report.pptx

1. market-researcher-agent 创建市场报告
2. 将报告转换为幻灯片格式
3. 调用幻灯片生成Skill创建演示文稿
4. 返回market-report.pptx文件

Output

输出示例

✅ Presentation created: presentation.pptx
   Slides: 12
   Theme: modern-dark
   Images: 5 embedded

Open with:
- Microsoft PowerPoint
- Google Slides (import)
- LibreOffice Impress

✅ 演示文稿已创建:presentation.pptx
   幻灯片数量:12
   主题:modern-dark
   嵌入图片:5张

可使用以下工具打开:
- Microsoft PowerPoint
- Google Slides(导入)
- LibreOffice Impress

Limitations

局限性

  • Charts are basic (for complex charts, use image-generation)
  • Animations not supported (static slides only)
  • Custom layouts require theme customization
  • Large images are resized to fit
  • 图表功能基础(如需复杂图表,请使用图片生成Skill)
  • 不支持动画效果(仅静态幻灯片)
  • 自定义布局需要通过主题定制实现
  • 大尺寸图片会被调整大小以适配幻灯片

For Advanced PowerPoint Operations

进阶PowerPoint操作

For more complex PowerPoint tasks, use the pptx skill which supports:
  • Editing existing presentations (OOXML)
  • Working with templates (duplicate, rearrange, replace)
  • HTML → PowerPoint conversion
  • Advanced layout and typography control
  • Comments and speaker notes

如需更复杂的PowerPoint操作,请使用 pptx skill,它支持:
  • 编辑现有演示文稿(OOXML)
  • 模板操作(复制、重排、替换)
  • HTML → PowerPoint 转换
  • 进阶布局与排版控制
  • 批注与演讲备注

Example Prompts

示例提示词

From other agents:
slide-generation
is called programmatically, not directly by users
Direct use:
"Create slides from this content: [paste JSON]" "Generate a PowerPoint from my outline"
其他Agent调用:
slide-generation
通过编程方式调用,不直接由用户触发
直接使用:
"根据以下内容创建幻灯片:[粘贴JSON内容]" "根据我的大纲生成PowerPoint"