Deck Automation · workflow
Two skills that build decks and learn from your edits
A generator assembles decks from your brand template by picking layouts and filling placeholders. An extractor reads the changes you make by hand and turns them into rules. Styling lives in the template — neither tool ever writes a font or a colour.
template-driven · styling inherited · python-pptx
The loop closes: every hand-edit you keep feeds the next generation.
How it works
Three parts, one shared resolver
The template carries every visual decision in its slide master: the font, the title colour, the body-size ladder, and each background variant. Both skills read that master through one shared resolver, so styling is never hardcoded.
Master + theme define fonts, colours, and layouts. Fix styling here, once.
Selects a named layout per slide and fills placeholders. Inherits all styling.
Diffs generated vs hand-edited, resolving inheritance, into a rules ledger.
The resolver (lib/pptx_master.py, shared by both skills) pins to the master’s real theme and ignores any decoy Office themes shipped inside the file — so theme colours always land on the right palette.
Folder structure
Two self-contained skills
Each carries its own copy of the resolver, so either can be installed alone. Drop both under .claude/skills/ (project scope) or ~/.claude/skills/ (personal).
deck-generator/
├── SKILL.md # how the model drives generation
├── layout_map.json # machine map the generator reads
├── references/
│ ├── layout-map.md # menu of layouts + fields
│ └── content-schema.md # how to author content.md
├── lib/pptx_master.py # master/theme resolver (shared)
├── scripts/
│ ├── build_layout_map.py
│ └── generate_deck.py
└── examples/
├── sample_content.md
└── example_output.pptx
style-extractor/
├── SKILL.md # how the model drives extraction
├── STYLE_LEDGER.md # the accumulating record
├── references/
│ └── style-ledger.md # the ledger format + routing
├── lib/pptx_master.py # same resolver — keep in sync
└── scripts/diff_decks.pyOperating it
Three phases
P1Setup
Once per machine, plus once per template.
Install the dependencies, then build the layout map from your template:
pip install python-pptx lxml --break-system-packages python scripts/build_layout_map.py template.pptx .
This writes your menu of layouts and the field map the generator reads. Re-run only when the template changes — the menu is documented in layout map.
P2Build a deck
Give it content, it generates, then renders for a check.
Write a content.md (or hand it a brief and let it draft one), then generate and render for QA:
python scripts/generate_deck.py template.pptx content.md out.pptx layout_map.json soffice --headless --convert-to pdf out.pptx && pdftoppm -jpeg -r 110 out.pdf slide
The block schema and bullet syntax are in content schema; the full skill is Deck Generator.
P3The improvement loop
Every hand-edit makes the system better — if you keep the original.
- Save the generated deck untouched as
original.pptx; edit a copy in PowerPoint. - Diff them — only your real changes survive, inherited values cancel:
python scripts/diff_decks.py original.pptx edited.pptx --json deltas.json
- Merge the deltas into the ledger; a rule seen in three decks is promoted.
- Route a promoted rule to the source — a recurring default fix belongs in the template, not a per-deck patch.
The ledger format and routing are in style ledger; the full skill is Style Extractor.