
Universal Pptx Generator
If you've ever tried to programmatically generate PowerPoint files that actually match a template's style, you know the pain of hardcoded colors and layouts that break with every new design. This skill takes a different approach by parsing the PPTX XML directly to extract backgrounds, theme colors, fonts, and positioning from whatever template you throw at it. It handles five page types (cover, TOC, chapter, content, thanks) and distinguishes between solid fills, background images, and gradients by analyzing the underlying XML structure. Built on pptxgenjs with support for common chart types. The Python analysis scripts for detecting scheme colors and decorative shapes look genuinely useful if you're doing any serious template work.
- skills.sh installs
- 230
- GitHub stars
- 1
- last updated
- Aug 21, 2026
Install
$ npx -y skills add ajaxhe/universal-pptx-generator-skill --skill universal-pptx-generator --agent claude-codeInstalls into .claude/skills of the current project.
Files
通用 PPT 生成技能
概述
此技能可以根据任意用户指定的 PPT 模板,结合提供的图文素材(文档、图片等),自动生成一份风格统一的演示文稿。
⭐⭐⭐ 核心理念:每个模板都是独特的,必须针对性分析!
不同 PPT 模板使用的字体、对齐方式、字号、颜色、位置、背景样式都完全不同。绝不能将一个模板的配置直接应用到另一个模板!每次使用新模板时,都必须重新分析 XML 提取精确参数。
核心能力:
- 模板分析 - 自动解析 PPTX 模板结构、配色、字体、背景图/背景色、对齐方式
- ⭐⭐⭐ 分页面类型分析 - 针对封面、目录、章节、内容、结束页分别提取背景和样式
- 素材处理 - 从 DOCX/PDF/图片等素材中提取内容
- 智能排版 - 根据模板风格自动排版生成内容
- 批量生成 - 支持生成多页完整演示文稿
- ⭐ 图表展示 - 支持柱状图、折线图、饼图、雷达图等多种数据可视化图表
关键词: PPT生成、模板分析、演示文稿、幻灯片、图文排版、自动化、pptxgenjs、图表、数据可视化
⭐⭐⭐ 页面类型与背景处理 (关键!)
五种核心页面类型
不同类型的页面可能使用不同的背景处理方式:
| 页面类型 | 典型特征 | 背景处理方式 |
|---|---|---|
| 封面页 (Cover) | 主标题 + 副标题 + Logo | 背景图/渐变/斜切形状 |
| 目录页 (TOC) | 目录列表 + 装饰元素 | 纯色背景 + 装饰形状 |
| 章节页 (Chapter) | 大号章节编号 + 章节标题 | 纯色背景 + 装饰形状 |
| 内容页 (Content) | 标题 + 正文/图片/图表 | 纯色背景/背景图 |
| 结束页 (Thanks) | 感谢语 + 联系方式 | 纯色背景 + 装饰形状 |
⭐⭐⭐ 背景类型分析
PPT 背景有三种主要类型:
1. 纯色背景 (SolidFill)
<!-- XML 特征 -->
<p:bg>
<p:bgPr>
<a:solidFill>
<a:schemeClr val="tx2"/> <!-- 使用主题色 -->
</a:solidFill>
</p:bgPr>
</p:bg>
Sponsors
Details
- Repository
- github.com/ajaxhe/universal-pptx-generator-skill
- Categories
- Automation & Workflows, Office & Documents
- First seen
- Jun 3, 2026