# PPTX

Use this skill any time a .pptx file is involved in any way - as input, output, or both.

- Repository: https://github.com/mateaix/mateclaw (1176 stars)
- Category: Documents
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add mateaix/mateclaw --skill pptx -g -a claude-code -y`
Codex: `npx skills add mateaix/mateclaw --skill pptx -g -a codex -y`
Cursor: `npx skills add mateaix/mateclaw --skill pptx -g -a cursor -y`
Gemini CLI: `npx skills add mateaix/mateclaw --skill pptx -g -a gemini-cli -y`

## Description

Use this skill any time a .pptx file is involved in any way - as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file; editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck\", \"slides\", \"presentation\", or references a .pptx filename.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

> **Important:** All `scripts/` paths are relative to this skill directory.
> Use `run_skill_script` tool to execute scripts, or run with: `cd {this_skill_dir} && python scripts/...`

# PPTX Skill

## Prerequisites

- **markitdown[pptx]**: text extraction from presentations
- **Pillow**: thumbnail grid generation
- **pptxgenjs** (`npm install -g pptxgenjs`): creating presentations from scratch
- **LibreOffice** (`soffice`): presentation-to-PDF conversion
- **pdftoppm** (poppler-utils): PDF-to-image conversion for thumbnail/visual workflows
- If `pdftoppm` is unavailable, a Python fallback path may use `pdf2image`.

## Quick Reference

| Task | Guide |
|------|-------|
| Read/analyze content | `python -m markitdown presentation.pptx` |
| Edit or create from template | Unpack → manipulate → pack workflow |
| Create from scratch | Use pptxgenjs (npm) |

---

## Reading Content

```bash
# Text extraction
python -m markitdown presentation.pptx

# Visual overview (thumbnail grid)
python scripts/thumbnail.py presentation.pptx

# Raw XML access
python scripts/office/unpack.py presentation.pptx unpacked/
```

---

## Editing Workflow

1. Analyze template with `thumbnail.py`
2. Unpack: `python scripts/office/unpack.py presentation.pptx unpacked/`
3. Add/remove slides: `python scripts/add_slide.py unpacked/ --source <slide_num>`
4. Edit XML content in `unpacked/ppt/slides/`
5. Clean orphans: `python scripts/clean.py unpacked/`
6. Pack: `python scripts/office/pack.py unpacked/ output.pptx --original presentation.pptx`

### Adding Slides

```bash
# Duplicate an existing slide
python scripts/add_slide.py unpacked/ --source 2

# Add from layout template
python scripts/add_slide.py unpacked/ --layout 1
```

### Cleaning Up

```bash
# Remove orphaned slides, unreferenced media, update content types
python scripts/clean.py unpacked/
```

### Creating Thumbnails

```bash
# Create thumbnail grid of all slides
python scripts/thumbnail.py presentation.pptx

The rest: https://github.com/mateaix/mateclaw/blob/HEAD/mateclaw-server/src/main/resources/skills/pptx/SKILL.md
