pptx

Create, edit, and validate PowerPoint .pptx and .potx files programmatically.

Updated Aug 25, 2017
One-click install
npx skills add https://github.com/loki495/dotfiles --skill pptx-loki495
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pptx
Source: https://github.com/loki495/dotfiles/tree/main/ai/skills/synced/4f2cd280-c105-47f5-b498-fb931ff17906_01354434-3473-483d-87d9-0aa269eff282/pptx
Command: npx skills add https://github.com/loki495/dotfiles --skill pptx-loki495

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pptxgenjs, markitdown, Pillow, defusedxml, lxml, react-icons, react, react-dom, sharp, and includes scripts (resource) components.

What problem does it solve? Working with PowerPoint files programmatically is error-prone: pptxgenjs has silent footguns that corrupt files, template editing requires careful OOXML package bookkeeping, and defects like text overflow or broken chart XML only surface when the user opens the deck. This Skill provides the scripts, validation tooling, and design guidance to produce decks that actually open and look right. ## Core Features & Use Cases - Deck Creation with pptxgenjs: Generate new .pptx files with a documented list of API gotchas (hex colors, layouts, charts, shadows) that otherwise corrupt output. - Template-Based Editing: Unpack existing .pptx/.potx files, duplicate slides with full package registration via add_slide.py, edit slide XML, clean orphaned parts, and rezip. - Validation and Visual QA: Run schema, relationship, and content-type checks with validate.py, render slides to images via LibreOffice and pdftoppm, and inspect for overflow, overlap, and contrast defects. - Use Case: A user asks for a pitch deck from a corporate .potx template. The Skill thumbnails the template layouts, duplicates the right slides, fills content into the XML, validates against the original template, and renders every slide for visual inspection before delivery. ## Quick Start Create a ten-slide PowerPoint deck about our Q3 results using the pptx skill, then validate and visually check every slide.

Frequently Asked Questions about pptx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a PowerPoint file with pptxgenjs?▼

Write a Node script that requires pptxgenjs, set pres.layout before adding slides, and use one new pptxgen() instance per output file. Use 6-digit hex colors without '#', add isTextBox: true to every addText call, and run validate.py after writeFile().

How do I edit an existing .pptx or .potx template?▼

Unzip the file, duplicate slides with add_slide.py (which handles content types, relationships, and sldIdLst registration), edit ppt/slides/slideN.xml, run clean.py after deletions, then rezip from inside the directory and validate with --original.

Why does PowerPoint say my generated pptx file is corrupt?▼

Common causes are '#' or 8-digit hex colors, negative shadow offsets, outEnd data labels on stacked charts, and combo charts missing valAxes/catAxes entries. Run scripts/office/validate.py, which names the fix for each failure.

Can python-pptx duplicate a slide in a presentation?▼

No, python-pptx only offers add_slide(layout) and cannot clone slides. Use the add_slide.py script instead, which copies the slide file and performs all package bookkeeping including relationships and content-type registration.

How do I extract text from a .pptx file?▼

Run markitdown on the file, which outputs one text block per slide under <!-- Slide number: N --> markers. For a visual overview of layouts, use scripts/thumbnail.py to generate a labeled grid of every slide.

Does this approach support legacy .ppt files?▼

Legacy .ppt files must be converted first using the LibreOffice wrapper: python scripts/office/soffice.py --headless --convert-to pptx file.ppt. After conversion, all standard pptx workflows apply.