pptx 是什么?
Anthropic 的 pptx Skill 用于读取、创建和编辑 PowerPoint 演示文稿及模板。新建时用 pptxgenjs 生成可继续编辑的主题、版式与占位符;修改现有文件则解包编辑幻灯片XML,并分别检查内容、文件结构与真实渲染。
中文说明由本站依据来源整理;英文原文保留在页面下方。
适合用在
- 新建汇报或演示文稿,按现有模板替换内容,或提取幻灯片文字、表格、图表数据和备注。
这些情况不适合
- 把所有图表都渲染成截图,导致用户无法继续编辑PowerPoint原生图表。
- 手工复制单个 slideN.xml 就认为已经正确增加幻灯片;包内注册、关系与内容类型也需要维护。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
pptx,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 pptx
请在 Codex 的当前工作环境中安装并检查 pptx 这个 Skill。
项目身份:anthropics/skills / pptx
来源:https://github.com/anthropics/skills/blob/e4bb5d960d87126ff3b3a8af1a104b7db67560ba/skills/pptx/SKILL.md
已定位的源文件:skills/pptx/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 pptx
请在 Claude Code 的当前工作环境中安装并检查 pptx 这个 Skill。
项目身份:anthropics/skills / pptx
来源:https://github.com/anthropics/skills/blob/e4bb5d960d87126ff3b3a8af1a104b7db67560ba/skills/pptx/SKILL.md
已定位的源文件:skills/pptx/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 pptx
请在 Cursor Agent 的当前工作环境中安装并检查 pptx 这个 Skill。
项目身份:anthropics/skills / pptx
来源:https://github.com/anthropics/skills/blob/e4bb5d960d87126ff3b3a8af1a104b7db67560ba/skills/pptx/SKILL.md
已定位的源文件:skills/pptx/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 pptx
请在 当前 Agent 的当前工作环境中安装并检查 pptx 这个 Skill。
项目身份:anthropics/skills / pptx
来源:https://github.com/anthropics/skills/blob/e4bb5d960d87126ff3b3a8af1a104b7db67560ba/skills/pptx/SKILL.md
已定位的源文件:skills/pptx/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 提供正文、数据、受众、演示时长与模板文件(如有)。新建需实际可用的 pptxgenjs;读取、编辑与验证需保留附带Python脚本,视觉检查另需LibreOffice与Poppler。来源所说的预装环境不能直接当成本机事实。
会得到什么
- 可编辑的PPTX或POTX,以及真实内容检查、结构检查和逐页视觉检查记录。
实际使用顺序
- 先分清读取、新建或修改模板。读取可用
scripts/slide_text.py;使用模板时另用scripts/thumbnail.py生成带独立前缀的缩略图,确认真实布局。 - 新建先设置画布大小和主题,定义版式、占位符和章节,再填内容。图表尽量使用PowerPoint原生图表;不要混用16:9默认尺寸与其他宽屏坐标。
- 编辑模板先完成增加、删除和排序,再修改内容。新增页使用附带
scripts/add_slide.py,必要时以-o写新文件;使用XML变换应保留命名空间和关系。 - 写出后用
slide_text.py查缺字、顺序和占位残留,再用scripts/office/validate.py检查结构;模板稿附--original区分原有问题。 - 将最新PPTX转成PDF并逐页渲染查看,处理溢出、重叠、页脚碰撞和对比度;修改后重新渲染相关页,不能看旧图片宣布问题已修。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
使用 anthropics/skills 的 pptx,为我提供的月度数据制作4页汇报:本月结论、趋势、原因分析、下月行动。受众是项目负责人,现场讲解约6分钟。使用原生可编辑图表,所有数字来自我给的数据,缺数据就列出,不编造。先设置主题和版式,再生成 monthly-review.pptx;完成后分别进行文字、文件结构和逐页渲染检查,报告实际结果。预期交付4页可编辑的汇报及检查记录;图表数据、文字和备注可继续修改。本站未运行本教学示例。
使用条件与边界
- LibreOffice可能替换缺失字体,预览字宽与接收方PowerPoint不完全一致;非可靠预览字体需留额外空间并明确限制。
- 结构校验覆盖部分损坏问题,来源明确说通过校验不保证PowerPoint不会修复文件;还要看实际输出。
- 复制的幻灯片可能继续引用原图表或SmartArt,修改一个副本的关联对象可能影响另一个,不能把复制页等同深度复制所有资源。
常见问题
为什么要做三种检查?
提取文字能发现内容缺失,结构验证能发现包关系和图表XML问题,渲染能看到裁切与重叠;三者发现的问题不同。
为什么套模板时还要提供原文件给验证器?
来源要求使用 --original 建立模板基线,避免把模板已有XSD问题当作新引入的问题;其他结构错误仍需实际判断。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-17T10:48:37.416Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
skills/pptx/SKILL.md · 抓取时间 2026-11-17T10:48:37.416Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Use 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.
查看源文件章节 / Source sections
- 原文:PPTX creation, editing, and analysis
- 原文:Scripts
- 原文:Creating with pptxgenjs — gotchas
- 原文:Structured decks
- 原文:Editing existing decks and templates
- 原文:Deck content and flow
- 原文:Design Ideas
- 原文:Before Starting
- 原文:Color Palettes
- 原文:For Each Slide
- 原文:Typography
- 原文:Spacing
- 原文:Avoid (Common Mistakes)
- 原文:QA (Required)
- 原文:Content QA (required)
- 原文:File QA (required)
- 原文:Visual QA (required)
- 原文:Converting to Images
- 原文:Dependencies
原文:PPTX creation, editing, and analysis
A `.pptx` is a ZIP archive of XML files. Choose your approach by task: | Task | Approach | |---|---| | **Create** a new deck | Write a `pptxgenjs` script — see gotchas below — and build it as a [structured deck](#structured-decks) unless the user asks for a quick throwaway | | **Edit** an existing deck, or build from a template | unpack → edit `ppt/slides/slideN.xml` → zip | | **Read** content | `python scripts/slide_text.py deck.pptx` (one block per slide under `<!-- Slide number: N -->` markers); visual grid: `python scripts/thumbnail.py deck.pptx` |
原文:Scripts
Paths are relative to this skill's directory. Everything else is plain Python, `node`, or shell. | Script | What it does | |---|---| | `scripts/slide_text.py deck.pptx` | Every slide's title, text, tables, chart data (scatter and bubble charts: series names only), picture alt text and speaker notes, as markdown. Reads `.potx` too | | `scripts/thumbnail.py deck.pptx [prefix]` | Labeled grid of every slide, for picking template layouts. `.pptx` only. Pass `prefix` — it defaults to `thumbnails`, which overwrites the grids of any other deck done in the same directory | | `scripts/add_slide.py unpacked/ slide2.xml [--after slideN.xml]` | Duplicate a slide (or a `slideLayoutN.xml`) with all the package bookkeeping. Also takes a `.pptx` directly with `-o out.pptx` | | `scripts/clean.py unpacked/` | Delete slides, media, and rels no longer referenced. Run **after** `<p:sldIdLst>` is final | | `scripts/apply_theme.js` | Node module: `const { applyTheme } = require("<this skill's directory>/scripts/apply_theme.js")`. `await applyTheme("deck.pptx", THEME)` after `pres.writeFile()` writes `THEME`'s colors and name (escaped for XML) into the deck's theme, for [structured decks](#structured-decks). Also a CLI: `node scripts/apply_theme.js deck.pptx theme.json` | | `scripts/office/validate.py deck.pptx [--original src.pptx]` | Schema, relationship, content-type, chart and slide checks; each failure names its fix. Pass `--original` for any template-derived deck — it baselines the schema checks against the template, so the template's own XSD errors don't read as yours | | `scripts/office/soffice.py --headless --convert-to pdf deck.pptx` | LibreOffice wrapper — bare `soffice` hangs in this sandbox |
原文:Creating with pptxgenjs — gotchas
`pptxgenjs` is preinstalled — do not run `npm install` first; write the script and `require('pptxgenjs')` directly. Only if that require fails: `npm install pptxgenjs`. The model knows the API; these are the footguns: - **Set `pres.layout` before adding slides.** The default canvas is `LAYOUT_16x9` = **10" × 5.625"**, not 13.3" wide. Coordinates past the edge are written, not clamped — the shape just isn't on the slide. (`LAYOUT_WIDE` is 13.3" × 7.5".) - **Hex colors: never `#`, never 8 digits.** `color: "FF0000"`. Both `"#FF0000"` and alpha baked into the hex (`"00000020"`) **corrupt the file**. For translucency: `transparency: 0-100` on fills and images, `opacity: 0.0-1.0` on shadows — each is silently ignored on the other. - **pptxgenjs mutates option objects in place** (converts values to EMU on first use). Never share one `shadow`/options object across two `add*` calls — build a fresh object each time. - **Shadow `offset` must be ≥ 0** — a negative offset corrupts the file. To cast a shadow upward, use `angle: 270` with a positive offset. - **`letterSpacing` is silently ignored** — the real option is `charSpacing`. - **Lists:** `bullet: true` on each item, never a literal `•` (renders double bullets). Set `breakLine: true` on every array item except the last. Space bulleted paragraphs with `paraSpaceAfter`, not `lineSpacing` (huge gaps). - **One `new pptxgen()` per output file** — never reuse an instance. - **`rectRadius` only works on `ROUNDED_RECTANGLE`**, not `RECTANGLE`. - **Gradient fills aren't supported** — use a gradient image as the background instead. - **Every `addText` call without a `placeholder` needs `isTextBox: true`** — without it the shape lacks `txBox="1"`, so screen readers announce the text as a "graphic" instead of a text box. No visual change. - **Text boxes have built-in internal padding** — set `margin: 0` whenever text must align with a shape, line, or icon at the same x. - **Speaker notes go in `slide.addNotes("...")`** (plain text, once per slide), never in a text box on the slide. - **Keep charts native.** Use `addChart()` for everything PowerPoint can chart (pass an array of `{type, data, options}` for combos). For PowerPoint-
本段为节选,完整内容见源文件。
原文:Structured decks
A deck built on a theme, layouts, placeholders and sections can be restyled in one place and edited in PowerPoint without fighting it. Build every new deck this way unless the user asks for a quick throwaway. 1. **Theme first:** `const THEME = { name, headFontFace, bodyFontFace, colors: { dk1, lt1, dk2, lt2, accent1 … accent6, hlink, folHlink } }`, colors in hex. `pres.theme` takes the two fonts and nothing else. Name no font after that — titles get the heading font, other text the body font — except on chart text, which is hard-coded Arial: give its `*FontFace` options `"+mn-lt"` (theme body font; `"+mj-lt"` is the heading font). 2. **`const C = pres.SchemeColor` for every color** — `C.text1`/`C.text2` are `dk1`/`dk2`, `C.background1`/`C.background2` are `lt1`/`lt2`. These take hex only, read from `THEME`: `valGridLine.color`, `catGridLine.color`, `shadow.color`, and on a one-series bar chart `invertedColors` or more than one `chartColors`. A scheme color there is written as `<a:srgbClr val="bg2"/>` without complaint, and being hex, these will not follow a later change of theme. 3. **Sections:** `pres.addSection({ title })` just before that section's first slide, then `sectionTitle` on every `addSlide`. A slide without one — or, when sections are all declared up front, a table's auto-paged continuation slides — lands in a stray "Default-N" section. 4. **One layout per slide frame** (`defineSlideMaster()`): title, section divider, title only, chart + commentary, table; dark and light variants if the design alternates. Text regions are named placeholders carrying position, size, weight and `color` — chart, image and table placeholders need a `color` too, or prompt text and arrays of runs come out hard-coded `000000`. Footer text, logo and `slideNumber` go on the layout, never on a slide. 5. **Fill by name:** `addSlide({ masterName, sectionTitle })`, then `addText("…", { placeholder: "title" })` with no position, size or color — the placeholder's own options win, and anything it doesn't set (italic, `align`, `fontFace`) still applies; style one run with `[{ text, options }]`. A misspelt `placeholder` or `masterName` fails silently (a stray text box at 0,0; the bl
本段为节选,完整内容见源文件。
原文:Editing existing decks and templates
Pick layouts first: `python scripts/thumbnail.py template.pptx template-thumbs` writes a labeled grid of every slide and prints the file(s) it created — `template-thumbs.jpg`, split into `template-thumbs-N.jpg` past 12 slides. **Always pass that second argument, named after the deck.** It defaults to `thumbnails`, so two decks thumbnailed in one directory silently overwrite each other's grids — the first deck's are simply gone (template analysis only — visual QA needs the full-resolution renders from [Converting to Images](#converting-to-images); it only accepts `.pptx`, so copy a `.potx` to a `.pptx` name first). Use it with `slide_text.py` to map each content section onto a template slide, and vary the layouts — don't put every section on the same title-and-bullets slide. ```bash python3 -c "import sys,zipfile; zipfile.ZipFile(sys.argv[1]).extractall('unpacked')" deck.pptx python scripts/add_slide.py unpacked/ slide2.xml --after slide2.xml # duplicate a slide (or slideLayoutN.xml); prints the new slide's path # reorder / delete slides = edit <p:sldIdLst> in ppt/presentation.xml python scripts/clean.py unpacked/ # after deletions: removes orphaned slides, media, rels # edit slide content in ppt/slides/slideN.xml (cd unpacked && rm -f ../out.pptx && zip -XrDy ../out.pptx .) # zip from INSIDE the dir; rm first or deleted parts survive python scripts/office/validate.py out.pptx --original deck.pptx ```
本段为节选,完整内容见源文件。
原文:Deck content and flow
- **One message per slide.** A deck goes theme by theme, message by message. - **A common structure is the pyramid:** the main message up front, an executive summary that previews the sections, the sections themselves, then a conclusion, usually with next steps that act on the findings. - **Match the structure to the size of the deck.** A short deck might not need an introduction and a conclusion; a long deck might need dividers between topics. - **Build toward what the deck is for:** a decision, consensus, a celebration, resolving a disagreement, or opening a discussion. - **Build for how it will be used.** A live deck gets narration and possibly discussion; a pre-read has to carry the whole narrative itself. An executive audience in a live meeting needs few words and highly visual slides. Detailed, word-heavy slides are sometimes right for subject-matter experts or for a deck read offline. Analytical reports lean on charts and tables. - **Size a live deck to the talk:** about 1.5 to 2 minutes per slide, with time left for questions if there will be any.
文件 SHA256:598c981d93f2173b251f86a4bc94e9fb4e4f5ddaa314ba2dd4eca24b7a07808e
仓库许可证记录:未提供;skill-declaration-captured-not-interpreted,查看来源。
Use 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…
这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。
历史收录数据
| Skill标识 | pptx |
|---|---|
| 来源仓库 | anthropics/skills |
| 榜单快照 | 2026-07-28 |
| 榜单口径 | Skills.sh累计安装量 |
| 快照名次 | 127 |
| 快照累计安装量 | 187942 |
历史资料说明
- 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
- 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。
此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。
