mcpField
S
slide-generation

slide-generation

github.com/michaelboeding文档处理3040 次安装2 周前更新
代码仓库

关于 slide-generation

面向 Agent 和其他工作流的底层幻灯片生成 Skill,可将结构化内容转换为演示文件。支持 PPTX、Markdown 和 HTML,并提供多种幻灯片类型与主题;输出为静态内容,图表功能较基础。

主要功能

  1. 01生成 PPTX、Markdown 和 HTML 幻灯片
  2. 02支持多种幻灯片布局
  3. 03应用预设或自定义主题
  4. 04加入图片与演讲者备注
  5. 05根据结构化 JSON 创建幻灯片

适用场景

  1. 01将提纲转换为 PowerPoint 演示文稿
  2. 02以 Markdown 格式制作开发者演示文稿
  3. 03将市场报告转换为演示文稿

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/michaelboeding/skills --skill slide-generation

安装后在 Claude Code 中输入/slide-generation确认已加载。

附带文件scripts/slides.py

详细介绍

幻灯片生成技能

根据结构化内容创建演示文稿幻灯片。

这是一项底层生成技能,供其他 Agent 用于创建实际的幻灯片文件。

创建的格式

格式方法最适合
PPTXpython-pptx 库PowerPoint、导入到 Google Slides
MarkdownMarp/Slidev 格式面向开发者的演示文稿
HTMLReveal.js 模板网页演示文稿

先决条件

# Required for PPTX generation
pip install python-pptx Pillow

# Optional for Markdown slides
npm install -g @marp-team/marp-cli

用法

脚本:slides.py
# Basic slide creation
python slides.py --content slides.json --output presentation.pptx

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

# Markdown output
python slides.py --content slides.json --format markdown --output slides.md
输入格式:slides.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"}
      ]
    }
  ]
}

幻灯片类型

1. 标题幻灯片
{
  "type": "title",
  "title": "Company Name",
  "subtitle": "Tagline goes here",
  "image": "logo.png",
  "date": "January 2026"
}
2. 内容幻灯片(项目符号)
{
  "type": "content",
  "title": "Slide Title",
  "bullets": ["Point 1", "Point 2", "Point 3"],
  "image": "optional-side-image.png",
  "notes": "Speaker notes"
}
3. 图片幻灯片
{
  "type": "image",
  "title": "Product Screenshot",
  "image": "screenshot.png",
  "caption": "Our new dashboard"
}
4. 双栏幻灯片
{
  "type": "two-column",
  "title": "Before & After",
  "left": {"heading": "Before", "bullets": ["Problem 1"]},
  "right": {"heading": "After", "bullets": ["Solution 1"]}
}
5. 引言幻灯片
{
  "type": "quote",
  "quote": "This product changed our business.",
  "attribution": "- CEO, Fortune 500 Company",
  "image": "headshot.png"
}
6. 数据统计幻灯片
{
  "type": "stats",
  "title": "By the Numbers",
  "stats": [
    {"value": "10x", "label": "Faster"},
    {"value": "$1M", "label": "Saved"}
  ]
}
7. 图表幻灯片
{
  "type": "chart",
  "title": "Market Size",
  "chart_type": "bar",
  "data": {
    "labels": ["TAM", "SAM", "SOM"],
    "values": [50, 10, 2]
  }
}
8. 章节分隔页
{
  "type": "section",
  "title": "Part 2: The Solution"
}
9. 结束幻灯片
{
  "type": "closing",
  "title": "Thank You",
  "subtitle": "Questions?",
  "contact": "[email protected]"
}

主题

主题描述
modern-dark深色背景、浅色文字、醒目的强调色
modern-light浅色背景、简洁且极简
corporate专业风格,蓝色调
startup醒目配色,充满活力
minimal最大限度留白,注重字体排版
自定义主题
{
  "theme": {
    "background": "#1a1a2e",
    "text": "#ffffff",
    "accent": "#e94560",
    "heading_font": "Montserrat",
    "body_font": "Open Sans"
  }
}

与其他技能集成

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
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

输出

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

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

限制

  • 图表较为基础(复杂图表请使用 image-generation)
  • 不支持动画(仅静态幻灯片)
  • 自定义布局需要定制主题
  • 大图片会缩放至适配尺寸

高级 PowerPoint 操作

对于更复杂的 PowerPoint 任务,请使用 pptx 技能,它支持:

  • 编辑现有演示文稿(OOXML)
  • 使用模板(复制、重新排列、替换)
  • HTML → PowerPoint 转换
  • 高级布局和排版控制
  • 批注和演讲者备注

示例提示词

来自其他 Agent:

slide-generation 通过程序调用,不由用户直接调用

直接使用:

“根据以下内容创建幻灯片:[粘贴 JSON]” “根据我的大纲生成 PowerPoint”

评论

支持 Markdown