
Powerpoint Skill
FreeEffortlessly create and edit PowerPoint presentations with Python.
Free · Opens the source repo
What Powerpoint Skill does
The Powerpoint Skill enables users to create, read, and edit PowerPoint (.pptx) presentations using the python-pptx library. This skill includes five helper scripts that facilitate various tasks such as generating a new deck from a JSON specification, reading existing presentations to extract content, editing slides in place, producing on-brand decks from templates, and rendering slides as images. All operations can be performed offline without requiring Microsoft PowerPoint, making it a versatile tool for developers and designers alike.
The primary use cases for this skill include building slide decks for reports, pitch presentations, or educational purposes. Users can easily extract text, notes, tables, and images from existing .pptx files, allowing for efficient content reuse and updates. The editing capabilities are robust, enabling users to replace text, update chart data, reorder slides, and customize backgrounds and footers. Additionally, the ability to create presentations from templates ensures that users can maintain brand consistency across their materials.
This skill is particularly useful for those who prefer working in a programmatic environment or need to automate the generation of presentation content. By utilizing JSON specifications, users can define slide layouts, titles, bullet points, images, and more with precision. The scripts provide clear command-line interfaces, making it easy to integrate into existing workflows or to run as part of automated processes.
However, users should note that this skill is not suitable for working with legacy .ppt files directly; such files must be converted to .pptx format first. Additionally, while the rendering capabilities are available, they require optional dependencies like LibreOffice for full functionality. Overall, this skill is a powerful addition for anyone looking to streamline their presentation workflows using Python.
When to use it
Use this skill when you need to generate, inspect, or modify PowerPoint presentations programmatically, especially in bulk or for automation.
When not to use it
Avoid this skill if you need to work with legacy .ppt files directly, as they require conversion to .pptx first.
What you can build with it
Generate a New Presentation
Create a new PowerPoint presentation from a JSON specification, defining layout, content, and design elements.
Update Existing Slides
Modify an existing .pptx file by replacing text, updating charts, or changing slide order.
Extract Content from Presentations
Read a .pptx file to extract text, notes, images, and other content for reuse or analysis.
How to install Powerpoint Skill
View source1. Install with the skills CLI
npx skills add nousresearch/hermes-agent/powerpoint --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by nousresearchPowerpoint Skill
Create, inspect, and edit PowerPoint (.pptx) presentations using the python-pptx library. Five helper scripts cover deck creation from a JSON spec, structured read-back, in-place edits, template-driven brand decks, and slide rendering — all offline, no PowerPoint installation required.
When to Use
- The user asks to build a slide deck, report presentation, or pitch deck.
- You need to extract text, notes, tables, chart data, or images from a .pptx someone shared.
- You need to update an existing deck: replace text, refresh or patch chart data, swap a logo, duplicate/remove/reorder slides, set backgrounds, footers, hyperlinks, or speaker notes.
- You must produce an on-brand deck from a company .pptx template.
- Do NOT use this for .ppt (legacy binary) files — convert them first with
soffice --convert-to pptx old.pptif LibreOffice is available.
Prerequisites
- Python 3.10+ with
python-pptxinstalled (pip install python-pptx). - Optional: LibreOffice (
soffice) plus poppler (pdftoppmorpdftocairo) for rendering slides to PNGs and for PDF export.pptx_render.pydetects both withshutil.whichand degrades gracefully (reports{"rendered": false, "missing": [...]}, exit 0) when absent — all create/read/edit operations work without them. - Check availability via
terminal:python3 -c "import pptx; print(pptx.__version__)"andwhich soffice pdftoppm.
How to Run
All scripts live in scripts/, take --help, print JSON to stdout, and
exit non-zero on failure. Run them with terminal:
python3 scripts/pptx_create.py deck.json out.pptx
python3 scripts/pptx_read.py deck.pptx --outline # full JSON outline
python3 scripts/pptx_read.py deck.pptx --notes # speaker notes
python3 scripts/pptx_read.py deck.pptx --images ./img # export pictures
python3 scripts/pptx_edit.py deck.pptx --replace-text "Old Corp" "New Corp"
python3 scripts/pptx_edit.py deck.pptx --chart-data update.json
python3 scripts/pptx_edit.py deck.pptx --duplicate-slide 2
python3 scripts/pptx_edit.py deck.pptx --remove-slide 3 --move-slide 2 0
python3 scripts/pptx_from_template.py brand.pptx out.pptx --values vals.json
python3 scripts/pptx_render.py deck.pptx --outdir ./render # slide PNGs
Author JSON specs with write_file; inspect script output and generated
JSON with read_file.
Quick Reference
| Task | Command |
|---|---|
| New deck from spec | pptx_create.py spec.json out.pptx |
| 16:9 vs 4:3 | "slide_size": "16:9" or "4:3" in the spec |
| Outline as JSON | pptx_read.py deck.pptx --outline |
| Export images | pptx_read.py deck.pptx --images DIR |
| Replace text | pptx_edit.py deck.pptx --replace-text OLD NEW |
| Replace chart data | pptx_edit.py deck.pptx --chart-data spec.json |
| Patch one series | same flag, spec with "ops" (see below) |
| Swap picture | pptx_edit.py deck.pptx --swap-image N NAME new.png |
| Duplicate slide | pptx_edit.py deck.pptx --duplicate-slide N |
| Remove slide | pptx_edit.py deck.pptx --remove-slide N |
| Reorder slide | pptx_edit.py deck.pptx --move-slide FROM TO |
| Slide background | pptx_edit.py deck.pptx --set-background N RRGGBB |
| Hyperlink runs | pptx_edit.py deck.pptx --hyperlink N TEXT URL |
| Slide number on | pptx_edit.py deck.pptx --enable-slide-number N |
| Footer text | pptx_edit.py deck.pptx --set-footer N TEXT |
| Set notes | pptx_edit.py deck.pptx --set-notes N TEXT |
| Append notes | pptx_edit.py deck.pptx --append-notes N TEXT |
| Fill template | pptx_from_template.py tpl.pptx out.pptx --values v.json |
| Render slide PNGs | pptx_render.py deck.pptx --outdir DIR |
Procedure
1. Create a deck
Write a JSON spec (see pptx_create.py --help for the full format), then
run pptx_create.py. Per slide you can set: layout (title,
title_content, section, two_content, title_only, blank), title,
subtitle, bullets (strings, or dicts with level 0-4, size pt,
bold, italic, font, color hex, link URL for a hyperlink),
background (solid hex), footer (text; enables the layout's footer
placeholder), slide_number (true; enables the layout's slide-number
placeholder), images (path + left/top/width/height in inches), tables
(rows as list-of-lists), shapes (rectangle, rounded_rectangle, oval,
diamond, right_arrow, chevron, with fill hex + optional text),
charts (bar, bar_h, line, pie with categories + series), and
notes (speaker notes).
2. Read a deck
pptx_read.py deck.pptx --outline returns slide size, layout inventory,
and per slide: layout name, all shape texts, table cells, image inventory
(filename/ext/bytes), chart categories/series/values, and speaker notes.
Use --images DIR to dump embedded pictures to files, then
vision_analyze on any exported image if you need to see its content.
3. Edit a deck
pptx_edit.py combines operations in one pass; use --output to keep the
original. Text replacement scans slide shapes, table cells, and notes.
Image swap retargets the picture's relationship id so position and size
are preserved. Slide removal drops the relationship and the <p:sldId>
entry; reorder moves the <p:sldId> element within <p:sldIdLst>
(python-pptx has no public API for either — the script does the XML-level
work). --duplicate-slide N appends an independent deep copy of slide N:
shape XML plus image/media/hyperlink relationships are cloned and rIds
remapped, so editing the copy never touches the original. Chart slides
are refused (see Pitfalls). --set-notes/--append-notes edit speaker
notes; --set-background, --hyperlink, --enable-slide-number, and
--set-footer handle deck polish.
Chart updates take a JSON spec via --chart-data. Full replace:
{"slide": 0, "chart": 0, "categories": [...], "series": {...}}. For
surgical edits, pass "ops" instead — a list of
{"op": "update_series", "name": ..., "values": [...]},
add_series, remove_series, rename_category (from/to or
index), and set_title. python-pptx can only swap a chart's entire
dataset (replace_data), so ops are implemented as read-existing →
modify → replace; the per-part UX is a wrapper, and any chart data not
expressible as categories + numeric series will be normalized by the
round-trip.
4. Build from a template
pptx_from_template.py opens a brand .pptx, replaces every
{{token}} from a values JSON across slides/tables/notes, and can append
new slides that use the template's own layouts (by layout name or index)
so they inherit the master's fonts and colors. Tip: to start from a
template with zero slides, delete existing ones afterward with
pptx_edit.py --remove-slide.
5. Visual verification
pptx_render.py deck.pptx --outdir ./render converts the deck to PDF
with soffice --headless and splits it into one PNG per slide with
pdftoppm (or pdftocairo). Output JSON lists the PNG paths — review
each with vision_analyze. When either tool is missing the script exits
0 with {"rendered": false, "missing": [...]} and guidance; fall back to
the JSON outline from pptx_read.py, which verifies content and
structure, just not visuals.
Converting to PDF
If LibreOffice is installed, export the finished deck to PDF directly:
soffice --headless --convert-to pdf --outdir ./out deck.pptx
The output lands at ./out/deck.pdf. Fonts not installed on the host are
substituted, so render-verify (Procedure step 5) before shipping the PDF.
There is no offline pure-Python .pptx→PDF path; if soffice is absent,
say so rather than approximating.
Pitfalls
- Run splitting: PowerPoint fragments paragraph text into runs at
spell-check and edit boundaries.
--replace-textfirst merges adjacent runs whose formatting is identical, so matches split across such runs are replaced with formatting fully preserved. Only when a match spans genuinely differently-formatted runs is the paragraph rewritten with the first run's formatting — verify those slides after replacement. - Chart slides cannot be duplicated: each chart relationship embeds a
separate XLSX workbook part; cloning that graph reliably is not
supported, so
--duplicate-sliderefuses chart slides cleanly instead of corrupting the deck. Rebuild the chart on a new slide instead. External-hyperlink and image/media rels are carried over; layout and notes rels are recreated fresh. - Chart ops are a wrapper: python-pptx replaces the whole dataset;
"ops"round-trips existing plot data throughreplace_data, and changing chart type is not possible. - Reordering is XML-level: python-pptx has no supported reorder API.
--move-slidemanipulates<p:sldIdLst>directly; safe for ordinary decks but re-read the deck afterward to confirm. - Copying slides between decks is unsupported — duplication works only within one deck, where layouts and masters are shared.
- Footer/slide-number enablement copies the placeholder from the slide's
layout; on layouts without those placeholders,
--set-footerfails with a clear message (add a textbox instead). - Hyperlinks apply to whole runs;
--hyperlinklinks every run containing the given text on that slide. - The default python-pptx template is 4:3; the create script sets 16:9 unless the spec says otherwise. Custom templates keep their own size.
- Layout indexes vary by template. For brand templates, list layout names
first:
pptx_read.py template.pptx --outline(layouts_available). slide.shapes.titleis None on blank layouts — the create script handles this, but remember it when writing ad-hoc python-pptx code.- Always pass
encoding="utf-8"when writing spec files; tokens like{{city}}may be filled with non-ASCII values.
Verification
- After any create/edit, run
pptx_read.py OUT.pptx --outlineand check slide count, texts, tables, notes, and chart values match intent. --images DIRthen file-size check confirms pictures embedded.- Render every slide with
pptx_render.py deck.pptx --outdir ./renderand review each PNG withvision_analyze— this catches overlapping shapes, truncated text, and color problems the outline cannot. If the render tools are missing, the script says so; rely on the outline. - The bundled test suite is the full contract:
python3 -m pytest tests/ -q(requires python-pptx + pytest).
Frequently asked questions about Powerpoint Skill
Similar skills
Agent-Browser Core
Efficient browser automation for AI agents.
Setup My IQ
Effortlessly create and update your personal context portfolio.
CRM Maintenance
Automate HubSpot updates from your calendar and emails.
Zoom MCP
Streamline access to Zoom meeting assets and recordings.
Slack Automation
Automate tasks and extract data from Slack easily.
SMB Onboard
Guides small business owners through initial tool setup.
