PowerPoint
Table of contents
1. How it works with an AI agent
User: "Build a 12-slide product launch deck for the Q4 review,
corporate blue, English"
|
v
AI Agent (CoDev Code / OpenCode / Claude Code / Codex / Cursor / ...)
| 1. Sees trigger signals (PowerPoint, PPT, .pptx, presentation,
| slide, deck...) -> loads SKILL.md
| 2. Routes the task: no input file -> CREATE from scratch
| (existing file -> READ, or EDIT via the XML workflow)
| 3. Picks a color palette, font pairing and style recipe from
| the skill's design system; classifies every slide as one of
| 5 page types (Cover, TOC, Section Divider, Content, Summary)
| 4. Writes one JS module per slide (slides/slide-01.js ...)
| against the PptxGenJS API and a fixed theme contract
| 5. Compiles: node compile.js -> output/presentation.pptx
| 6. QA: python -m markitdown output.pptx -> re-reads its own
| deck, greps for placeholder leftovers, fixes and re-compiles
| 7. Delivers the file + extraction report
v
Finished .pptx + QA reportThe key point: steps 2–6 are orchestrated by the LLM following SKILL.md. The user is involved only at the start (describe the request) and the end (acceptance).
The skill routes every task down one of three paths:
| Route | When | How the agent works |
|---|---|---|
| READ | extract or analyze deck content | python -m markitdown presentation.pptx — text extraction, never modifies the source |
| CREATE | new deck from scratch | plans an outline over the 5 page types, generates one PptxGenJS module per slide, compiles with Node.js |
| EDIT | modify an existing deck / fill a template | unpacks the .pptx with Python's zipfile, edits the slide XML surgically (reorder, duplicate, retext), repacks — no PowerPoint needed |
Two rules the skill enforces on itself are worth knowing as a user:
- Every slide is one of 5 page types (Cover, Table of Contents, Section Divider, Content, Summary) with layout variety enforced — no monotonous title-plus-bullets decks.
- Template edits never round-trip through a library: existing decks are edited as raw OOXML, so the template's design, masters and media survive untouched.
2. Prerequisites
Set these up first — Install skills walks through the install on Windows, macOS and Ubuntu step by step; its Install the skills into an agent section covers installing the skill into each agent (CoDev Code, OpenCode, Claude Code, Codex, Cursor) by hand.
The machine running the agent needs:
- Python 3.10–3.14 (required) with
markitdown[pptx]— the READ path, the QA step, and the EDIT path: template analysis runs markitdown, and the XML edits use itsdefusedxmldependency (installed automatically with the markitdown wheels). - Node.js ≥ 18 + the PptxGenJS module (the CREATE path). The offline install ships PptxGenJS as a prebuilt module tree; no npm or internet access is needed.
- On macOS: the markitdown stack runs on macOS 13+ only (its native onnxruntime dependency ships no older wheels), Intel Macs are limited to Python 3.10–3.13, and Python 3.14 on Apple Silicon needs macOS 14+. The installer picks the right Python per chip — 3.14 on Apple Silicon, 3.13 on Intel — so this only matters when you bring your own Python.
3. How to use it: talk to the agent
The skill self-activates when your prompt contains its signals: PowerPoint, PPT, .pptx, presentation, slide, deck, slides…
Golden rule — provide these 4 groups of information:
- What: create new / edit existing / fill a template / extract content (the agent can infer, but explicit is better)
- Which files: input and output files — a plain name plus "in this folder" (
launch.pptx), or a full path (C:\temp\deck.pptx,~/decks/launch.pptx) — and the template file if one exists - Content: topic, audience, tone, slide count, the actual material (or where to research it)
- Presentation: color preferences, language of the deck, any branding constraints (logo slides, fonts)
4. Prompt recipes per task type
4.1. Create a deck from scratch (CREATE)
Create q4-launch.pptx in this folder: a 12-slide product launch deck for
the Q4 business review.
- Audience: leadership team; tone: confident, data-driven
- Cover, table of contents, 3 sections (Market, Product, Roadmap) with
section dividers, and a summary slide
- Brand palette built around #ee0033, English, 16:9
- Vary the layouts - use two-column and stat-callout slides, not just bulletsTip: the skill classifies every slide as one of its 5 page types and picks a palette/style recipe up front — steering those choices ("brand palette around #ee0033", "soft rounded style") costs one line and saves a redesign round.
4.2. Edit an existing deck or fill a template (EDIT)
# Fill a corporate template:
Use corp-template.pptx in this folder as the template and build the FY2026
kickoff deck from kickoff-outline.md. Keep the template's design untouched;
map each outline section to a matching template layout, vary the layouts,
and delete the unused example slides.
# Targeted edit:
In q4-launch.pptx in this folder, retitle slide 3 to "Market Signals", swap
slides 5 and 6, and delete the appendix slides after the summary.
Change nothing else.Important tip: reference slides by their content or title as well as their number ("slide 3, the market overview") — decks drift, and it lets the agent verify it is touching the right slide before editing the XML.
4.3. Read or summarize a deck (READ)
Extract the full text of competitor-analysis.pptx in this folder and summarize
the argument per section. Flag any slide whose claims carry no numbers.Extraction is text-only (via markitdown) — layout, images and charts do not survive the round trip, which is fine for content review and summarization.
5. Acceptance — make the agent prove it
SKILL.md mandates a QA pass before delivery. You are entitled to (and should) ask for evidence:
"Run the QA extraction and show me the results"
A passing delivery includes:
- A markitdown re-extraction of the produced deck — the agent reads its own
output (
python -m markitdown output.pptx) and shows the text landed as planned. - A placeholder sweep — the extraction is grepped for leftovers like
xxxx,lorem,placeholder; zero hits expected. - For edits: confirmation that untouched slides survive byte-identical in content — ask for a before/after extraction diff of the slides you did not change.
Finally, open the file in PowerPoint or LibreOffice for a visual check — overlapping text boxes or an off-palette color are visible in seconds, and the agent can regenerate any single slide (each one is its own JS module).
6. Troubleshooting
| Symptom | Cause & fix |
|---|---|
Cannot find module 'pptxgenjs' | The PptxGenJS module tree is missing — Install skills, Step 7 installs it (on Ubuntu/macOS as ~/.node_modules, on Windows via the user NODE_PATH variable). Open a new terminal on Windows so the variable is picked up |
node: command not found | Node.js missing — Install skills, Step 7. The READ and EDIT paths work without it |
No module named markitdown | The wheels step was skipped — Install skills, Step 6. Slides still compile without it, but reading, editing (markitdown's defusedxml dependency) and the skill's required QA pass all need it |
| The skill doesn't activate | Prompt lacks signals. Say "PowerPoint/.pptx/deck" explicitly, or invoke by name: /pptx-generator … (Claude Code), $pptx-generator (Codex), type / and pick the skill (Cursor), "use the pptx-generator skill to…" (CoDev/OpenCode) |
| Deck opens with wrong fonts | The viewing machine lacks the font — the skill defaults to Arial, preinstalled on Windows; on Linux ask for a font that exists there or install the fonts |
| Repack fails on a mounted volume (Docker/network share) | Python's zipfile seeks while writing — the skill writes to a local temp path first and copies over; if a manual run fails, do the same |
| Colors look off / theme keys error | The theme contract uses exactly primary, secondary, accent, light, bg (6-char hex, no #) — ask the agent to re-check its slide modules against the contract |
7. Skill limitations
- Handles
.pptx(OOXML) only; legacy binary.pptis not supported — convert to.pptxin PowerPoint or LibreOffice first. - No password-protected/encrypted files.
- Reading is text extraction only — speaker notes, embedded charts' data and layout geometry are not analyzed.
- Icon rendering (react-icons + sharp) is optional and not part of the offline bundle — decks fall back to shapes and typography without it.
- Generated files embed no fonts: the deck renders with the viewing machine's fonts.
- macOS floors: reading/QA (markitdown) needs macOS 13+, Intel Macs top out at Python 3.13, and Python 3.14 on Apple Silicon needs macOS 14+.
8. Appendix: the design system the agent follows
So you can review the agent's plan — the skill pins these conventions:
| Convention | Value |
|---|---|
| Canvas | 16:9, 10" × 5.625" (LAYOUT_16x9) |
| Page types | Cover, Table of Contents, Section Divider, Content, Summary — every slide is exactly one |
| Theme contract | primary (titles), secondary (body), accent (highlights), light (light accent), bg (background) — 6-char hex without # |
| Fonts | Arial, or an approved alternative |
| Style recipes | Sharp, Soft, Rounded, or Pill — one per deck |
| Page badge | Every slide except the cover carries a page-number badge at x 9.3", y 5.1" (current number only, e.g. 03, never 3/12) |
| Output layout | One JS module per slide in slides/, images in slides/imgs/, compiled deck in slides/output/ |
Each slide module exports a synchronous createSlide(pres, theme) and is
independently runnable for preview — which is why the agent can regenerate a
single slide without touching the rest of the deck.