
PPTX
Read, create, or edit PowerPoint .pptx decks, build slides from an outline, extract...
Install
npx skills add HKUDS/DeepTutor --skill pptx -g -a claude-code -y- Repository
- HKUDS/DeepTutor53.6k
- Category
- Documents
- Updated
- 4d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 2,584 tokens
- Runs scripts
- No, instructions only
What it does
Read, create, or edit PowerPoint .pptx decks, build slides from an outline, extract slide text/speaker notes, edit shapes/tables/charts, replace images, or export to PDF/images. Use whenever a .pptx (or .ppt) file is an input or output, or the user mentions a deck, slides, or a presentation.
pptx
Work with PowerPoint .pptx files using python-pptx (preinstalled). A .pptx
is a ZIP of XML parts; python-pptx handles the structure so you rarely touch XML.
Drop to raw OOXML only for the few things the library can't express (see Advanced).
Use exec with complete Python source (language: python). Keep asset creation,
deck generation, reopening, and structural verification in one call when
possible; later calls can revise the same relative filename. Follow the turn's
User workspace instructions for locating inputs, output boundaries, and
presenting the finished deck.
Mental model
- A presentation has slides; each slide is built from a layout; layouts
live on slide masters. Layouts define placeholders (title, body,
picture, etc.) by
idxand type. - A slide holds shapes: placeholders, text boxes, pictures, tables, charts.
- Shapes with text expose
.text_frame→.paragraphs→.runs. A run is the unit that carries formatting (font, size, bold, color). - Units are EMU. Use the helpers:
from pptx.util import Inches, Pt, Emu.
Read / extract
from pptx import Presentation
prs = Presentation("deck.pptx")
print(len(prs.slides), prs.slide_width, prs.slide_height) # EMU dims
for i, slide in enumerate(prs.slides, 1):
print(f"--- slide {i} (layout: {slide.slide_layout.name}) ---")
for shape in slide.shapes:
if shape.has_text_frame:
print(shape.text_frame.text) # \n-joined paragraphs
elif shape.has_table:
for row in shape.table.rows:
print([c.text for c in row.cells])
if slide.has_notes_slide:
notes = slide.notes_slide.notes_text_frame.text
if notes:
print("NOTES:", notes)
Iterate slide.placeholders to see placeholder idx / placeholder_format.type.
For a fast text-only dump, just collect shape.text_frame.text across slides.


