Skip to content

Akxan/ppt-agent-skill

ppt-agent

Verified

专业 PPT 演示文稿全流程 AI 生成助手。模拟顶级 PPT 设计公司的完整工作流(需求调研 -> 资料搜集 -> 大纲策划 -> 策划稿 -> 设计稿),输出高质量 HTML 格式演示文稿。当用户提到制作 PPT、做演示文稿、做 slides、做幻灯片、做汇报材料、做培训课件、做路演 deck、做产品介绍页面时触发此技能。即使用户只说"帮我做个关于 X 的介绍"或"我要给老板汇报 Y",只要暗示需要结构化的多页演示内容,都应该触发。也适用于用户说"帮我把这篇文档做成 PPT"、"把这个主题做成演示"等需要将内容转化为演示格式的场景。

FileKindSize
SKILL.mdskill md20.3 KB
assets/architecture.pngbinary2.0 MB
assets/architecture.svgother17.7 KB
assets/hero-all.pngbinary1.3 MB
assets/hero-cultural-oriental.pngbinary250.3 KB
assets/hero-dark-professional.pngbinary585.1 KB
assets/hero-light-premium.pngbinary639.5 KB
assets/hero-natural-retro.pngbinary403.2 KB
assets/hero-vibrant.pngbinary279.1 KB
assets/logo.svgother1.7 KB
references/README.mdmarkdown2.9 KB
references/bento-grid.mdmarkdown6.2 KB
references/blocks/README.mdmarkdown2.1 KB
references/blocks/card-styles.mdmarkdown5.6 KB
references/blocks/comparison.mdmarkdown1.8 KB
references/blocks/diagram.mdmarkdown1.9 KB
references/blocks/image-hero.mdmarkdown1.9 KB
references/blocks/matrix-chart.mdmarkdown1.9 KB
references/blocks/people.mdmarkdown1.6 KB
references/blocks/quote.mdmarkdown1.6 KB
references/blocks/timeline.mdmarkdown1.7 KB
references/charts/advanced.mdmarkdown39.0 KB
references/charts/basic.mdmarkdown57.9 KB
references/charts/complex.mdmarkdown83.7 KB
references/charts/index.mdmarkdown4.9 KB
references/design-runtime/css-weapons.mdmarkdown10.9 KB
references/design-runtime/data-type-visual-mapping.mdmarkdown7.9 KB
references/layouts/README.mdmarkdown4.8 KB
references/layouts/asymmetric.mdmarkdown1.2 KB
references/layouts/hero-top.mdmarkdown2.0 KB
references/layouts/l-shape.mdmarkdown1.6 KB
references/layouts/mixed-grid.mdmarkdown2.3 KB
references/layouts/primary-secondary.mdmarkdown1.8 KB
references/layouts/single-focus.mdmarkdown1.5 KB
references/layouts/symmetric.mdmarkdown1.5 KB
references/layouts/t-shape.mdmarkdown1.4 KB
references/layouts/three-column.mdmarkdown1.5 KB
references/layouts/waterfall.mdmarkdown1.3 KB
references/method.mdmarkdown2.8 KB
references/page-templates/cover.mdmarkdown2.4 KB
references/page-templates/end.mdmarkdown2.3 KB
references/page-templates/section.mdmarkdown1.9 KB
references/page-templates/toc.mdmarkdown1.9 KB
references/pipeline-compat.mdmarkdown7.5 KB
references/principles/README.mdmarkdown2.1 KB
references/principles/cognitive-load.mdmarkdown2.2 KB
references/principles/color-psychology.mdmarkdown2.2 KB
references/principles/composition.mdmarkdown2.6 KB
references/principles/data-visualization.mdmarkdown2.1 KB
references/principles/failure-modes.mdmarkdown4.9 KB
references/principles/narrative-arc.mdmarkdown2.7 KB
references/principles/visual-hierarchy.mdmarkdown2.9 KB
references/prompts.mdmarkdown32.8 KB
references/strict-mode.mdmarkdown6.4 KB
references/styles/cultural.mdmarkdown8.3 KB
references/styles/dark.mdmarkdown21.3 KB
references/styles/index.mdmarkdown11.8 KB
references/styles/light.mdmarkdown21.9 KB
references/styles/natural.mdmarkdown11.1 KB
references/styles/vibrant.mdmarkdown10.6 KB
references/typography.mdmarkdown8.6 KB
scripts/README.mdmarkdown2.3 KB
scripts/build_hero.pyscript7.2 KB
scripts/contracts.pyscript12.8 KB
scripts/gallery.pyscript10.3 KB
scripts/html2png.pyscript2.9 KB
scripts/html2svg.pyscript24.2 KB
scripts/html_packager.pyscript10.1 KB
scripts/png2pptx.pyscript2.4 KB
scripts/pptx_motion.pyscript8.8 KB
scripts/resource_loader.pyscript7.0 KB
scripts/smoke_test.pyscript16.3 KB
scripts/svg2pptx.pyscript45.3 KB
scripts/validate.pyscript23.0 KB

