| name | PowerPoint Suite |
| description | Microsoft PowerPoint (.pptx) presentation creation, editing, and analysis. |
| when_to_use | When users need to work with PowerPoint presentations for: (1) Creating new presentations with professional formatting, (2) Reading and analyzing existing content, (3) Modifying existing presentations while preserving layouts, (4) Analyzing comments or speaker notes, or (5) Extracting typography and colors from templates |
| version | 0.0.3 |
PPTX creation, editing, and analysis
Overview
A user may ask you to create, edit, or analyze the contents of a .pptx file. A .pptx file is essentially a ZIP archive containing XML files and other resources that you can read or edit. You have different tools and workflows available for different tasks.
Reading and analyzing content
Text extraction
If you just need to read the text contents of a presentation, you should convert the document to markdown:
python -m markitdown path-to-file.pptx
Raw XML access
You need raw XML access for: comments, speaker notes, slide layouts, animations, design elements, and complex formatting. For any of these features, you'll need to unpack a presentation and read its raw XML contents.
Unpacking a file
python ooxml/scripts/unpack.py <office_file> <output_dir>
Note: The unpack.py script is located at skills/pptx/ooxml/scripts/unpack.py relative to the project root. If the script doesn't exist at this path, use find . -name "unpack.py" to locate it.
Key file structures
ppt/presentation.xml - Main presentation metadata and slide references
ppt/slides/slide{N}.xml - Individual slide contents (slide1.xml, slide2.xml, etc.)
ppt/notesSlides/notesSlide{N}.xml - Speaker notes for each slide
ppt/comments/modernComment_*.xml - Comments for specific slides
ppt/slideLayouts/ - Layout templates for slides
ppt/slideMasters/ - Master slide templates
ppt/theme/ - Theme and styling information
ppt/media/ - Images and other media files
Typography and color extraction
When given an example design to emulate: Always analyze the presentation's typography and colors first using the methods below:
- Read theme file: Check
ppt/theme/theme1.xml for colors (<a:clrScheme>) and fonts (<a:fontScheme>)
- Sample slide content: Examine
ppt/slides/slide1.xml for actual font usage (<a:rPr>) and colors
- Search for patterns: Use grep to find color (
<a:solidFill>, <a:srgbClr>) and font references across all XML files
Creating a new PowerPoint presentation without a template
When creating a new PowerPoint presentation from scratch, use PptxGenJS, a powerful JavaScript library that works across multiple platforms (Node.js, browser, React, Angular, etc.) to generate professional PowerPoint presentations.
Workflow
- MANDATORY - READ ENTIRE FILE: Read
pptxgenjs.md (~700 lines) completely from start to finish. NEVER set any range limits when reading this file. Read the full file content for detailed syntax, critical formatting rules, and best practices before proceeding with presentation creation.
- Create a new JavaScript/TypeScript file to build your presentation (You can assume all dependencies are installed, but if not, refer to the dependencies section below)
- Use the PptxGenJS API to create presentations, slides, and add content (text, shapes, images, tables, charts)
- Export the presentation as a .pptx file using writeFile() or other export methods
- MANDATORY - CHECK FOR ISSUES: After creating the presentation, run
python skills/pptx/scripts/inventory.py presentation.pptx inventory.json --issues-only to identify layout problems:
- Frame overflow: Text exceeds text box bounds (
overflow.frame.overflow_bottom)
- Slide overflow: Shapes extend beyond slide edges (
overflow.slide.overflow_right/overflow_bottom)
- Shape overlaps: Text boxes overlap each other (
overlap.overlapping_shapes - area in sq inches)
- Other warnings: Manual bullet symbols used instead of proper formatting (
warnings)
- Fix issues by: reducing font size, editing content, adjusting spacing, resizing containers (especially widening title containers), or repositioning shapes
- Re-generate and verify no issues remain
Editing an existing PowerPoint presentation
When edit slides in an existing PowerPoint presentation, you need to work with the raw Office Open XML (OOXML) format. This involves unpacking the .pptx file, editing the XML content, and repacking it.
Workflow
- MANDATORY - READ ENTIRE FILE: Read
ooxml.md (~500 lines) completely from start to finish. NEVER set any range limits when reading this file. Read the full file content for detailed guidance on OOXML structure and editing workflows before any presentation editing.
- Unpack the presentation:
python ooxml/scripts/unpack.py <office_file> <output_dir>
- Edit the XML files (primarily
ppt/slides/slide{N}.xml and related files)
- CRITICAL: Validate immediately after each edit and fix any validation errors before proceeding:
python ooxml/scripts/validate.py <dir> --original <file>
- Pack the final presentation:
python ooxml/scripts/pack.py <input_directory> <office_file>
Creating a new PowerPoint presentation using a template
When you need to create a presentation that follows an existing template's design, you'll need to duplicate and re-arrange template slides before then replacing placeholder context.
Workflow
-
Extract template text AND create visual thumbnail grid:
- Extract text:
python -m markitdown template.pptx > template-content.md
- Read
template-content.md: Read the entire file to understand the contents of the template presentation. NEVER set any range limits when reading this file.
- Create thumbnail grids:
python scripts/thumbnail.py template.pptx
- See Creating Thumbnail Grids section for more details
-
Analyze template and save inventory to a file:
- Visual Analysis: Review thumbnail grid(s) to understand slide layouts, design patterns, and visual structure
- Create and save a template inventory file at
template-inventory.md containing:
# Template Inventory Analysis
**Total Slides: [count]**
**IMPORTANT: Slides are 0-indexed (first slide = 0, last slide = count-1)**
## [Category Name]
- Slide 0: [Layout code if available] - Description/purpose
- Slide 1: [Layout code] - Description/purpose
- Slide 2: [Layout code] - Description/purpose
[... EVERY slide must be listed individually with its index ...]
- Using the thumbnail grid: Reference the visual thumbnails to identify:
- Layout patterns (title slides, content layouts, section dividers)
- Image placeholder locations and counts
- Design consistency across slide groups
- Visual hierarchy and structure
- This inventory file is REQUIRED for selecting appropriate templates in the next step
-
Create presentation outline based on template inventory:
- Review available templates from step 2.
- Choose an intro or title template for the first slide. This should be one of the first templates.
- Choose safe, text-based layouts for the other slides.
- CRITICAL: Match layout structure to actual content:
- Single-column layouts: Use for unified narrative or single topic
- Two-column layouts: Use ONLY when you have exactly 2 distinct items/concepts
- Three-column layouts: Use ONLY when you have exactly 3 distinct items/concepts
Creating Thumbnail Grids
To create visual thumbnail grids of PowerPoint slides for quick analysis and reference:
python scripts/thumbnail.py template.pptx [output_prefix]
Features:
- Creates:
thumbnails.jpg (or thumbnails-1.jpg, thumbnails-2.jpg, etc. for large decks)
- Default: 5 columns, max 30 slides per grid (5×6)
- Custom prefix:
python scripts/thumbnail.py template.pptx my-grid
- Note: The output prefix should include the path if you want output in a specific directory (e.g.,
workspace/my-grid)
- Adjust columns:
--cols 4 (range: 3-6, affects slides per grid)
- Grid limits: 3 cols = 12 slides/grid, 4 cols = 20, 5 cols = 30, 6 cols = 42
- Slides are zero-indexed (Slide 0, Slide 1, etc.)
Use cases:
- Template analysis: Quickly understand slide layouts and design patterns
- Content review: Visual overview of entire presentation
- Navigation reference: Find specific slides by their visual appearance
- Quality check: Verify all slides are properly formatted
Examples:
python scripts/thumbnail.py presentation.pptx
python scripts/thumbnail.py template.pptx analysis --cols 4
Converting Slides to Images
To visually analyze PowerPoint slides, convert them to images using a two-step process:
-
Convert PPTX to PDF:
soffice --headless --convert-to pdf template.pptx
-
Convert PDF pages to JPEG images:
pdftoppm -jpeg -r 150 template.pdf slide
This creates files like slide-1.jpg, slide-2.jpg, etc.
Options:
-r 150: Sets resolution to 150 DPI (adjust for quality/size balance)
-jpeg: Output JPEG format (use -png for PNG if preferred)
-f N: First page to convert (e.g., -f 2 starts from page 2)
-l N: Last page to convert (e.g., -l 5 stops at page 5)
slide: Prefix for output files
Example for specific range:
pdftoppm -jpeg -r 150 -f 2 -l 5 template.pdf slide
Code Style Guidelines
IMPORTANT: When generating code for PPTX operations:
- Write concise code
- Avoid verbose variable names and redundant operations
- Avoid unnecessary print statements
Dependencies
Required dependencies (install if not available):
- markitdown:
pip install "markitdown[pptx]" (for text extraction from presentations)
- pptxgenjs:
npm install -g pptxgenjs (for creating new presentations)
- react-icons:
npm install -g react-icons react react-dom (for icons)
- sharp:
npm install -g sharp (for SVG rasterization and image processing)
- LibreOffice:
sudo apt-get install libreoffice (for PDF conversion)
- Poppler:
sudo apt-get install poppler-utils (for pdftoppm to convert PDF to images)