Preface

Weekly reports, project updates, investor pitches — presentation decks are an unavoidable part of the workplace. .pptx files look like regular documents, but when opened, they reveal themselves to be ZIP archives containing XML files, relationship tables, and media assets with a complex internal structure. Asking an AI to “directly generate a PPT” often only results in a Markdown outline, or a corrupted file that PowerPoint cannot open.

Anthropic maintains a set of document Agent Skills in their official repository anthropics/skills, among which the pptx skill specifically handles PowerPoint presentations (.pptx / .potx). It formalizes workflows for creation, editing, reading, template population, and validation into SKILL.md, with accompanying Python and Node scripts, making it a canonical sample for observing the boundary of an Agent’s ability to handle complex Office format files.

What is this

pptx is an Agent Skill developed by Anthropic, following the universal SKILL.md format, and can be used in tools that support Agent Skills such as Cursor, Claude Code, and Claude.ai.

One-sentence positioning: Whenever a task involves .pptx or .potx — creating slides, reading content, modifying templates, merging/splitting decks, processing speaker notes — the Agent should load this Skill instead of relying solely on general knowledge to hard-code solutions.

This Skill is located in the skills/pptx/ directory of the official repository, alongside docx, pdf, and xlsx as part of the “Document Skills” series; it is licensed under source-available terms (not Apache 2.0 open source), see LICENSE.txt in the directory for details.

Core Features and Highlights

The official SKILL.md divides tasks into three main lines, with supporting scripts and validation workflows:

Task Recommended Approach
Create from scratch Write a Node script with pptxgenjs to generate the file
Edit existing files / Use templates Unpack the archive → modify ppt/slides/slideN.xml → repackage the archive
Read content Use markitdown deck.pptx to extract text; use thumbnail.py to generate a thumbnail grid

1. Create a Presentation

Generate .pptx files via the pptxgenjs script. The Skill documentation details common pitfalls: set the canvas size first with pres.layout, do not include # in color codes, negative shadow offsets are not allowed, use the native addChart() method for charts, etc. After generation, run validate.py to perform structural validation.

2. Editing and Templates

A .pptx file is fundamentally a ZIP archive. The official workflow is: unpack the archive, use add_slide.py to copy/insert slides, edit the XML files, use clean.py to remove orphaned assets, then repackage the contents of the unpacked directory. When working with a .potx template, use the same workflow and keep the output with the .potx extension.

The Skill also emphasizes design specifications: use thematic color palettes, avoid generic title+bullet point layouts, include visual elements on every page, and provides multiple reference color palettes and typography suggestions — these are “aesthetic constraints” for the Agent, not vague prompts.

3. Reading and Analysis

markitdown outputs text organized by slide blocks, which is suitable for summarization and QA; scripts/thumbnail.py generates a labeled thumbnail grid to help select layouts when working with templates.

4. Supporting Scripts

Script Function
scripts/thumbnail.py Generate a grid of slide thumbnails
scripts/add_slide.py Copy/insert slides and complete relationship registry
scripts/clean.py Delete unreferenced slides, media, and rels files
scripts/office/validate.py Validate schema, relationships, charts, etc., and provide repair hints if validation fails
scripts/office/soffice.py Headless conversion via LibreOffice (e.g., convert to PDF)

5. Triple QA

The official requirements include: content QA (markitdown + placeholder grep), file QA (validate.py, add --original for template scenarios), visual QA (convert to PDF then use pdftoppm to check for overflow and alignment issues page by page). This workflow demonstrates that the Skill is designed for “deliverable files”, not just generated code.

Installation and Activation

The Skill itself is a directory containing SKILL.md and the scripts/ folder. Activation methods vary by tool (refer to official documentation for the most up-to-date instructions).

Cursor

Place the pptx directory in the project-level or user-level skill path, and Cursor will automatically detect it on startup:

# Project-level (shared with the repository)
git clone --depth 1 https://github.com/anthropics/skills.git /tmp/anthropics-skills
cp -r /tmp/anthropics-skills/skills/pptx .cursor/skills/pptx

# Or user-level (available for all projects)
mkdir -p ~/.cursor/skills
cp -r /tmp/anthropics-skills/skills/pptx ~/.cursor/skills/pptx

The directory structure should be .cursor/skills/pptx/SKILL.md. The Agent will automatically match the Skill using the description in the frontmatter; you can also explicitly call it by entering /pptx in a conversation.

Cursor also supports Rules → Add Rule → Remote Rule (Github), paste in https://github.com/anthropics/skills to import the Skill from the remote repository (see Cursor official Skills documentation for details).

Claude Code

Register the official plugin marketplace and install the document skill set in Claude Code:

