跳到正文
cccskills
免费在 GitHub 公开

pptx-generator

Turn slide content stored in JSON, a structured data format, into editable .pptx presentations with text, images, charts, and tables. Apply layouts, styles, or templates, validate the results, and process multiple input files in batches.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

产品经理与运营专员在准备汇报展示时,将 JSON 数据一键转换为标准 .pptx 文件。自动应用多种布局、图表与表格样式,快速生成专业 PPT,彻底告别繁琐手工排版,让内容产出与展示更高效!

集成工具ExcelPowerPoint
查看安装方法

适用场景

  • Converting existing JSON slide content into an editable presentation
  • Applying consistent fonts and colors to reporting slides
  • Generating several presentations in one batch
  • Building slides from an existing presentation template

包含的文件(11)

  • SKILL.md8.3 KB
  • assets/styles/business.json167 B
  • assets/styles/minimal.json169 B
  • assets/styles/modern.json165 B
  • assets/templates/ppt_data_template.json749 B
  • references/collaboration_guide.md10.2 KB
  • references/json_format_spec.md4.5 KB
  • references/layout_guide.md6.6 KB
  • scripts/json_validator.py5.9 KB
  • scripts/pptx_builder.py9.6 KB
  • scripts/pptx_validator.py4.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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 格式:

python scripts/json_validator.py --input ./ppt_data.json

验证内容包括:

  • 元数据完整性(title, author, theme)
  • 幻灯片数组存在性
  • 每个幻灯片的必需字段(title, content)
  • 数据类型正确性

步骤 3:生成 PPTX 文件

调用 scripts/pptx_builder.py 生成 .pptx 文件:

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 文件:

python scripts/pptx_validator.py --input ./presentation.pptx

验证内容包括:

  • 文件完整性
  • 幻灯片数量
  • 内容正确性
  • 可编辑性

高级功能

自定义样式

使用自定义风格配置:

python scripts/pptx_builder.py \
  --input ./ppt_data.json \
  --style ./custom_style.json \
  --output ./presentation.pptx

批量生成

批量处理多个 JSON 文件:

python scripts/pptx_builder.py \
  --input-dir ./json_files/ \
  --style assets/styles/modern.json \
  --output-dir ./pptx_files/

使用模板

基于模板生成 PPTX:

python scripts/pptx_builder.py \
  --input ./ppt_data.json \
  --template assets/templates/business_template.pptx \
  --output ./presentation.pptx

与其他 Skill 协同

与 ppt-generator 协同

用户请求:"生成一个 PPT 文件"

┌─────────────────────────────────────────────────────────┐
│  ppt-generator Skill                                    │
├─────────────────────────────────────────────────────────┤
│  1. 主题分析师:分析主题                                │
│  2. 模板设计师:推荐布局                                │
│  3. 内容策划师:规划内容结构                            │
│  4. 文本创作者:撰写内容                                │
│  5. 视觉设计师:提供配图建议                            │
│  6. 优化编辑师:优化文本                                │
│  7. PPT 构建师:生成 JSON 数据                          │
└─────────────────────────────────────────────────────────┘
                          │
                          ▼ ppt_data.json
┌─────────────────────────────────────────────────────────┐
│  pptx-generator Skill                                  │
├─────────────────────────────────────────────────────────┤
│  1. JSON 验证(json_validator.py)                     │
│  2. PPTX 构建(pptx_builder.py)                       │
│     - 创建演示文稿                                      │
│     - 添加幻灯片                                        │
│     - 应用布局和样式                                    │
│     - 添加内容(文本、图片、图表、表格)                  │
│  3. PPTX 验证(pptx_validator.py)                     │
│  4. 输出 .pptx 文件                                   │
└─────────────────────────────────────────────────────────┘
                          │
                          ▼ presentation.pptx

与 nanobanana-ppt-visualizer 协同

用户请求:"生成 PPT 文件和图片"

ppt-generator → pptx-generator → nanobanana-ppt-visualizer
     ↓              ↓                  ↓
  JSON 数据      .pptx 文件        图片 + HTML 播放器

完整工作流

1. ppt-generator → JSON 数据
2. pptx-generator → .pptx 文件
3. nanobanana-ppt-visualizer → 图片 + HTML 播放器
4. ppt-roadshow-generator → 视频
5. remotion-video-enhancer → 增强动画

