Edit and restructure PowerPoint presentations (.pptx) with an iterative render-and-inspect loop. Use when you must preserve existing media (images, GIFs, embedded videos), update slide text/layout, reorder slides, or export slide previews (PDF/PNGs) for visual review.
Resources
3Install
npx skillscat add idate96/codex-skills/powerpoint-presentation-editing Install via the SkillsCat registry.
SKILL.md
PowerPoint Presentation Editing
Workflow (Edit -> Render -> Inspect)
- Create a backup and work in versioned copies (never overwrite the only deck).
- Baseline render to PNGs for fast visual review:
- Run
bash scripts/render_pptx.sh INPUT.pptx OUT_DIR [DPI]. - Inspect the relevant
OUT_DIR/slide-XX.pngfiles withfunctions.view_image.
- Run
- Inspect deck contents programmatically (optional):
python3 scripts/extract_slide_text.py INPUT.pptxfor a per-slide text dump.python3 scripts/inspect_slide.py INPUT.pptx --slide Nfor shape bounds + text.
- Make one small change at a time (one slide, one layout fix, etc.).
- After every change:
- Verify media preservation:
bash scripts/diff_pptx_media.sh BEFORE.pptx AFTER.pptx.- If the diff is non-empty, STOP: you likely dropped/modified embedded assets.
- Re-render and visually re-check only the changed slide(s).
- Verify media preservation:
Scripts
Render PPTX -> PDF -> per-slide PNGs
bash scripts/render_pptx.sh INPUT.pptx OUT_DIR
bash scripts/render_pptx.sh INPUT.pptx OUT_DIR 220 # higher DPI for small textOutputs:
OUT_DIR/<deck-name>.pdfOUT_DIR/slide-01.png,OUT_DIR/slide-02.png, ...
Diff embedded assets between two PPTX files
bash scripts/diff_pptx_media.sh OLD.pptx NEW.pptxCompares zipped package entries under:
ppt/media/ppt/embeddings/ppt/oleObjects/
Quick inspection utilities
python3 scripts/extract_slide_text.py INPUT.pptx
python3 scripts/inspect_slide.py INPUT.pptx --slide 7Notes
- PDF/PNG renders cannot play videos/animations; they show a poster frame/placeholder.
- python-pptx cannot reorder slides via public API. For a pragmatic internal workaround, see
references/reorder_slides.md.