/plugin marketplace add anthropics/skills
/plugin install document-skills@anthropic-agent-skills

After installation, you can directly say: “Use the pptx skill to generate a 10-page pitch deck based on this outline”.

Claude.ai and API

Anthropic’s documentation states that the sample Skills in the repository are available to paid Claude.ai users; see Using skills in Claude for instructions on uploading custom Skills. For API usage, you can mount pre-built or custom Skills via the Skills API.

Dependencies

The Skill declares the following runtime dependencies:

  • Node: pptxgenjs (pre-installed in the environment, run npm install only if require fails)
  • Python: markitdown[pptx], Pillow, defusedxml, lxml
  • System tools: LibreOffice (soffice), Poppler (pdftoppm)

Script paths are relative to the Skill directory; if you only copy SKILL.md without the scripts/ folder, editing and validation capabilities will be incomplete. It is recommended to copy the entire directory.

Typical Usage Examples

Example 1: Read an Existing Presentation

markitdown deck.pptx
python scripts/thumbnail.py deck.pptx my-deck-thumbs

The first command extracts text from each slide; the second generates thumbnails to help the Agent understand the layout. Note that the second parameter of thumbnail.py is the output prefix; running the script multiple times in the same directory with the default thumbnails prefix will overwrite previous output.

Example 2: Edit and Repackage Based on a Template

python3 -c "import sys,zipfile; zipfile.ZipFile(sys.argv[1]).extractall('unpacked')" deck.pptx
python scripts/add_slide.py unpacked/ slide2.xml --after slide2.xml
# Adjust the <p:sldIdLst> in ppt/presentation.xml to reorder/delete slides
python scripts/clean.py unpacked/
# Edit content in ppt/slides/slideN.xml
(cd unpacked && rm -f ../out.pptx && zip -Xr ../out.pptx .)
python scripts/office/validate.py out.pptx --original deck.pptx

The official documentation emphasizes: structural changes (adding/removing slides, reordering) should be completed before content editing; do not use xml.etree for OOXML round-tripping, instead use defusedxml.minidom for parsing to avoid damaging namespaces.

Example 3: Create from Scratch and Validate

The Agent will write a pptxgenjs script, for example, to set a widescreen layout, add a title and charts, then run:

node generate-deck.js
python scripts/office/validate.py deck.pptx

If validation errors occur (common issues include undeclared secondary axes for combination charts, using outEnd for stacked chart dataLabelPosition), fix them in the generation script and regenerate the file, rather than manually editing the packaged XML.

Example 4: Visual QA

python scripts/office/soffice.py --headless --convert-to pdf output.pptx
rm -f slide-*.jpg
pdftoppm -jpeg -r 150 output.pdf slide

Convert the PDF to individual JPEG files to check for text overflow, overlapping elements, low contrast, and other issues. After modifying the .pptx file, you need to rerun the full conversion chain.

Applicable Scenarios and Notes

Who This is For

  • Product, operations, and engineering teams that need Agents to batch generate or revise PPT files
  • Teams looking to automate “document writing” workflows into CI or internal toolchains in Cursor / Claude Code
  • Developers researching how Agents handle OOXML and perform file-level QA

Typical Scenarios

  • Generate pitch decks and training slides based on an outline or data
  • Extract summaries, revise, or re-template a .pptx sent by a client
  • Populate content based on enterprise .potx brand templates while preserving formatting
  • Merge, split, duplicate slides, and clean up unused media assets

Limitations and Notes

  1. License: The pptx Skill is source-available, please read LICENSE.txt before commercial use.
  2. Legacy .ppt: Convert files to .pptx using soffice.py first before processing.
  3. python-pptx Limitations: The official documentation notes that it cannot copy slides, directly modifying text_frame.text will lose styling, and cannot read SVG/EMF template images — for complex structures, use the XML workflow or the included scripts.
  4. Fonts and QA: Font metrics in LibreOffice previews may differ from those in real PowerPoint; use “safe fonts” such as Arial, Calibri for body text, and leave ~10% extra space for non-standard fonts.
  5. Environment: Dependencies include LibreOffice, Node, and Python packages; sandbox environments need to use the Skill’s built-in soffice.py wrapper to avoid hanging from bare soffice calls.

Summary

The pptx Skill advances PowerPoint handling from “AI can only describe slides” to a complete workflow: “can create, edit, read, and validate”. Creation uses pptxgenjs, editing uses OOXML, and quality assurance relies on validate.py and visual QA. For the high-demand workplace presentation scenario, it also serves as an official reference implementation for observing how Agents handle complex binary document formats.

Official repository directory and full SKILL.md:

https://github.com/anthropics/skills/tree/main/skills/pptx