pptx

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

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/CYRUS-pinto/pi-bot --skill pptx-cyrus-pinto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pptx
Source: https://github.com/CYRUS-pinto/pi-bot/tree/main/.agents/skills/pptx
Command: npx skills add https://github.com/CYRUS-pinto/pi-bot --skill pptx-cyrus-pinto

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 libraries like pptxgenjs have silent pitfalls that produce files PowerPoint refuses to open. This Skill provides the workflows, scripts, and QA checks needed to reliably create, edit, read, and validate slide decks. ## Core Features & Use Cases - Deck Creation with pptxgenjs: Generate new presentations from scratch with guidance on layouts, colors, charts, icons, and typography, avoiding known corruption pitfalls. - Template-Based Editing: Unpack existing .pptx/.potx files, duplicate or add slides with full package bookkeeping, edit slide XML, and repack — with thumbnail grids for picking template layouts. - Validation and Visual QA: Run schema, relationship, content-type, and chart validation against the original template, then render slides to images via LibreOffice to catch overflow, overlap, and contrast defects. - Use Case: A user asks for a 10-slide pitch deck from an outline. The Skill generates it with pptxgenjs, validates the output with scripts/office/validate.py, converts it to images for visual inspection, and fixes any defects before delivery. ## Quick Start Create a five-slide presentation about our Q3 results using the pptx skill, then validate it and show me thumbnails of 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 presentation with pptxgenjs?

Write a Node script that requires pptxgenjs, set pres.layout before adding slides, and use hex colors without a leading #. After writeFile(), run the validate.py script to catch chart and slide XML defects PowerPoint would reject.

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

Unzip the .pptx into a directory, duplicate or add slides with add_slide.py, edit the slide XML files, then rezip from inside the directory. Run validate.py with --original pointing at the source deck to baseline template-inherited schema errors.

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, use thumbnail.py to generate a labeled grid image of every slide.

Why does PowerPoint say my generated pptx file is corrupt?

Common causes are hex colors with a # prefix, negative shadow offsets, outEnd data labels on stacked charts, or combo charts missing valAxes/catAxes declarations. The validate.py script detects these faults and names the fix for each.

Can python-pptx duplicate a slide or preserve formatting?

python-pptx cannot duplicate slides; its only entry point is add_slide(layout), and assigning text_frame.text collapses runs and loses formatting. Use the add_slide.py script for duplication and assign run.text to preserve styling.

Does this work with .potx templates and legacy .ppt files?

Yes, .potx templates unpack and repack identically to .pptx, keeping the .potx extension on output. Legacy .ppt files must first be converted with LibreOffice via the soffice.py wrapper script.