Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 283% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 250% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 126% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 189% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 274% | 0% |
Create, edit, or analyze the contents of .pptx files when requested. A .pptx file is essentially a ZIP archive containing XML files and other resources. Different tools and workflows are available for different tasks.
Before starting any presentation task, read ALL relevant documentation files completely to understand the full workflow:
html2pptx.md and css.md in their entiretyooxml.md in its entiretycss.mdNEVER set any range limits when reading these files. Understanding the complete workflow, constraints, and best practices before starting is essential for producing high-quality presentations. Partial knowledge leads to errors, inconsistent styling, and visual defects that require rework.
To read just the text content of a presentation, convert the document to markdown:
bash# Convert document to markdown python3 -m markitdown path-to-file.pptx
Use raw XML access for: comments, speaker notes, slide layouts, animations, design elements, and complex formatting. To access these features, unpack a presentation and read its raw XML contents.
python3 ooxml/scripts/unpack.py <office_file> <output_dir>
ppt/presentation.xml - Main presentation metadata and slide referencesppt/slides/slide{N}.xml - Individual slide contents (slide1.xml, slide2.xml, etc.)ppt/notesSlides/notesSlide{N}.xml - Speaker notes for each slideppt/comments/modernComment_*.xml - Comments for specific slidesppt/slideLayouts/ - Layout templates for slidesppt/slideMasters/ - Master slide templatesppt/theme/ - Theme and styling informationppt/media/ - Images and other media filesTo emulate example designs, analyze the presentation's typography and colors first using the methods below:
ppt/theme/theme1.xml for colors (<a:clrScheme>) and fonts (<a:fontScheme>)ppt/slides/slide1.xml for actual font usage (<a:rPr>) and colors<a:solidFill>, <a:srgbClr>) and font references across all XML filesWhen creating a new PowerPoint presentation from scratch, use the html2pptx workflow to convert HTML slides to PowerPoint with accurate positioning.
html2pptx.md and css.md completely (see "CRITICAL: Read All Documentation First" section above)mkdir -p html2pptx && tar -xzf html2pptx.tgz -C html2pptxhtml2pptx/ directory with the library files and CLI binaries.css file for colors, typography, and spacing (see css.md "Design System Variables")html2pptx library to convert HTML slides to PowerPoint and save the presentationNODE_PATH="$(npm root -g)" node your-script.js 2>&1html2pptx function to process each HTML filepptx.writeFile()pptx.addSlide.javascript const pptxgen = require("pptxgenjs"); const { html2pptx } = require("./html2pptx");
// Create a new pptx presentation const pptx = new pptxgen(); pptx.layout = "LAYOUT_16x9"; // Must match HTML body dimensions
// Add an HTML-only slide await html2pptx("slide1.html", pptx);
// Add a HTML slide with chart placeholders const { slide: slide2, placeholders } = await html2pptx("slide2.html", pptx); slide.addChart(pptx.charts.LINE, chartData, placeholders0]);
// Save the presentation await pptx.writeFile("output.pptx");
soffice --headless --convert-to pdf output.pptxpdftoppm -jpeg -r 150 output.pdf slideslide-1.jpg, slide-2.jpg, etc.To edit slides in an existing PowerPoint presentation, work with the raw Office Open XML (OOXML) format. This involves unpacking the .pptx file, editing the XML content, and repacking it.
ooxml.md completely (see "CRITICAL: Read All Documentation First" section above)python3 ooxml/scripts/unpack.py <office_file> <output_dir>ppt/slides/slide{N}.xml and related files)python3 ooxml/scripts/validate.py <dir> --original <file>python3 ooxml/scripts/pack.py <input_directory> <office_file>To create a presentation that follows an existing template's design, duplicate and re-arrange template slides before replacing placeholder content.
python3 -m markitdown template.pptx > template-content.mdtemplate-content.md completely to understand the template contentspython3 scripts/thumbnail.py template.pptxtemplate-inventory.md containing:markdown # Template Inventory Analysis
Total Slides: count] IMPORTANT: Slides are 0-indexed (first slide = 0, last slide = count-1)
## Category Name]
... EVERY slide must be listed individually with its index ...]
outline.md with content AND template mapping that leverages available designs # Template slides to use (0-based indexing) # WARNING: Verify indices are within range! Template with 73 slides has indices 0-72 # Mapping: slide numbers from outline -> template slide indices template_mapping = [ 0, # Use slide 0 (Title/Cover) 34, # Use slide 34 (B1: Title and body) 34, # Use slide 34 again (duplicate for second B1) 50, # Use slide 50 (E1: Quote) 54, # Use slide 54 (F2: Closing + Text) ]
rearrange.py:scripts/rearrange.py script to create a new presentation with slides in the desired order:bash python3 scripts/rearrange.py template.pptx working.pptx 0,34,34,50,52
inventory.py script:bash python3 scripts/inventory.py working.pptx text-inventory.json
json { "slide-0": { "shape-0": { "placeholder_type": "TITLE", // or null for non-placeholders "left": 1.5, // position in inches "top": 2.0, "width": 7.5, "height": 1.2, "paragraphs": [ { "text": "Paragraph text", // Optional properties (only included when non-default): "bullet": true, // explicit bullet detected "level": 0, // only included when bullet is true "alignment": "CENTER", // CENTER, RIGHT (not LEFT) "space_before": 10.0, // space before paragraph in points "space_after": 6.0, // space after paragraph in points "line_spacing": 22.4, // line spacing in points "font_name": "Arial", // from first run "font_size": 14.0, // in points "bold": true, "italic": false, "underline": false, "color": "FF0000" // RGB color } ] } } }
default_font_size in points extracted from layout placeholders (when available)bullet: true, level is always included (even if 0)space_before, space_after, and line_spacing in points (only included when set)color for RGB (e.g., "FF0000"), theme_color for theme colors (e.g., "DARK_1")Based on the text inventory from the previous step:
alignment property when "bullet": true"bold": true"bullet": true, "level": 0 (level is required when bullet is true)"alignment": "CENTER" for centered text)"font_size": 14.0, "font_name": "Lora")"color": "FF0000" for RGB or "theme_color": "DARK_1" for theme colorsreplacement-text.jsonExample paragraphs field showing proper formatting:
json "paragraphs": [ { "text": "New presentation title text", "alignment": "CENTER", "bold": true }, { "text": "Section Header", "bold": true }, { "text": "First bullet point without bullet symbol", "bullet": true, "level": 0 }, { "text": "Red colored text", "color": "FF0000" }, { "text": "Theme colored text", "theme_color": "DARK_1" }, { "text": "Regular paragraph text without special formatting" } ]
Shapes not listed in the replacement JSON are automatically cleared:
json { "slide-0": { "shape-0": { "paragraphs": [...] // This shape gets new text } // shape-1 and shape-2 from inventory will be cleared automatically } }
Common formatting patterns for presentations:
"bullet": true, "level": 0replace.py scriptbash python3 scripts/replace.py working.pptx replacement-text.json output.pptx
The script will:
Example validation errors:
ERROR: Invalid shapes in replacement JSON:
ERROR: Replacement text made overflow worse in these shapes:
To create visual thumbnail grids of PowerPoint slides for quick analysis and reference:
bashpython3 scripts/thumbnail.py template.pptx [output_prefix]
Features:
thumbnails.jpg (or thumbnails-1.jpg, thumbnails-2.jpg, etc. for large decks)python3 scripts/thumbnail.py template.pptx my-gridworkspace/my-grid)--cols 4 (range: 3-6, affects slides per grid)Use cases:
Examples:
bash# Basic usage python3 scripts/thumbnail.py presentation.pptx # Combine options: custom name, columns python3 scripts/thumbnail.py template.pptx analysis --cols 4
To visually analyze PowerPoint slides, convert them to images using a two-step process:
bash soffice --headless --convert-to pdf template.pptx
bash 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 filesExample for specific range:
bashpdftoppm -jpeg -r 150 -f 2 -l 5 template.pdf slide # Converts only pages 2-5
IMPORTANT: When generating code for PPTX operations:
Required dependencies (should already be installed):
pip3 install "markitdown[pptx]" (for text extraction from presentations)npm install -g pptxgenjs (for creating presentations via html2pptx)npm install -g playwright (for HTML rendering in html2pptx)npm install -g react-icons react react-dom (for icons in SVG format)brew install --cask libreofficesudo apt-get install libreofficesudo apt-get install poppler-utils (for pdftoppm to convert PDF to images)pip3 install defusedxml (for secure XML parsing)Other measured skills in the registry, with their headline benchmark lift.