Fantasia1999/skills-zh / translations/pptx
pptx
Verified只要 .pptx 文件以任何方式参与其中——作为输入、输出或两者兼有,就应使用此技能。这包括:创建幻灯片、项目介绍或演示文稿;读取、解析或从任何 .pptx 文件中提取文本(即使提取的内容将用于其他地方,如电子邮件或摘要);编辑、修改或更新现有演示文稿;合并或拆分幻灯片文件;处理模板、布局、演讲者备注或评论。每当用户提到“deck”、“slides”、“presentation”或引用 .pptx 文件名时,无论他们计划如何处理后续内容,都应触发此技能。如果需要打开、创建或接触 .pptx 文件,请使用此技能。
PPTX 技能
快速参考
| 任务 | 指南 |
|---|---|
| 读取/分析内容 | python -m markitdown presentation.pptx |
| 从模板编辑或创建 | 阅读 editing.md |
| 从头创建 | 阅读 pptxgenjs.md |
读取内容
# 文本提取
python -m markitdown presentation.pptx
# 视觉概览
python scripts/thumbnail.py presentation.pptx
# 原始 XML
python scripts/office/unpack.py presentation.pptx unpacked/
编辑工作流
阅读 editing.md 获取完整详情。
- 使用
thumbnail.py分析模板 - 解包 → 操作幻灯片 → 编辑内容 → 清理 → 打包
从头创建
阅读 pptxgenjs.md 获取完整详情。
当没有可用模板或参考演示文稿时使用。
设计思路
不要制作无聊的幻灯片。 白色背景上的普通项目符号列表不会给任何人留下深刻印象。为每张幻灯片考虑一下此列表中的想法。
开始之前
- 选择一个大胆、与内容相关的调色板:调色板应该感觉是为“这个”主题而设计的。如果将你的颜色换到另一个完全不同的演示文稿中仍然“有效”,那说明你的选择不够具体。
- 主导而非平等:一种颜色应该占主导地位(60-70% 的视觉权重),搭配 1-2 种辅助色调和一种鲜明的强调色。切勿给所有颜色同等的权重。
- 明/暗对比:标题和结论幻灯片使用深色背景,内容幻灯片使用浅色背景(“三明治”结构)。或者,为了营造高级感,全程使用深色背景。
- 坚持一种视觉主题:选择“一个”独特的元素并重复它——圆角图片框、彩色圆圈中的图标、粗的单边边框。将其贯穿每一张幻灯片。
调色板
选择与你的主题相匹配的颜色——不要默认使用通用的蓝色。使用这些调色板作为灵感:
| Theme | Primary | Secondary | Accent |
|---|---|---|---|
| Midnight Executive | 1E2761 (navy) | CADCFC (ice blue) | FFFFFF (white) |
| Forest & Moss | 2C5F2D (forest) | 97BC62 (moss) | F5F5F5 (cream) |
| Coral Energy | F96167 (coral) | F9E795 (gold) | 2F3C7E (navy) |
| Warm Terracotta | B85042 (terracotta) | E7E8D1 (sand) | A7BEAE (sage) |
| Ocean Gradient | 065A82 (deep blue) | 1C7293 (teal) | 21295C (midnight) |
| Charcoal Minimal | 36454F (charcoal) | F2F2F2 (off-white) | 212121 (black) |
| Teal Trust | 028090 (teal) | 00A896 (seafoam) | 02C39A (mint) |
| Berry & Cream | 6D2E46 (berry) | A26769 (dusty rose) | ECE2D0 (cream) |
| Sage Calm | 84B59F (sage) | 69A297 (eucalyptus) | 50808E (slate) |
| Cherry Bold | 990011 (cherry) | FCF6F5 (off-white) | 2F3C7E (navy) |
每张幻灯片
每张幻灯片都需要一个视觉元素——图片、图表、图标或形状。纯文本的幻灯片很容易被遗忘。
布局选项:
- 两栏布局(左侧文本,右侧插图)
- 图标 + 文本行(图标在彩色圆圈内,加粗标题,下方是描述)
- 2x2 或 2x3 网格(一侧是图片,另一侧是内容块网格)
- 半出血图片(占满左侧或右侧)并叠加内容
数据展示:
- 大型数据标注(60-72pt 的大号数字,下方有小标签)
- 对比栏(之前/之后,优点/缺点,并排选项)
- 时间线或流程图(编号步骤,箭头)
视觉润色:
- 章节标题旁边放置在彩色小圆圈内的图标
- 对关键统计数据或标语使用斜体强调文本
字体排印
选择一个有趣的字体搭配——不要默认使用 Arial。选择一个有个性的标题字体,并搭配一个简洁的正文字体。
| 标题字体 | 正文字体 |
|---|---|
| Georgia | Calibri |
| Arial Black | Arial |
| Calibri | Calibri Light |
| Cambria | Calibri |
| Trebuchet MS | Calibri |
| Impact | Arial |
| Palatino | Garamond |
| Consolas | Calibri |
| 元素 | 字号 |
|---|---|
| 幻灯片标题 | 36-44pt 加粗 |
| 章节标题 | 20-24pt 加粗 |
| 正文文本 | 14-16pt |
| 图注 | 10-12pt 柔和色 |
间距
- 最小 0.5 英寸边距
- 内容块之间 0.3-0.5 英寸间距
- 留出呼吸空间——不要填满每一寸
避免(常见错误)
- 不要重复使用相同的布局——在不同幻灯片中变换使用栏、卡片和标注
- 不要居中正文文本——段落和列表左对齐;仅居中标题
- 不要吝啬字号对比——标题需要 36pt+ 才能从 14-16pt 的正文中脱颖而出
- 不要默认使用蓝色——选择能反映特定主题的颜色
- 不要随意混合间距——选择 0.3 英寸或 0.5 英寸的间距并保持一致使用
- 不要只设计一张幻灯片而其余的保持平淡——要么贯彻到底,要么全程保持简单
- 不要创建纯文本幻灯片——添加图片、图标、图表或视觉元素;避免简单的标题 + 项目符号
- 不要忘记文本框内边距——当将线条或形状与文本边缘对齐时,在文本框上设置
margin: 0或偏移形状以考虑内边距 - 不要使用低对比度元素——图标“和”文本都需要与背景形成强烈对比;避免浅色背景上的浅色文本或深色背景上的深色文本
- 绝不要在标题下使用强调线——这是 AI 生成幻灯片的标志;应使用空白或背景色代替
质量保证 (QA) (必须)
假设存在问题。你的工作就是找到它们。
你的第一次渲染几乎从不正确。将 QA 视为一次寻虫(bug hunt),而不是一个确认步骤。如果初次检查没有发现任何问题,说明你没有足够仔细地看。
内容 QA
python -m markitdown output.pptx
检查是否有内容缺失、拼写错误、顺序错误。
使用模板时,检查是否残留占位符文本:
python -m markitdown output.pptx | grep -iE "xxxx|lorem|ipsum|this.*(page|slide).*layout"
如果 grep 返回结果,请在宣布成功前修复它们。
视觉 QA
⚠️ 使用子代理 (SUBAGENTS) ——即使只有 2-3 张幻灯片。你一直盯着代码,只会看到你期望的东西,而不是实际存在的东西。子代理有“新鲜的眼睛”。
将幻灯片转换为图片(参见转换为图片),然后使用此提示:
请目视检查这些幻灯片。假设存在问题——请找出它们。
检查项:
- 元素重叠(文本穿过形状、线条穿过文字、元素堆叠)
- 文本溢出或在边缘/框边界被截断
- 装饰线为单行文本设计,但标题换行成了两行
- 来源引用或页脚与上方内容冲突
- 元素间距过近(< 0.3 英寸)或卡片/区块几乎接触
- 间距不均(一个地方有大片空白,另一个地方则很拥挤)
- 距离幻灯片边缘的边距不足(< 0.5 英寸)
- 列或类似元素未保持一致对齐
- 低对比度文本(例如,米色背景上的浅灰色文本)
- 低对比度图标(例如,深色背景上没有对比色圆圈的深色图标)
- 文本框过窄导致过度换行
- 残留的占位符内容
对每张幻灯片,列出发现的问题或疑点,即使是微小的。
读取并分析这些图片:
1. /path/to/slide-01.jpg (预期:[简要描述])
2. /path/to/slide-02.jpg (预期:[简要描述])
报告所有发现的问题,包括微小问题。
验证循环
- 生成幻灯片 → 转换为图片 → 检查
- 列出发现的问题(如果未发现,则更批判性地再看一遍)
- 修复问题
- 重新验证受影响的幻灯片——一个修复常常会引发另一个问题
- 重复此过程,直到完整检查一遍后没有新问题出现
在完成至少一个“修复-验证”周期之前,不要宣布成功。
转换为图片
将演示文稿转换为单张幻灯片图片以进行目视检查:
python scripts/office/soffice.py --headless --convert-to pdf output.pptx
pdftoppm -jpeg -r 150 output.pdf slide
这将创建 slide-01.jpg、slide-02.jpg 等文件。
修复后要重新渲染特定幻灯片:
pdftoppm -jpeg -r 150 -f N -l N output.pdf slide-fixed
依赖项
pip install "markitdown[pptx]"- 文本提取pip install Pillow- 缩略图网格npm install -g pptxgenjs- 从头创建- LibreOffice (
soffice) - PDF 转换(通过scripts/office/soffice.py为沙盒环境自动配置) - Poppler (
pdftoppm) - PDF 转图片
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 |