references/strict-mode.md

View on GitHub
# 严格模式

默认流程靠 agent 自检。严格模式在关键步骤后加一道脚本校验,把"应该"变成"过不了就不能往下走"。适合大型 deck、批量生成、或成品要交给别人二次编辑的场景。不运行不影响出稿。

校验规则的代码真源是 `scripts/contracts.py`(枚举)和 `scripts/validate.py`(规则)。

---

## 1. 命令

| 步骤后 | 命令 |
|-------|------|
| Step 3 大纲 | `python3 scripts/validate.py outline OUTPUT_DIR/outline.json --pages 10-15` |
| Step 4 策划稿 | `python3 scripts/validate.py planning OUTPUT_DIR/planning.json` |
| Step 5a 风格 | `python3 scripts/validate.py style OUTPUT_DIR/style.json` |
| Step 5c 设计稿 | `python3 scripts/validate.py slides OUTPUT_DIR/slides --planning OUTPUT_DIR/planning.json` |
| 截图 | `python3 scripts/validate.py visual OUTPUT_DIR/png --planning OUTPUT_DIR/planning.json` |
| 全部产物 | `python3 scripts/validate.py all OUTPUT_DIR` |

退出码:0 通过,1 存在 ERROR。全局参数 `--strict` 放在子命令前,WARN 也算失败。

处理方式:ERROR 必须修到消失再进入下一步;WARN 逐条判断,确认是有意为之可以保留。

---

## 2. 规则

### outline.json

| 级别 | 规则 |
|------|------|
| ERROR | 缺 `cover.title`;`parts` 为空;某个 part 少于 2 页;页面缺 `title` |
| ERROR | 给了 `--pages` 且大纲展开后的页数范围与要求不相交 |
| WARN | 页面缺 `goal` 或 `content` 为空;只有 1 个 part;缺 `end_page` |

页数估算:内容页 + 封面 + 结束页(+ 目录),每个 part 可再加一张章节封面。

### planning.json

| 级别 | 规则 |
|------|------|
| ERROR | `page_number` 不是整数或重复;`page_type` 不在 cover/toc/section/content/end;缺 `title` |
| ERROR | 内容页缺 `layout_hint`;卡片数低于版式容量(single-focus 1、symmetric/asymmetric 2、其余 3) |
| ERROR | 卡片 >= 3 张时:所有卡片同一种 `card_type`,或没有数据卡片 |
| ERROR | `card_type` / `chart_type` / `card_style` / `role` / `density_label` 取值不合法;空卡片 |
| ERROR | 用了 `role` 但 anchor 卡片不是恰好 1 张;卡片数超过 `density_label` 的上限 |
| WARN | 内容页缺 `goal`;`layout_hint` 不是已知版式;首页不是 cover 或末页不是 end |
| WARN | 含数据的内容页不足 60%;连续 3 个内容页用同一版式 |

"数据卡片"指 `card_type` 为 data / data_highlight,或带 `chart_type`,或带 `data_points` 的卡片。

### style.json

| 级别 | 规则 |
|------|------|
| ERROR | 缺 `background` / `card` / `text` / `accent`;`accent.primary`、`accent.secondary` 不足 2 色;推不出 12 个标准 CSS 变量 |
| WARN | 缺 `typography` |

加 `--preset` 时按预置风格库的要求检查全部字段(维护风格库时用)。

### slides/*.html

| 级别 | 规则 |
|------|------|
| ERROR | 未声明 1280x720 画布;含 `<script>`、CSS 动画、`<canvas>` / `<video>` / `<iframe>` |
| WARN | 没用 CSS 变量或没用标准变量名;引用外部样式表或远程图片 |
| WARN | 用了转 PPTX 后会丢失的 CSS(text-shadow、渐变文字、backdrop-filter 等,见 `pipeline-compat.md` C 类) |
| WARN | 有小于 9px 的文字;页面含数字但没开 `tabular-nums` |
| WARN | 给了 `--planning`:HTML 里标出的卡片数少于策划稿;正文字号低于 `density_label` 的下限 |
| INFO | 会自动转成图层的写法(`pipeline-compat.md` B 类) |

### png/*.png

| 级别 | 规则 |
|------|------|
| ERROR | 文件小于 10KB;尺寸不是 16:9;画面几乎没有内容 |
| WARN | 宽度小于 960;内容页的内容量偏少 |

内容量按相邻像素的明暗跳变比例计算,与配色深浅无关;封面、章节封面、结束页允许稀疏。

---

## 3. 策划稿的可选字段

基础字段见 `prompts.md` Prompt #3。以下字段不写也合法,写了就按枚举校验,并影响资源路由和导出:

| 字段 | 位置 | 取值 | 作用 |
|------|------|------|------|
| `chart_type` | 卡片 | 18 种图表 id,见 `charts/index.md` | 路由到图表模板 |
| `card_id` | 卡片 | 建议 `s03-revenue` 这类短 id | 写进 HTML 的 `data-card-id`,用于卡片成组与动画顺序 |
| `role` | 卡片 | anchor / support / context | 标出本页唯一的视觉锚点 |
| `card_style` | 卡片 | accent / elevated / filled / outline / glass / transparent | 路由到 `blocks/card-styles.md` |
| `density_label` | 页面 | low / mid_low / medium / high / dashboard | 约束卡片数与正文字号 |

页面密度对应的约束:

| density_label | 卡片上限 | 正文字号下限 | 典型页面 |
|---------------|---------|-------------|---------|
| low | 2 | 24px | 金句、单一结论 |
| mid_low | 3 | 20px | 一个论点 + 两条支撑 |
| medium | 4 | 18px | 常规内容页 |
| high | 6 | 16px | 多维对比 |
| dashboard | 8 | 14px | 指标总览 |

现场演讲偏 low 到 medium,自阅文档可以到 high。避免连续 3 页 high / dashboard。

---

## 4. 图审清单

脚本只能拦硬伤,版面是否成立要看图。截图后(`html2png.py`)按下面的分级逐页过一遍,P0 和 P1 清零再交付。

**P0 必须修**

1. 内容超出画布被裁切
2. 靠整体缩放(`transform: scale`)硬塞内容
3. 大面积空白(内容页空白超过四成)
4. 核心文字不可读(对比度过低或字号小于 10px)
5. 策划稿里的关键卡片缺失
6. 元素严重重叠或错位
7. 渲染破损(样式未生效、布局塌陷)
8. 图片加载失败或被拉伸变形

**P1 应该修**

1. 文字被截断
2. 间距明显不均
3. 装饰遮挡文字
4. 没有视觉焦点,所有卡片同等权重
5. 颜色硬编码,与全局风格脱节
6. 数据数字不突出
7. 行高过紧(小于 1.4)
8. 与相邻页同构,看不出是独立设计的一页

**P2 可以修**

1. 圆角不一致
2. 没有体现风格的招牌手法(`decoration_dna.signature_move`)
3. 字体回落到系统默认
4. 层次扁平,卡片没有前后关系
5. 字号梯度过小(相邻层级差不足 4px)
6. 看起来像网页而不是幻灯片

修复顺序:内容 -> 结构 -> 颜色 -> 装饰。同一类问题连续两轮修不掉,说明是策划稿的问题(卡片太多、版式选错),回到 Step 4 改策划稿,不要继续在 HTML 上打补丁。

> 图审分级整理自 [sunbigfly/ppt-agent-skills](https://github.com/sunbigfly/ppt-agent-skills) 的 page-review playbook。
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall