anbeime/skill / skills/pptx-generator/pptx-generator
pptx-generator
Verified产品经理与运营专员在准备汇报展示时,将 JSON 数据一键转换为标准 .pptx 文件。自动应用多种布局、图表与表格样式,快速生成专业 PPT,彻底告别繁琐手工排版,让内容产出与展示更高效!
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.3 KB |
| assets/styles/business.json | config | 167 B |
| assets/styles/minimal.json | config | 169 B |
| assets/styles/modern.json | config | 165 B |
| assets/templates/ppt_data_template.json | config | 749 B |
| references/collaboration_guide.md | markdown | 10.2 KB |
| references/json_format_spec.md | markdown | 4.5 KB |
| references/layout_guide.md | markdown | 6.6 KB |
| scripts/json_validator.py | script | 5.9 KB |
| scripts/pptx_builder.py | script | 9.6 KB |
| scripts/pptx_validator.py | script | 4.4 KB |
references/layout_guide.md
View on GitHub# 布局指南
本文档详细说明了 pptx-generator 支持的各种布局类型及其使用场景。
## 目录
1. [布局概述](#布局概述)
2. [布局类型详解](#布局类型详解)
3. [布局选择建议](#布局选择建议)
4. [自定义布局](#自定义布局)
---
## 布局概述
pptx-generator 支持多种预设布局类型,每种布局适用于不同的内容场景。
| 布局类型 | 标题位置 | 内容位置 | 适用场景 |
|----------|----------|----------|----------|
| TitleSlide | 顶部中央 | 下方列表 | 封面、标题页 |
| ContentSlide | 顶部 | 正文内容 | 标准内容页 |
| TwoColumnSlide | 顶部 | 两栏内容 | 对比、并列内容 |
| SectionHeaderSlide | 中央 | 无 | 章节页 |
| ContentWithCaptionSlide | 顶部 | 内容 + 说明 | 图片 + 文字 |
| SummarySlide | 顶部 | 总结内容 | 总结、结尾页 |
---
## 布局类型详解
### 1. TitleSlide (标题页)
**描述**:标题页布局,标题位于中央,内容作为副标题或要点展示。
**适用场景**:
- 演示文稿封面
- 标题页
- 章节标题页
**JSON 示例**:
```json
{
"layout": "TitleSlide",
"title": "AI 智能助手",
"content": [
"新一代人工智能助手",
"提升工作效率",
"智能对话交互"
],
"notes": "开场白"
}
```
**布局特点**:
- 标题:大字号、居中、加粗
- 内容:中等字号、居中、项目符号
- 适合:1-3 个要点
---
### 2. ContentSlide (内容页)
**描述**:标准内容页布局,标题在顶部,内容在下方。
**适用场景**:
- 大部分幻灯片
- 内容展示
- 要点列表
**JSON 示例**:
```json
{
"layout": "ContentSlide",
"title": "核心功能",
"content": [
"自然语言理解",
"智能内容生成",
"多模态交互",
"个性化定制"
],
"notes": "详细介绍功能"
}
```
**布局特点**:
- 标题:大字号、左对齐、加粗
- 内容:中等字号、左对齐、项目符号
- 适合:3-7 个要点
---
### 3. TwoColumnSlide (两栏页)
**描述**:两栏布局,标题在顶部,内容分为左右两栏。
**适用场景**:
- 对比展示
- 并列内容
- 分类展示
**JSON 示例**:
```json
{
"layout": "TwoColumnSlide",
"title": "产品对比",
"content": [
"旧版本:功能单一",
"旧版本:界面陈旧",
"新版本:功能丰富",
"新版本:界面现代"
],
"notes": "对比旧版本和新版本"
}
```
**布局特点**:
- 标题:大字号、左对齐、加粗
- 内容:中等字号、两栏对齐
- 适合:4-8 个要点(平均分配到两栏)
---
### 4. SectionHeaderSlide (章节页)
**描述**:章节标题页布局,仅显示章节标题,无内容。
**适用场景**:
- 章节分隔
- 主题切换
- 过渡页
**JSON 示例**:
```json
{
"layout": "SectionHeaderSlide",
"title": "第一部分:产品概述",
"content": [],
"notes": "章节分隔页"
}
```
**布局特点**:
- 标题:超大字号、居中、加粗
- 内容:无
- 适合:仅标题
---
### 5. ContentWithCaptionSlide (带说明的内容页)
**描述**:内容页布局,标题在顶部,内容在下方,支持额外的说明文字。
**适用场景**:
- 图片展示
- 图表说明
- 数据展示
**JSON 示例**:
```json
{
"layout": "ContentWithCaptionSlide",
"title": "用户增长数据",
"content": [
"2024年 Q1:100万用户",
"2024年 Q2:150万用户",
"2024年 Q3:200万用户"
],
"notes": "图表说明:用户呈现稳定增长趋势"
}
```
**布局特点**:
- 标题:大字号、左对齐、加粗
- 内容:中等字号、左对齐
- 说明:小字号、左对齐、斜体
- 适合:3-5 个要点 + 详细说明
---
### 6. SummarySlide (总结页)
**描述**:总结页布局,标题在顶部,总结内容在下方。
**适用场景**:
- 演示文稿结尾
- 章节总结
- 要点回顾
**JSON 示例**:
```json
{
"layout": "SummarySlide",
"title": "总结",
"content": [
"AI 智能助手",
"提升效率,创造价值",
"开启智能新时代"
],
"notes": "总结发言"
}
```
**布局特点**:
- 标题:大字号、左对齐、加粗
- 内容:中等字号、左对齐、项目符号
- 适合:3-5 个要点
---
## 布局选择建议
### 根据内容类型选择
| 内容类型 | 推荐布局 | 原因 |
|----------|----------|------|
| 封面、标题 | TitleSlide | 标题突出,视觉冲击 |
| 标准内容 | ContentSlide | 经典布局,易于阅读 |
| 对比内容 | TwoColumnSlide | 两栏对比,清晰明了 |
| 章节分隔 | SectionHeaderSlide | 简洁明了,区分章节 |
| 图片/图表 | ContentWithCaptionSlide | 内容 + 说明,完整呈现 |
| 总结、结尾 | SummarySlide | 重点突出,便于记忆 |
### 根据内容数量选择
| 内容数量 | 推荐布局 | 说明 |
|----------|----------|------|
| 1-3 个要点 | TitleSlide | 突出重点,简洁明了 |
| 3-7 个要点 | ContentSlide | 标准布局,适合大多数场景 |
| 4-8 个要点 | TwoColumnSlide | 两栏分布,避免拥挤 |
| 无内容 | SectionHeaderSlide | 仅标题,章节分隔 |
| 3-5 个要点 + 说明 | ContentWithCaptionSlide | 内容 + 说明,完整呈现 |
| 3-5 个要点 | SummarySlide | 总结回顾,重点突出 |
---
## 自定义布局
### 使用 notes 字段
`notes` 字段可用于添加额外的说明文字,不会在幻灯片上显示,但在 PowerPoint 的备注窗格中可见。
```json
{
"title": "核心功能",
"content": ["功能1", "功能2"],
"notes": "演讲提示:详细解释每个功能的应用场景"
}
```
### 省略 layout 字段
如果 `layout` 字段省略,pptx-generator 将自动选择合适的布局:
- 第一页:使用 TitleSlide
- 最后一页:使用 SummarySlide
- 其他页面:使用 ContentSlide
### 内容数量自适应
pptx-generator 会根据内容数量自动调整布局:
- 1-3 个要点:使用 TitleSlide
- 3-7 个要点:使用 ContentSlide
- 4-8 个要点:使用 TwoColumnSlide
---
## 最佳实践
### 1. 保持布局一致性
在同一个演示文稿中,尽量使用相似的布局风格,避免过于频繁的布局切换。
### 2. 合理使用章节页
在较长的演示文稿中,使用 SectionHeaderSlide 进行章节分隔,帮助听众理解内容结构。
### 3. 避免内容过载
每页幻灯片的内容数量建议:
- 最少:1 个要点
- 最多:8 个要点
- 推荐:3-5 个要点
### 4. 使用备注
使用 `notes` 字段添加演讲提示,帮助自己在演讲时更好地表达。
### 5. 测试不同布局
生成 PPTX 文件后,在 PowerPoint 中打开,查看实际效果,必要时调整布局类型。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |