anthropics/skills · skills/pptx/SKILL.md
pptx
“Anthropic's PPTX skill: a field manual of real pptxgenjs and OOXML gotchas, with a long design lecture attached”
What it does
Creates, edits and reads PowerPoint files. It uses pptxgenjs for new decks, unzip/edit/zip with helper scripts for templates, and markitdown for reading. It adds a design guide and a required validate-and-render QA loop.
- When the agent uses it
- Any time a .pptx or .potx file is read, created, edited, split or merged, or the user mentions a deck, slides or a presentation.
- Who it is for
- Anyone whose agent makes or edits PowerPoint decks. First confirm scripts/office/ (validate.py, soffice.py) ships with your copy. Skip it if you never touch slides.
- What it costs
- 181 lines, about 5.6k tokens once the agent loads it, plus 5 files beside it.
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.
What it tells the agent to do
- Pick by task: pptxgenjs script to create, unzip → edit slideN.xml → zip to edit, markitdown to read
- For templates, thumbnail the layouts, then add, delete and reorder slides with add_slide.py and clean.py before editing content
- Style with a topic-specific palette, a visual on every slide, safe fonts, and no accent bars or stripes
- Run scripts/office/validate.py on the output, passing --original for template-derived decks
- Dump text with markitdown and grep for leftover placeholder text
- Convert to PDF and JPEGs, inspect every slide for overflow and overlap, fix, and re-render
Lines worth reading
Straight from the file, with why each one matters.
line 3regardless of what they plan to do with the content afterward
The trigger is deliberately greedy. Even pulling text out of a deck for an email counts.
line 34Hex colors: never `#`, never 8 digits.
The kind of hard-won footgun the model can't know on its own. Either mistake corrupts the file.
line 161these are a hallmark of AI-generated slides
An AI skill telling the AI not to look like an AI. Fair point, and oddly self-aware.
line 27bare `soffice` hangs in this sandbox
It says plainly which environment it was tuned for, and gives a wrapper instead of a mystery hang.
line 206you tend to see what you expect rather than what rendered
A sharp bit of reviewer psychology. It suggests a fresh subagent to check the rendered slides.
Watch out for
- Medium
On a .pptx, add_slide.py overwrites the input deck in place unless -o is passed. The original can be lost.
line 67pass `-o`, or it rewrites the input deck in place.
- Low
clean.py deletes any slide missing from <p:sldIdLst>, including one just written, if run at the wrong time.
line 66`clean.py` deletes any slide missing from `<p:sldIdLst>`, including one you just wrote
- Low
The render step deletes every slide-*.jpg in the current directory, not just its own output.
line 227rm -f slide-*.jpg
- Low
Falls back to npm install from the registry if a require fails, which fetches remote packages.
line 31Only if that require fails: `npm install pptxgenjs`.
The scorecard
- TriggerSays when to use it9/10
Names file types, verbs and request words like deck and slides. Maybe over-eager.
- FocusOne clear job8/10
One format, three modes. The design guide stretches it into taste territory.
- LeanLight to load6/10
~5.6k tokens. Palettes, layouts and typography could move to a reference file.
- ConcreteSteps you can follow9/10
Exact commands, flags, failure modes and a full validate-and-render QA loop.
- SafeSafe to run8/10
No exfiltration or hijacking. A few in-place overwrites and broad rm globs.
What it does well
- Each pptxgenjs gotcha names the exact option and its effect, like stacked-chart outEnd corrupting the file
- Explains why QA can lie about text fit with substituted fonts, and gives a safe-font list
- Requires validation plus visual review of every rendered slide before calling the deck done
How it could be better
Ship or link the scripts/office helpers
validate.py and soffice.py are required by the QA steps but aren't in the listed folder, so the loop may fail.
AddRequires `scripts/office/validate.py` and `scripts/office/soffice.py` (shared from <path or package>). If missing, stop and tell the user.
Move the design guide to a reference file
Palettes, layouts, typography and the avoid list take a large share of the load and only matter when styling.
AddBefore styling a new deck, read [design.md](design.md) for palettes, layouts, typography and things to avoid.
Render into a dedicated folder
Scoping the rm and the pdftoppm output avoids wiping unrelated slide-*.jpg files in the working directory.
Addmkdir -p <render-dir> && rm -f <render-dir>/slide-*.jpg pdftoppm -jpeg -r 150 output.pdf <render-dir>/slide ls -1 "$PWD"/<render-dir>/slide-*.jpg
In the skill’s folder
Listed, not read: the agent opens these only when SKILL.md sends it there.
LICENSE.txtscripts/__init__.pyscripts/add_slide.pyscripts/clean.pyscripts/thumbnail.py
Kin reviews against Anthropic’s Extend Claude with skills and agentskills.io’s the Agent Skills standard. It reads SKILL.md only, so a script beside it can still do things the file does not say.