thevibeworks/claude-code-docs/pptx

Claude Code and agent skill by thevibeworks/claude-code-docs

Trust tier 2
  • community
LLM review pending
Source check pending

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/pptx

SKILL.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:

TaskApproach
Create a new deckWrite 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 templateunpack → edit ppt/slides/slideN.xml → zip
Read contentpython 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.

ScriptWhat it does
scripts/slide_text.py deck.pptxEvery 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.jsNode 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.pptxLibreOffice 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-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: false for a single series).
  • On a stacked bar or column chart, `dataLabelPosition` must be `ctr`, `inEnd`, or `inBase`. outEnd corrupts 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 valAxes is 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-icons to SVG (ReactDOMServer.renderToStaticMarkup), rasterize with sharp at ≥256px, and insert via addImage({ data: "image/png;base64," + buf.toString("base64") }) — the image/png;base64, prefix is required (react-icons, react, react-dom, and sharp are preinstalled — npm install react-icons react react-dom sharp only if a require fails).
  • `defineSlideMaster()` creates a slide *layout*, not a master — one slideLayoutN.xml per 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") leaves docProps/app.xml or the layout unparseable, and validate.py fails. Write &amp; there, and in the matching masterName. 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.

  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 blank layout). Only title, body and chart placeholders fill by name alone: addImage({ placeholder }) takes the placeholder's x and y but not its size (a 1" × 1" picture) — pass w/h too. addTable({ placeholder }) takes its x and y only — always pass w; when it auto-pages it ignores the placeholder and runs off the slide, so also pass x, y and autoPageSlideStartY (same as y, or continuation pages are laid out from the top margin), give the layout a margin whose bottom clears the footer, and fill the continuation slides' titles through slide.newAutoPagedSlides.
  6. 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.
  7. Write, then apply the theme: await pres.writeFile({ fileName: "deck.pptx" }), then await 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/thevibeworks/claude-code-docs/pptx/badge)](https://verified-skill.com/skills/thevibeworks/claude-code-docs/pptx)

Something wrong with this skill or its page? Tell us.