Powerpoint
PowerPoint slide deck generation and management using python-pptx with YAML-driven content and styling
- Skill ID
- microsoft/hve-core/powerpoint
- Publisher
- microsoft
- Repository
- hve-core
- Installs
- 0
- Files
- 85
- License
- MIT
- Requires
- Requires uv, Python 3.11+, PowerShell 7+, and LibreOffice
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
microsoft/hve-core/powerpointInstalls these files- SECURITY.md
- SKILL.md
- content-extra-py-template.md
- content-yaml-template.md
- pyproject.toml
- references/script-reference.md
- scripts/Invoke-EmbedAudio.ps1
- scripts/Invoke-ExportSvg.ps1
- scripts/Invoke-GenerateThemes.ps1
- scripts/Invoke-PptxPipeline.ps1
- scripts/build_deck.py
- scripts/embed-audio.sh
- scripts/embed_audio.py
- scripts/export-svg.sh
- scripts/export_slides.py
- scripts/export_svg.py
- scripts/extract_content.py
- scripts/generate-themes.sh
- scripts/generate_themes.py
- scripts/invoke-pptx-pipeline.sh
- scripts/pdf_safety.py
- scripts/pptx_charts.py
- scripts/pptx_colors.py
- scripts/pptx_fills.py
- scripts/pptx_fonts.py
- scripts/pptx_shapes.py
- scripts/pptx_tables.py
- scripts/pptx_text.py
- scripts/pptx_utils.py
- scripts/render_pdf_images.py
- scripts/validate_deck.py
- scripts/validate_geometry.py
- scripts/validate_slides.py
- style-yaml-template.md
- tests/Invoke-EmbedAudio.Tests.ps1
- tests/Invoke-ExportSvg.Tests.ps1
- tests/Invoke-GenerateThemes.Tests.ps1
- tests/Invoke-PptxPipeline.Tests.ps1
- tests/conftest.py
- tests/corpus/0_empty
- tests/corpus/0_short_hex
- tests/corpus/0_theme_ref
- tests/corpus/0_valid_hex
- tests/corpus/1_empty
- tests/corpus/1_invalid_hex
- tests/corpus/1_valid_hex
- tests/corpus/2_empty_results
- tests/corpus/2_mixed_severity
- tests/corpus/3_empty
- tests/corpus/3_multiple_runs
- tests/corpus/3_single_run
- tests/corpus/README.md
- tests/corpus/generate_seeds.py
- tests/fixtures/malformed/empty.pdf
- tests/fixtures/malformed/not_a_pdf.bin
- tests/fixtures/malformed/truncated.pdf
- tests/fuzz_harness.py
- tests/strategies.py
- tests/test_build_deck.py
- tests/test_embed_audio.py
- tests/test_export_slides.py
- tests/test_export_svg.py
- tests/test_extract_content.py
- tests/test_extract_content_integration.py
- tests/test_fixture_generation.py
- tests/test_fuzz_build_deck.py
- tests/test_fuzz_pdf_safety.py
- tests/test_fuzz_pptx_colors.py
- tests/test_fuzz_pptx_tables.py
- tests/test_fuzz_validate_slides.py
- tests/test_generate_themes.py
- tests/test_pdf_safety.py
- tests/test_pptx_charts.py
- tests/test_pptx_colors.py
- tests/test_pptx_fills.py
- tests/test_pptx_fonts.py
- tests/test_pptx_shapes.py
- tests/test_pptx_tables.py
- tests/test_pptx_text.py
- tests/test_pptx_utils.py
- tests/test_render_pdf_images.py
- tests/test_validate_deck.py
- tests/test_validate_geometry.py
- tests/test_validate_slides.py
- uv.lock
What this skill tells the agent
PowerPoint Skill
Generates, updates, and manages PowerPoint slide decks using python-pptx with YAML-driven content and styling definitions.
Overview
This skill provides Python scripts that consume YAML configuration files to produce PowerPoint slide decks. Each slide is defined by a content.yaml file describing its layout, text, and shapes. A style.yaml file defines dimensions, template configuration, layout mappings, metadata, and defaults.
SKILL.md covers technical reference: prerequisites, commands, script architecture, API constraints, and troubleshooting. For conventions and design rules (element positioning, visual quality, color and contrast, contextual styling), follow pptx.instructions.md.
Prerequisites
PowerShell
The Invoke-PptxPipeline.ps1 script handles virtual environment creation and dependency installation automatically via uv sync. Requires uv, Python 3.11+, and PowerShell 7+.
Installing uv
If uv is not installed:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Via pip (fallback)
pip install uvSystem Dependencies (Export and Validation)
The Export and Validate actions require LibreOffice for PPTX-to-PDF conversion and optionally pdftoppm from poppler for PDF-to-JPG rendering. When pdftoppm is not available, PyMuPDF handles the image rendering.
The Validate action's vision-based checks require the GitHub Copilot CLI for model access.
# macOS
brew install --cask libreoffice
brew install poppler # optional, provides pdftoppm
# Linux
sudo apt-get install libreoffice poppler-utils
# Windows (winget preferred, choco fallback)
winget install TheDocumentFoundation.LibreOffice
# choco install libreoffice-still # alternative
# poppler: no winget package; use choco install poppler (optional, provides pdftoppm)Copilot CLI (Vision Validation)
The validate_slides.py script uses the GitHub Copilot SDK to send slide images to vision-capable models. The Copilot CLI must be installed and authenticated:
# Install Copilot CLI
npm install -g @github/copilot-cli
# Authenticate (uses the same GitHub account as VS Code Copilot)
copilot auth login
# Verify
copilot --versionRequired Files
style.yaml— Dimensions, defaults, template configuration, and metadatacontent.yaml— Per-slide content definition (text, shapes, images, layout)- (Optional)
content-extra.py— Custom Python for complex slide drawings
Content Directory Structure
All slide content lives under the working directory's content/ folder:
content/
├── global/
│ ├── style.yaml # Dimensions, defaults, template config, and theme metadata
│ └── voice-guide.md # Voice and tone guidelines
├── slide-001/
│ ├── content.yaml # Slide 1 content and layout
│ └── images/ # Slide-specific images
│ ├── background.png
│ └── background.yaml # Image metadata sidecar
├── slide-002/
│ ├── content.yaml # Slide 2 content and layout
│ ├── content-extra.py # Custom Python for complex drawings
│ └── images/
│ └── screenshot.png
├── slide-003/
│ ├── content.yaml
│ └── images/
│ ├── diagram.png
│ └── diagram.yaml
└── ...Global Style Definition (style.yaml)
The global style.yaml defines dimensions, template configuration, layout mappings, metadata, and defaults. Color and font choices are specified per-element in each slide's content.yaml rather than centralized in the style file.
See the style.yaml template for the full template, field reference, and usage instructions.
Per-Slide Content Definition (content.yaml)
Each slide's content.yaml defines layout, text, shapes, and positioning. All position and size values are in inches. Color values use #RRGGBB hex format or @theme_name references.
Text contract: markdown-like list lines in textbox.text and shape.text are interpreted as PowerPoint lists during rendering. Unordered markers (-, +, *) become bulleted paragraphs, ordered markers (1., 1)) become auto-numbered paragraphs, and leading indentation maps to paragraph level.
See the content.yaml template for the full template, supported element types, supported shape types, and usage instructions.
Complex Drawings (content-extra.py)
When a slide requires complex drawings that cannot be expressed through content.yaml element definitions, create a content-extra.py file in the slide folder. The render() function signature is fixed. The build script calls it after placing standard content.yaml elements.
See the content-extra.py template for the full template, function parameters, and usage guidelines.
Security Validation
content-extra.py execution is disabled by default. When a slide folder contains one and --allow-scripts is not passed, the build fails with an error naming the file. Pass --allow-scripts to authorize execution after reviewing the script.
When execution is authorized, the build script performs AST-based static analysis before running the file and rejects the patterns below. This analysis is a lint that catches obvious mistakes early. It is not a security boundary: a blocked module reached through an alias is not detected, and pathlib and open are permitted. Authorization is the control.
Allowed imports:
pptxand allpptx.*submodules- Safe standard-library modules (e.g.,
math,copy,json,re,pathlib,collections,itertools,functools,typing,enum,dataclasses,decimal,fractions,string,textwrap)
Blocked imports:
subprocess,os,shutil,socket,ctypes,signal,multiprocessing,threading,http,urllib,ftplib,smtplib,imaplib,poplib,xmlrpc,webbrowser,code,codeop,compileall,py_compile,zipimport,pkgutil,runpy,ensurepip,venv,sqlite3,tempfile,shelve,dbm,pickle,marshal,importlib,sys,telnetlib- Any third-party package not on the allowlist
Blocked builtins:
- Dangerous:
eval,exec,__import__,compile,breakpoint - Indirect bypass:
getattr,setattr,delattr,globals,locals,vars - Attribute-form calls onto
builtins,os,sys,subprocess, andimportlib(for examplebuiltins.eval(...))
`--allow-scripts` flag:
Pass --allow-scripts to authorize execution of content-extra.py files. Without it, a present script fails the build rather than being skipped, so a deck never silently loses custom drawings. The flag authorizes execution; it does not skip the lint.
This is a behavior change. A deck that previously built with a content-extra.py present now requires --allow-scripts, and a script relying on a blocked import no longer has a bypass.
python scripts/build_deck.py \
--content-dir content/ \
--style content/global/style.yaml \
--output slide-deck/presentation.pptx \
--allow-scriptsWhen validation fails, the build raises ContentExtraError with a message identifying the violation and file path.
Script Reference
The full command surface lives in references/script-reference.md: build a deck, build from a template, update specific slides, extract content from an existing PPTX, validate, export slides to images or SVG, dry-run validation, generate theme variants, and embed audio.
Script Architecture
The build and extraction scripts use shared modules in the scripts/ directory:
| Module | Purpose |
More from microsoft
Use this skill in a project
Open any RiverX project, search the Skills panel for microsoft/hve-core/powerpoint, and install it in one click.
