thevibeworks/claude-code-docs/pptx
Claude Code and agent skill by thevibeworks/claude-code-docs
- community
Checking that the SKILL.md file is still in the repository.
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…
Install
npx vskill@latest install thevibeworks/claude-code-docs/pptxSKILL.md
The same SKILL.md was published earlier as thevibeworks/claude-code-docs/pptx.
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 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. 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_WIDEis 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-100on fills and images,opacity: 0.0-1.0on 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 twoadd*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: 270with a positive offset. - `letterSpacing` is silently ignored — the real option is
charSpacing. - Lists:
bullet: trueon each item, never a literal•(renders double bullets). SetbreakLine: trueon every array item except the last. Space bulleted paragraphs withparaSpaceAfter, notlineSpacing(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: 0whenever 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-native features the library doesn't expose (trendlines, error bars), compute the extra series yourself or post-process the generated OOXML — do not fall back to a rendered image. Only chart types PowerPoint has no native form for (Sankey, network, chord) go in as images. - Default charts render bare — no title, no data labels, dated palette. Set
showTitle+title,showValue: true+dataLabelPosition,chartColors: [...]from your palette, and quiet the frame (catAxisLabelColor/valAxisLabelColor,valGridLine: { color, size },catGridLine: { style: "none" },showLegend: falsefor a single series). - On a stacked bar or column chart, `dataLabelPosition` must be `ctr`, `inEnd`, or `inBase`.
outEndcorrupts the file. - A combo series using `secondaryValAxis`/`secondaryCatAxis` needs both `valAxes` and `catAxes` on the chart options, two entries each. Without them pptxgenjs writes axis ids it never declares, and PowerPoint discards that chart and reports the file as corrupt. Supplying only
valAxesis not enough. - After `writeFile()`, run `python scripts/office/validate.py deck.pptx`. It reports many of the chart and slide-XML faults PowerPoint refuses or repairs, the two above among them, and names the fix for each. Fix them in your generator, not by hand-editing the packed XML.
- Never reorder the children of `<p:presentation>`. pptxgenjs writes
<p:notesMasterIdLst>right after<p:sldIdLst>and points both masters at one theme part. PowerPoint reads that happily — move the element and the same deck becomes unopenable. - Icons: render
react-iconsto SVG (ReactDOMServer.renderToStaticMarkup), rasterize withsharpat ≥256px, and insert viaaddImage({ data: "image/png;base64," + buf.toString("base64") })— theimage/png;base64,prefix is required (react-icons,react,react-dom, andsharpare preinstalled —npm install react-icons react react-dom sharponly if a require fails). - `defineSlideMaster()` creates a slide *layout*, not a master — one
slideLayoutN.xmlper call, under a single master you cannot change. Call them layouts when talking to the user. - `pres.company` and a `defineSlideMaster()` `title` are written into the XML unescaped — an
&in either ("Harrow & Sons") leavesdocProps/app.xmlor the layout unparseable, andvalidate.pyfails. Write&there, and in the matchingmasterName.title,subject,author, section titles,objectName, notes and slide text are escaped for you.
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.
- Theme first:
const THEME = { name, headFontFace, bodyFontFace, colors: { dk1, lt1, dk2, lt2, accent1 … accent6, hlink, folHlink } }, colors in hex.pres.themetakes 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*FontFaceoptions"+mn-lt"(theme body font;"+mj-lt"is the heading font). - `const C = pres.SchemeColor` for every color —
C.text1/C.text2aredk1/dk2,C.background1/C.background2arelt1/lt2. These take hex only, read fromTHEME:valGridLine.color,catGridLine.color,shadow.color, and on a one-series bar chartinvertedColorsor more than onechartColors. 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. - Sections:
pres.addSection({ title })just before that section's first slide, thensectionTitleon everyaddSlide. 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. - 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 andcolor— chart, image and table placeholders need acolortoo, or prompt text and arrays of runs come out hard-coded000000. Footer text, logo andslideNumbergo on the layout, never on a slide. - Fill by name:
addSlide({ masterName, sectionTitle }), thenaddText("…", { 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 misspeltplaceholderormasterNamefails silently (a stray text box at 0,0; the blank layout). Onlytitle,bodyandchartplaceholders fill by name alone:addImage({ placeholder })takes the placeholder's x and y but not its size (a 1" × 1" picture) — passw/htoo.addTable({ placeholder })takes its x and y only — always passw; when it auto-pages it ignores the placeholder and runs off the slide, so also passx,yandautoPageSlideStartY(same asy, or continuation pages are laid out from the top margin), give the layout amarginwhose bottom clears the footer, and fill the continuation slides' titles throughslide.newAutoPagedSlides. - A layout is the frame, not the "layout" Design Ideas means. Cards, icons, stat callouts and images are still composed slide by slide on top of it, in scheme colors, each with an
objectName— every Design Idea applies, and most content slides sit on the title-only layout. - Write, then apply the theme:
await pres.writeFile({ fileName: "deck.pptx" }), thenawait applyTheme("deck.pptx", THEME). pptxgenjs cannot write theme colors: until this runs, scheme colors resolve to Office's stock palette. It throws, changing nothing, on a scheme color in a hex-only option — fix what it names and rebuild.
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; 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.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcontent/github/skills/skills/pptx/SKILL.md
Popularity
- Repository stars
- 156
- Repository forks
- 24
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thevibeworks/claude-code-docs/pptx)