Pptx Author: Build Headless PowerPoint Decks with python-pptx
Build PowerPoint decks headless with python-pptx.
Written by Neura Market from the official Hermes Agent documentation for Pptx Author. Commands, paths, and version numbers are reproduced from the source unchanged.
Read the official documentationPptx Author is a lightweight Hermes Agent skill that produces .pptx files on disk using python-pptx. You reach for it when your workflow needs a deck as a file artifact, not when you need to drive a live PowerPoint session. It is tuned for model-backed financial decks such as pitch books, IC memos, and earnings notes where every number must trace back to a source workbook.
What it does
This skill writes a .pptx file to ./out/ and returns the relative path in the agent's final message. It creates the ./out/ directory if it does not exist. The deck is built entirely in Python, headless, with no dependency on Office or a GUI. The skill enforces a few conventions that make the output useful for financial analysis: one idea per slide, every number traceable to a model, use of a firm template when available, and PNG charts from the model instead of native pptx charts.
Before you start
You need Python and pip. Install the single dependency:
pip install "python-pptx>=0.6"
The skill runs on Linux, macOS, and Windows. It is an optional skill, installed on demand. The source workbook (if you use one) should be an Excel file at ./out/model.xlsx. A firm template, if available, lives at ./templates/firm-template.pptx. Neither is required; the skill works without them.
Core conventions
One idea per slide
The title states the takeaway; the body supports it. A slide titled "Q3 Revenue" is weak. "Revenue growth accelerated to 14% Y/Y in Q3" is strong.
Every number traces to the model
If a figure on a slide came from ./out/model.xlsx, footnote the sheet and cell.
Revenue: $1,250M (Source: model.xlsx, Inputs!C3)
Never transcribe numbers from memory or from a summary. Open the workbook, read the named range, and bind the deck value to it programmatically when you can.
Use the firm template when one is mounted
If ./templates/firm-template.pptx exists, load it so the deck inherits branded colors, fonts, and master layouts.
from pptx import Presentation
from pathlib import Path
template = Path("./templates/firm-template.pptx")
prs = Presentation(str(template)) if template.exists() else Presentation()
Charts: PNG-from-model beats native pptx charts
When fidelity matters (the model's chart styling must match the deck exactly), render the chart to PNG from the source workbook and embed the image. Native pptx.chart charts are fragile and often don't match firm conventions.
from pptx.util import Inches
slide.shapes.add_picture("./out/charts/football_field.png",
Inches(1), Inches(2),
width=Inches(8))
No external sends
This skill writes a file. It never emails, uploads, or posts. Orchestration layers handle delivery.
Skeleton
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pathlib import Path
template = Path("./templates/firm-template.pptx")
prs = Presentation(str(template)) if template.exists() else Presentation()
# Title slide
slide = prs.slides.add_slide(prs.slide_layouts[0])
slide.shapes.title.text = "Project Aurora — Strategic Alternatives"
slide.placeholders[1].text = "Preliminary Discussion Materials"
# Valuation summary slide (title-only layout)
slide = prs.slides.add_slide(prs.slide_layouts[5])
slide.shapes.title.text = "Valuation implies $38–$52 per share across methodologies"
# Add a table bound to model outputs
rows, cols = 5, 4
tbl_shape = slide.shapes.add_table(rows, cols,
Inches(0.5), Inches(1.5),
Inches(9), Inches(3))
tbl = tbl_shape.table
headers = ["Methodology", "Low ($)", "Mid ($)", "High ($)"]
for c, h in enumerate(headers):
tbl.cell(0, c).text = h
# In a real deck, read these from the model workbook with openpyxl
data = [
("Trading comps", "35", "41", "48"),
("Precedent M&A", "39", "45", "52"),
("DCF (base)", "36", "43", "51"),
("LBO (10% IRR)", "33", "38", "44"),
]
for r, row in enumerate(data, start=1):
for c, val in enumerate(row):
tbl.cell(r, c).text = val
# Embed a chart rendered from the model
slide = prs.slides.add_slide(prs.slide_layouts[5])
slide.shapes.title.text = "Football field — current price $42"
slide.shapes.add_picture("./out/charts/football_field.png",
Inches(1), Inches(1.8), width=Inches(8))
Path("./out").mkdir(exist_ok=True)
prs.save("./out/pitch-aurora.pptx")
Binding deck numbers to the source workbook
Read named ranges or specific cells from your Excel model so deck numbers never drift.
from openpyxl import load_workbook
wb = load_workbook("./out/model.xlsx", data_only=True)
def nr(name):
"""Resolve a named range to its current computed value."""
rng = wb.defined_names[name]
sheet, coord = next(rng.destinations)
return wb[sheet][coord].value
revenue_fy24 = nr("RevenueFY24")
implied_mid = nr("ImpliedSharePriceBase")
Then build deck content using those values:
slide.shapes.title.text = f"Implied share price of ${implied_mid:.2f} (base case)"
Remember to recalculate the workbook before reading it. openpyxl only sees computed values if something has already calculated the sheet. Run the recalc helper in the excel-author skill first, or open/save through a real Excel session.
Slide-type checklist for pitch decks
A typical banking pitch deck follows this structure. Not prescriptive, but useful as a starting skeleton:
- Cover / title
- Disclaimer
- Table of contents
- Situation overview
- Company snapshot (the target)
- Market / sector context
- Valuation summary (football field), the money slide
- Trading comps detail
- Precedent transactions detail
- DCF summary
- Illustrative LBO / sponsor case
- Process considerations
- Appendix
When not to use this skill
- Users in a live PowerPoint session with an Office MCP available. Drive their live doc instead.
- Non-financial slideware (quarterly all-hands, marketing decks). Use the broader
powerpointskill. - Decks with heavy animation, transitions, or speaker notes. Use the broader
powerpointskill.
Limits and gotchas
- The skill writes a file only. It never emails, uploads, or posts. Orchestration layers handle delivery.
- Native pptx charts are fragile and often don't match firm conventions. The skill recommends PNG-from-model instead.
- openpyxl only sees computed values if the workbook has already been calculated. You must recalculate the workbook before reading it, either with the
excel-authorskill's recalc helper or by opening and saving through a real Excel session. - The skill is adapted from Anthropic's
pptx-authorandpitch-deckskills. The MCP / Office-JS branches of the originals are dropped. This assumes headless Python.
Related skills
This skill pairs naturally with excel-author (for the source workbook) and the broader powerpoint skill (for slides with speaker notes, embeds, media, or heavy formatting).