pptx

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

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill pptx-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pptx
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/agents/.agents/skills/pptx
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill pptx-ravitejakarra24

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: .pptx files are ZIP archives of XML with strict schema, relationship, and content-type rules, and small mistakes produce decks PowerPoint refuses to open. This Skill provides the scripts and operational knowledge to create, edit, read, and validate presentations without corrupting them. ## Core Features & Use Cases - Deck creation with pptxgenjs: Generate new slide decks from scripts, with documented gotchas for layouts, colors, charts, shadows, and icons that otherwise corrupt files. - Template-based editing: Unpack existing .pptx/.potx files, duplicate or add slides with full package bookkeeping via add_slide.py, edit slide XML, clean orphaned parts with clean.py, and repack. - Validation and QA: Run validate.py to check schema, relationships, content types, and chart defects against an optional original baseline, plus thumbnail grids and PDF-to-image rendering for visual inspection. - Use Case: A user asks for a pitch deck from a corporate template. The Skill thumbnails the template to pick layouts, duplicates slides, fills content in the XML, validates against the original template, and renders slide images to catch text overflow before delivery. ## Quick Start Ask the assistant to create a five-slide presentation on your topic as a .pptx file, or to extract and summarize the text from an existing deck.

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 presentation with pptxgenjs?

Write a Node script that requires pptxgenjs, set pres.layout before adding slides, and use addSlide, addText, addImage, and addChart calls. Use hex colors without '#', one pptxgen instance per file, and run a schema validator on the output to catch chart defects PowerPoint rejects.

How do I edit an existing .pptx file or template programmatically?

Unzip the .pptx (it is a ZIP of XML), duplicate or add slides with a script that registers content types and relationships, edit ppt/slides/slideN.xml, then rezip from inside the directory. Validate the result against the original file to separate your errors from template-inherited ones.

How do I extract text from a PowerPoint file?

Run markitdown on the .pptx file to get one text block per slide under slide-number markers. For a visual overview of layouts, render a labeled thumbnail grid of every slide using a LibreOffice PDF conversion followed by pdftoppm.

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

Common causes are hex colors with '#' or alpha digits, negative shadow offsets, outEnd data labels on stacked charts, and combo charts missing valAxes/catAxes entries. A schema and relationship validator reports each defect with its fix, which should be corrected in the generator script.

Can python-pptx duplicate slides or preserve formatting?

python-pptx cannot duplicate slides (only add_slide from a layout), collapses formatting when assigning text_frame.text, and cannot read SVG or EMF template art. Duplicating slides requires copying the slide XML plus its relationships, content-type entries, and sldIdLst registration.

Does this approach support legacy .ppt files?

Legacy .ppt files must be converted to .pptx first using LibreOffice in headless mode. Template .potx files unpack and repack identically to .pptx, keeping the .potx extension on the output.