资源索引

注意事项

  • 本 Skill 使用 python-pptx 库生成标准的 .pptx 文件
  • JSON 格式必须符合规范(见 references/json_format_spec.md)
  • 支持的图片格式:PNG、JPG、JPEG、GIF
  • 支持的图表类型:柱状图、折线图、饼图
  • 支持的表格:普通表格、样式化表格
  • 与 ppt-generator Skill 完全兼容,可无缝协同
  • 生成的 .pptx 文件可在 Microsoft PowerPoint、WPS 等软件中编辑

使用示例

示例 1:与 ppt-generator 协同生成 PPTX

  • 功能说明:ppt-generator 生成 JSON,pptx-generator 生成 .pptx
  • 执行方式:ppt-generator → pptx-generator
  • 用户指令:"生成一个产品介绍的 PPT 文件"
  • 输出:presentation.pptx

示例 2:仅生成 PPTX 文件

  • 功能说明:基于现有 JSON 生成 .pptx 文件
  • 执行方式:pptx-generator 独立运行
  • 关键参数:JSON 文件路径、风格配置
  • 命令:python scripts/pptx_builder.py --input ./ppt_data.json --output ./presentation.pptx

示例 3:自定义风格生成

  • 功能说明:使用自定义风格配置
  • 执行方式:指定自定义风格文件
  • 关键参数:--style
  • 命令:python scripts/pptx_builder.py --input ./ppt_data.json --style ./my_style.json --output ./presentation.pptx

示例 4:批量生成 PPTX 文件

  • 功能说明:一次性处理多个 JSON 文件
  • 执行方式:批量处理
  • 关键参数:--input-dir, --output-dir
  • 命令:python scripts/pptx_builder.py --input-dir ./json_files/ --output-dir ./pptx_files/

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Organize AI agents into execution, management, and review roles for complex projects. Choose preset or custom teams, share project context and decisions, and combine their discussions and work into meeting records, feasibility reports, or implementation outputs.

中文简介正在准备中。当前显示英语简介。

  • Reviewing a technical architecture from several perspectives
  • Discussing product pricing across market and cost considerations
  • Assessing a new product's feasibility
anbeime/skill83052026年10月18日 更新

Generate character images, backgrounds, synthetic speech, and music for product videos featuring 小省导购员, a digital shopping presenter. Coordinate these assets with InfiniteTalk to produce a 25-second vertical video made from five scenes.

中文简介正在准备中。当前显示英语简介。

  • Producing a 25-second vertical product presentation video
  • Generating reference images for the 小省导购员 character
  • Creating business setting backgrounds for a video
anbeime/skill83052026年10月18日 更新

Convert PDF, Word, and Excel documents into structured Markdown for search and knowledge bases. The skill tries three parsers in sequence when needed and returns metadata, a confidence score, and the parser used.

中文简介正在准备中。当前显示英语简介。

  • Prepare documents for retrieval-augmented generation
  • Structure documents for an internal knowledge base
  • Extract structured text from contracts
anbeime/skill83052026年10月18日 更新

Organize parsed documents into four color-coded cards covering facts, explanations, risks, and actions. Preserve source references and generation details so readers can review evidence, identify uncertainty, and consider next steps in research, financial, or legal analysis.

中文简介正在准备中。当前显示英语简介。

  • Separating facts from interpretations in financial reports
  • Organizing evidence and risks in legal documents
  • Turning research documents into evidence-linked analysis cards
anbeime/skill83052026年10月18日 更新

Record operations across multiple AI agents and connect events into a traceable history. Search records by tracking ID, time window, or responsible component to support audits and investigations, with local storage available when the vector database fails.

中文简介正在准备中。当前显示英语简介。

  • Trace task dispatch and execution across agents
  • Search audit records by time or responsible component
  • Keep recording events during vector database failures
anbeime/skill83052026年10月18日 更新

Screen documents and external URLs before they enter a processing workflow. Check blocked domains and document permissions, then produce a pass or reject decision, a risk report, and a tracking ID for later review.

中文简介正在准备中。当前显示英语简介。

  • Screening documents before adding them to a knowledge base
  • Checking external URLs against a domain blocklist
  • Reviewing document permissions before processing
anbeime/skill83052026年10月18日 更新

查看 anbeime 的全部技能

报告此技能的问题