PowerPoint Presentation Skill (PPTX)
Three Workflows
| Workflow |
When to Use |
| Read |
Extract text, generate thumbnails from an existing PPTX |
| Create |
Build a new presentation from scratch using pptxgenjs |
| Edit |
Unpack XML, modify content, repack existing PPTX |
Workflow 1: Reading an Existing PPTX
Extract Text (requires markitdown)
pip install markitdown
from markitdown import MarkItDown
converter = MarkItDown()
result = converter.convert("presentation.pptx")
print(result.text_content) # all slides as markdown
Generate Slide Thumbnails
# Requires LibreOffice
libreoffice --headless --convert-to png presentation.pptx
# Generates: Slide1.png, Slide2.png, ...
Workflow 2: Create a New Presentation with pptxgenjs
Setup
npm install pptxgenjs
Complete Example
const PptxGenJS = require('pptxgenjs')
const pptx = new PptxGenJS()
// Set presentation properties
pptx.layout = 'LAYOUT_WIDE' // 16:9
pptx.author = 'Claude'
// ─── SLIDE 1: Title Slide ───────────────────────────────────────────────────
const slide1 = pptx.addSlide()
slide1.background = { color: '1a1a2e' } // dark navy
slide1.addText('Quarterly Review', {
x: 1, y: 1.5, w: 8, h: 1.5,
fontSize: 48, bold: true, color: 'ffffff',
align: 'center', fontFace: 'Georgia',
})
slide1.addText('Q1 2026 Results', {
x: 1, y: 3.2, w: 8, h: 0.8,
fontSize: 24, color: 'e0e0e0',
align: 'center',
})
// ─── SLIDE 2: Content Slide ─────────────────────────────────────────────────
const slide2 = pptx.addSlide()
// Title
slide2.addText('Key Metrics', {
x: 0.5, y: 0.3, w: 9, h: 0.8,
fontSize: 32, bold: true, color: '1a1a2e',
})
// Divider line (using shape)
slide2.addShape(pptx.ShapeType.rect, {
x: 0.5, y: 1.15, w: 9, h: 0.05,
fill: { color: '4a90e2' }, line: { color: '4a90e2' },
})
// Bullet points
slide2.addText([
{ text: 'Revenue: ', options: { bold: true } },
{ text: '$2.4M (+18% YoY)' },
], { x: 0.7, y: 1.5, w: 8.3, h: 0.5, fontSize: 18, color: '333333' })
slide2.addText([
{ text: 'Users: ', options: { bold: true } },
{ text: '142,000 active (+32%)' },
], { x: 0.7, y: 2.1, w: 8.3, h: 0.5, fontSize: 18, color: '333333' })
// ─── SLIDE 3: Chart Slide ───────────────────────────────────────────────────
const slide3 = pptx.addSlide()
slide3.addText('Monthly Revenue', {
x: 0.5, y: 0.3, w: 9, h: 0.8,
fontSize: 28, bold: true, color: '1a1a2e',
})
slide3.addChart(pptx.ChartType.bar, [
{
name: 'Revenue ($K)',
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
values: [180, 210, 195, 240, 225, 280],
}
], {
x: 0.5, y: 1.2, w: 9, h: 4.5,
chartColors: ['4a90e2'],
showLegend: false,
valAxisLabelFontSize: 12,
catAxisLabelFontSize: 12,
})
// Save
await pptx.writeFile({ fileName: 'quarterly-review.pptx' })
console.log('Presentation saved.')
Workflow 3: Editing an Existing PPTX
PPTX files are ZIP archives containing XML. Edit in three steps:
Step 3a: Unpack
mkdir unpacked
unzip presentation.pptx -d unpacked/
# Slides are in: unpacked/ppt/slides/slide1.xml, slide2.xml, ...
Step 3b: Edit the XML
Slides are in unpacked/ppt/slides/slideN.xml. Text runs are in <a:t> elements:
<!-- Find and update text like this -->
<a:t>Old Title Text</a:t>
<!-- Change to: -->
<a:t>New Title Text</a:t>
Use smart quotes in professional documents: “ (") and ” (").
Step 3c: Repack
cd unpacked/
zip -r ../output.pptx . -x "*.DS_Store"
cd ..
Design Principles
Color Strategy
- One dominant color (60-70% visual weight) + 1-2 supporting tones + one sharp accent
- Avoid: all-white slides with thin gray text, purple gradients, blue-on-blue
Typography
- Headings: 32-44pt, bold, distinctive typeface (Georgia, Playfair Display)
- Body: 16-20pt, clean sans-serif (Calibri, Inter)
- Never: Wall-of-text slides, font sizes below 14pt
Layout Rules
- Every slide needs at least one visual element (image, chart, icon, or bold shape)
- Text-only slides are boring - add a supporting graphic
- Use consistent alignment and margins (0.5in minimum from edges)
- One key message per slide - if you have three points, consider three slides
What to Avoid
- Centered body text on every slide
- Generic blue/gray corporate palettes
- Bullet point lists with 8+ items
- Placeholder text left over (
Click to add text)
- Low-contrast text (dark gray on dark background)
Quality Verification
After creating slides:
- Convert to images:
libreoffice --headless --convert-to png output.pptx
- Visually inspect: check for text overflow, overlapping elements, low contrast
- Verify all slides have visual elements - no text-only slides
- Check font sizes are readable (≥14pt body, ≥24pt titles)
- Confirm color consistency across all slides
Dependencies
| Tool |
Purpose |
Install |
pptxgenjs |
Create new presentations |
npm install pptxgenjs |
markitdown |
Extract text from PPTX |
pip install markitdown |
| LibreOffice |
Convert to images / PDF |
System package |
unzip / zip |
Unpack/repack for XML editing |
System package |
1---2name: pptx-creator3description: Create, edit, and analyze PowerPoint presentations (.pptx files). Covers building slides from scratch with pptxgenjs, reading and extracting text with markitdown, editing existing presentations by unpacking and modifying XML, and converting slides to images for review. Use when the user wants to create a presentation, add slides, modify an existing PPTX file, or generate a slide deck programmatically.4license: Apache-2.05---67# PowerPoint Presentation Skill (PPTX)89## Three Workflows1011| Workflow | When to Use |12|---------|-------------|13| **Read** | Extract text, generate thumbnails from an existing PPTX |14| **Create** | Build a new presentation from scratch using pptxgenjs |15| **Edit** | Unpack XML, modify content, repack existing PPTX |1617---1819## Workflow 1: Reading an Existing PPTX2021### Extract Text (requires markitdown)22```bash23pip install markitdown24```25```python26from markitdown import MarkItDown2728converter = MarkItDown()29result = converter.convert("presentation.pptx")30print(result.text_content) # all slides as markdown31```3233### Generate Slide Thumbnails34```bash35# Requires LibreOffice36libreoffice --headless --convert-to png presentation.pptx37# Generates: Slide1.png, Slide2.png, ...38```3940---4142## Workflow 2: Create a New Presentation with pptxgenjs4344### Setup45```bash46npm install pptxgenjs47```4849### Complete Example50```javascript51const PptxGenJS = require('pptxgenjs')52const pptx = new PptxGenJS()5354// Set presentation properties55pptx.layout = 'LAYOUT_WIDE' // 16:956pptx.author = 'Claude'5758// ─── SLIDE 1: Title Slide ───────────────────────────────────────────────────59const slide1 = pptx.addSlide()60slide1.background = { color: '1a1a2e' } // dark navy6162slide1.addText('Quarterly Review', {63 x: 1, y: 1.5, w: 8, h: 1.5,64 fontSize: 48, bold: true, color: 'ffffff',65 align: 'center', fontFace: 'Georgia',66})6768slide1.addText('Q1 2026 Results', {69 x: 1, y: 3.2, w: 8, h: 0.8,70 fontSize: 24, color: 'e0e0e0',71 align: 'center',72})7374// ─── SLIDE 2: Content Slide ─────────────────────────────────────────────────75const slide2 = pptx.addSlide()7677// Title78slide2.addText('Key Metrics', {79 x: 0.5, y: 0.3, w: 9, h: 0.8,80 fontSize: 32, bold: true, color: '1a1a2e',81})8283// Divider line (using shape)84slide2.addShape(pptx.ShapeType.rect, {85 x: 0.5, y: 1.15, w: 9, h: 0.05,86 fill: { color: '4a90e2' }, line: { color: '4a90e2' },87})8889// Bullet points90slide2.addText([91 { text: 'Revenue: ', options: { bold: true } },92 { text: '$2.4M (+18% YoY)' },93], { x: 0.7, y: 1.5, w: 8.3, h: 0.5, fontSize: 18, color: '333333' })9495slide2.addText([96 { text: 'Users: ', options: { bold: true } },97 { text: '142,000 active (+32%)' },98], { x: 0.7, y: 2.1, w: 8.3, h: 0.5, fontSize: 18, color: '333333' })99100// ─── SLIDE 3: Chart Slide ───────────────────────────────────────────────────101const slide3 = pptx.addSlide()102slide3.addText('Monthly Revenue', {103 x: 0.5, y: 0.3, w: 9, h: 0.8,104 fontSize: 28, bold: true, color: '1a1a2e',105})106107slide3.addChart(pptx.ChartType.bar, [108 {109 name: 'Revenue ($K)',110 labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],111 values: [180, 210, 195, 240, 225, 280],112 }113], {114 x: 0.5, y: 1.2, w: 9, h: 4.5,115 chartColors: ['4a90e2'],116 showLegend: false,117 valAxisLabelFontSize: 12,118 catAxisLabelFontSize: 12,119})120121// Save122await pptx.writeFile({ fileName: 'quarterly-review.pptx' })123console.log('Presentation saved.')124```125126---127128## Workflow 3: Editing an Existing PPTX129130PPTX files are ZIP archives containing XML. Edit in three steps:131132### Step 3a: Unpack133```bash134mkdir unpacked135unzip presentation.pptx -d unpacked/136# Slides are in: unpacked/ppt/slides/slide1.xml, slide2.xml, ...137```138139### Step 3b: Edit the XML140Slides are in `unpacked/ppt/slides/slideN.xml`. Text runs are in `<a:t>` elements:141142```xml143<!-- Find and update text like this -->144<a:t>Old Title Text</a:t>145<!-- Change to: -->146<a:t>New Title Text</a:t>147```148149Use smart quotes in professional documents: `“` (") and `”` (").150151### Step 3c: Repack152```bash153cd unpacked/154zip -r ../output.pptx . -x "*.DS_Store"155cd ..156```157158---159160## Design Principles161162### Color Strategy163- **One dominant color** (60-70% visual weight) + 1-2 supporting tones + one sharp accent164- Avoid: all-white slides with thin gray text, purple gradients, blue-on-blue165166### Typography167- Headings: 32-44pt, bold, distinctive typeface (Georgia, Playfair Display)168- Body: 16-20pt, clean sans-serif (Calibri, Inter)169- Never: Wall-of-text slides, font sizes below 14pt170171### Layout Rules172- Every slide needs at least one visual element (image, chart, icon, or bold shape)173- Text-only slides are boring - add a supporting graphic174- Use consistent alignment and margins (0.5in minimum from edges)175- One key message per slide - if you have three points, consider three slides176177### What to Avoid178- Centered body text on every slide179- Generic blue/gray corporate palettes180- Bullet point lists with 8+ items181- Placeholder text left over (`Click to add text`)182- Low-contrast text (dark gray on dark background)183184---185186## Quality Verification187188After creating slides:1891. Convert to images: `libreoffice --headless --convert-to png output.pptx`1902. Visually inspect: check for text overflow, overlapping elements, low contrast1913. Verify all slides have visual elements - no text-only slides1924. Check font sizes are readable (≥14pt body, ≥24pt titles)1935. Confirm color consistency across all slides194195---196197## Dependencies198199| Tool | Purpose | Install |200|------|---------|---------|201| `pptxgenjs` | Create new presentations | `npm install pptxgenjs` |202| `markitdown` | Extract text from PPTX | `pip install markitdown` |203| LibreOffice | Convert to images / PDF | System package |204| `unzip` / `zip` | Unpack/repack for XML editing | System package |