pptx-generator
将 JSON 格式的 PPT 内容转换为标准的 .pptx 文件。使用 python-pptx 库,支持多种布局、图表、表格和样式。与 ppt-generator Skill 完全协同,可作为独立使用或与其他 PPT Skill 配合。
npx skills add anbeime/skill --skill pptx-generator --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# PPTX 文件生成器 ## 任务目标 - 本 Skill 用于:将 JSON 格式的 PPT 内容转换为标准的 .pptx 文件 - 能力包含:JSON 解析、PPTX 创建、多布局支持、样式应用、图表生成、表格生成 - 触发条件:用户需要生成 .pptx 文件,或需要将 JSON 数据转换为可编辑的 PPT ## 前置准备 - 依赖说明:scripts 脚本所需的依赖包 ``` python-pptx>=1.0.2 pillow>=9.0.0 openpyxl>=3.1.0 ``` ## 操作步骤 ### 标准流程(JSON 转 PPTX) #### 步骤 1:接收 JSON 数据 从以下来源接收 JSON 数据: - **ppt-generator Skill**:7 角色协作生成的 JSON - **用户直接提供**:符合格式规范的 JSON 文件 - **其他来源**:任何符合 JSON 格式的 PPT 数据 #### 步骤 2:验证 JSON 格式 调用 `scripts/json_validator.py` 验证 JSON 格式: ```bash python scripts/json_validator.py --input ./ppt_data.json ``` 验证内容包括: - 元数据完整性(title, author, theme) - 幻灯片数组存在性 - 每个幻灯片的必需字段(title, content) - 数据类型正确性 #### 步骤 3:生成 PPTX 文件 调用 `scripts/pptx_builder.py` 生成 .pptx 文件: ```bash python scripts/pptx_builder.py \ --input ./ppt_data.json \ --style assets/styles/modern.json \ --output ./presentation.pptx ``` **核心功能**: 1. **创建演示文稿**:初始化 Presentation 对象 2. **添加幻灯片**:根据 JSON 数据逐页添加 3. **应用布局**:根据幻灯片类型选择布局 4. **添加内容**: - 标题(Title) - 内容(Text、Bullet Points) - 图片(Picture) - 图表(Chart) - 表格(Table) 5. **应用样式**:根据风格配置设置字体、颜色、间距 6. **保存文件**:导出为 .pptx 文件 #### 步骤 4:验证 PPTX 文件 调用 `scripts/pptx_validator.py` 验证生成的 .pptx 文件: ```bash python scripts/pptx_validator.py --input ./prese
- 任务目标
- 前置准备
- 操作步骤
- 标准流程(JSON 转 PPTX)
- 高级功能
- 与其他 Skill 协同
- 资源索引
- 注意事项
- 使用示例
- 示例 1:与 ppt-generator 协同生成 PPTX
- 示例 2:仅生成 PPTX 文件
- 示例 3:自定义风格生成
- 示例 4:批量生成 PPTX 文件
python scripts/json_validator.py --input ./ppt_data.json python scripts/pptx_builder.py \ python scripts/pptx_validator.py --input ./presentation.pptx
What does the pptx-generator skill do?
将 JSON 格式的 PPT 内容转换为标准的 .pptx 文件。使用 python-pptx 库,支持多种布局、图表、表格和样式。与 ppt-generator Skill 完全协同,可作为独立使用或与其他 PPT Skill 配合。
How do I install it?
Run `npx skills add anbeime/skill --skill pptx-generator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From anbeime/skill, a repository with 4,714 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
