Pptx: a .pptx or .potx file is involved in any way — as input, output, or both
Use this skill any time a .pptx or .potx 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 or .potx file (even if the extracted content will be used elsewhere, like in an em
SKILL.md
python3 -c "import sys,zipfile; zipfile.ZipFile(sys.argv[1]).extractall('unpacked')" deck.pptx python scripts/add_slide.py unpacked/ slide2.xml --after slide2.xml # duplicate a slide (or slideLayoutN.xml); prints the new slide's path
reorder / delete slides = edit <p:sldIdLst> in ppt/presentation.xml
python scripts/clean.py unpacked/ # after deletions: removes orphaned slides, media, rels
edit slide content in ppt/slides/slideN.xml
(cd unpacked && rm -f ../out.pptx && zip -XrDy ../out.pptx .) # zip from INSIDE the dir; rm first or deleted parts survive python scripts/office/validate.py out.pptx --original deck.pptx