$npx -y skills add appautomaton/document-SKILLs --skill pptxPresentation 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
| 1 | # PPTX creation, editing, and analysis |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | 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. |
| 6 | |
| 7 | ## Prerequisites |
| 8 | |
| 9 | Python dependencies are resolved automatically by `uv run` — scripts declare them in PEP 723 headers. The workflows below also rely on: |
| 10 | |
| 11 | - **Node.js packages** — if `node_modules/` is missing, run `npm install` in this skill directory once. This installs `pptxgenjs` and `playwright`, which drives Chromium/Chrome for HTML rendering (on macOS it uses system Chrome; elsewhere run `npx playwright install chromium` once if no browser is present). It also installs `sharp`, `react`, `react-dom`, and `react-icons` — html2pptx.js does not use these itself; they are provided for scripts you write during the html2pptx workflow (icon and gradient rasterization, see [html2pptx.md](html2pptx.md)) |
| 12 | - **LibreOffice** (`brew install --cask libreoffice`) and **poppler** (`brew install poppler`) — converting presentations to PDF/images for thumbnails and visual validation (`soffice`, `pdftoppm`) |
| 13 | |
| 14 | ## Reading and analyzing content |
| 15 | |
| 16 | ### Text extraction |
| 17 | If you just need to read the text contents of a presentation, you should convert the document to markdown: |
| 18 | |
| 19 | ```bash |
| 20 | # Convert document to markdown |
| 21 | uv run --with 'markitdown[pptx]' python -m markitdown path-to-file.pptx |
| 22 | ``` |
| 23 | |
| 24 | ### Raw XML access |
| 25 | 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. |
| 26 | |
| 27 | #### Unpacking a file |
| 28 | `uv run ooxml/scripts/unpack.py <office_file> <output_dir>` |
| 29 | |
| 30 | **Note**: Run this from the pptx skill directory, where the script is at `ooxml/scripts/unpack.py`. If it isn't found there, use `find . -name "unpack.py"` to locate it. |
| 31 | |
| 32 | #### Key file structures |
| 33 | * `ppt/presentation.xml` - Main presentation metadata and slide references |
| 34 | * `ppt/slides/slide{N}.xml` - Individual slide contents (slide1.xml, slide2.xml, etc.) |
| 35 | * `ppt/notesSlides/notesSlide{N}.xml` - Speaker notes for each slide |
| 36 | * `ppt/comments/modernComment_*.xml` - Comments for specific slides |
| 37 | * `ppt/slideLayouts/` - Layout templates for slides |
| 38 | * `ppt/slideMasters/` - Master slide templates |
| 39 | * `ppt/theme/` - Theme and styling information |
| 40 | * `ppt/media/` - Images and other media files |
| 41 | |
| 42 | #### Typography and color extraction |
| 43 | **When given an example design to emulate**: Always analyze the presentation's typography and colors first using the methods below: |
| 44 | 1. **Read theme file**: Check `ppt/theme/theme1.xml` for colors (`<a:clrScheme>`) and fonts (`<a:fontScheme>`) |
| 45 | 2. **Sample slide content**: Examine `ppt/slides/slide1.xml` for actual font usage (`<a:rPr>`) and colors |
| 46 | 3. **Search for patterns**: Use grep to find color (`<a:solidFill>`, `<a:srgbClr>`) and font references across all XML files |
| 47 | |
| 48 | ## Creating a new PowerPoint presentation **without a template** |
| 49 | |
| 50 | When creating a new PowerPoint presentation from scratch, use the **html2pptx** workflow to convert HTML slides to PowerPoint with accurate positioning. |
| 51 | |
| 52 | ### Design Principles |
| 53 | |
| 54 | **CRITICAL**: Before creating any presentation, analyze the content and choose appropriate design elements: |
| 55 | 1. **Consider the subject matter**: What is this presentation about? What tone, industry, or mood does it suggest? |
| 56 | 2. **Check for branding**: If the user mentions a company/organization, consider their brand colors and identity |
| 57 | 3. **Match palette to content**: Select colors that reflect the subject |
| 58 | 4. **State your approach**: Explain your design choices before writing code |
| 59 | |
| 60 | **Requirements**: |
| 61 | - ✅ State your content-informed design approach BEFORE writing code |
| 62 | - ✅ Use web-safe fonts only: Arial, Helvetica, Times New Roman, Georgia, Courier New, Verdana, Tahoma, Trebuchet MS, Impact |
| 63 | - ✅ Create clear visual hierarchy through size, weight, and color |
| 64 | - ✅ Ensure readability: strong contrast, appropriately sized text, clean alignment |
| 65 | - ✅ Be consistent: repeat patterns, spacing, and visual language across slides |
| 66 | |
| 67 | #### Color Palette Selection |
| 68 | |
| 69 | **Choosing colors creatively**: |
| 70 | - **Think beyond defaults**: What colors genuinely match this specific topic? Avoid autopilot choices. |
| 71 | - **Consider multiple angles**: Topic, industry, mood, energy level, target audience, brand identity (if mentioned) |
| 72 | - **Be adventurous**: Try unexpected combinations - a healthcare presentation doesn't have to be green, finance doesn't have to be navy |
| 73 | - **Build your palette**: Pick 3-5 colors that work together (dominant colors + supporting t |