Create and manipulate PowerPoint PPTX files programmatically. Use when the user needs to generate presentations, modify PPTX templates, extract slide content, create thumbnail previews, or automate PowerPoint workflows. Supports both template-based generation (for branding compliance) and from-scratch creation. Keywords: PowerPoint, PPTX, presentation, slides, template, deck, slideshow, corporate, branding.
npx skills add https://github.com/jwynia/agent-skills --skill pptx-generator
Use this skill when:
Do NOT use this skill when:
{{PLACEHOLDERS}} and replace with contentExtract text inventory to understand what can be replaced:
deno run --allow-read scripts/analyze-template.ts corporate-template.pptx > inventory.json
Output (inventory.json):
{
"filename": "corporate-template.pptx",
"slideCount": 10,
"textElements": [
{
"slideNumber": 1,
"shapeId": "shape-2",
"shapeName": "Title 1",
"placeholderType": "ctrTitle",
"position": { "x": 1.5, "y": 2.0, "w": 7.0, "h": 1.2 },
"paragraphs": [
{ "text": "{{TITLE}}", "fontSize": 44, "bold": true }
]
}
]
}
Create replacements.json:
{
"textReplacements": [
{ "tag": "{{TITLE}}", "value": "Q4 2024 Results" },
{ "tag": "{{SUBTITLE}}", "value": "Financial Overview" },
{ "tag": "{{DATE}}", "value": "December 2024" },
{ "tag": "{{AUTHOR}}", "value": "Finance Team", "slideNumbers": [1] }
]
}
deno run --allow-read --allow-write scripts/generate-from-template.ts \
corporate-template.pptx replacements.json output.pptx
Get information about available slides:
deno run --allow-read scripts/generate-thumbnails.ts slide-library.pptx
For visual preview, extract the thumbnail:
deno run --allow-read --allow-write scripts/generate-thumbnails.ts \
slide-library.pptx --extract-thumb --output-dir ./previews
Create selections.json:
{
"slideSelections": [
{ "slideNumber": 1 },
{ "slideNumber": 5 },
{ "slideNumber": 12 },
{ "slideNumber": 3 }
],
"textReplacements": [
{ "tag": "{{TITLE}}", "value": "Custom Presentation" }
]
}
deno run --allow-read --allow-write scripts/generate-from-template.ts \
slide-library.pptx selections.json custom-deck.pptx
Create spec.json:
{
"title": "Product Launch 2025",
"author": "Marketing Team",
"slides": [
{
"background": { "color": "003366" },
"elements": [
{
"type": "text",
"x": 1, "y": 2.5, "w": 8, "h": 1.5,
"options": {
"text": "Product Launch 2025",
"fontSize": 44,
"bold": true,
"color": "FFFFFF",
"align": "center"
}
},
{
"type": "text",
"x": 1, "y": 4, "w": 8, "h": 0.5,
"options": {
"text": "Revolutionizing the Industry",
"fontSize": 24,
"color": "CCCCCC",
"align": "center"
}
}
]
},
{
"elements": [
{
"type": "text",
"x": 0.5, "y": 0.5, "w": 9, "h": 0.7,
"options": {
"text": "Key Features",
"fontSize": 32,
"bold": true,
"color": "003366"
}
},
{
"type": "table",
"x": 0.5, "y": 1.5, "w": 9, "h": 3,
"options": {
"rows": [
["Feature", "Description", "Benefit"],
["Speed", "2x faster processing", "Save time"],
["Quality", "HD output", "Better results"],
["Integration", "Works with existing tools", "Easy adoption"]
],
"border": { "pt": 1, "color": "CCCCCC" }
}
}
]
}
]
}
deno run --allow-read --allow-write scripts/generate-scratch.ts spec.json output.pptx
Scenario: Generate quarterly report from branded template.
Steps:
# 1. Analyze template for replaceable content
deno run --allow-read scripts/analyze-template.ts quarterly-template.pptx --pretty
# 2. Create replacements.json with Q4 data
# 3. Generate report
deno run --allow-read --allow-write scripts/generate-from-template.ts \
quarterly-template.pptx replacements.json Q4-2024-Report.pptx
Scenario: Combine approved slides for a specific client pitch.
Steps:
# 1. View available slides
deno run --allow-read scripts/generate-thumbnails.ts pitch-library.pptx
# 2. Create selections.json picking slides 1, 3, 7, 12, 15
# 3. Generate custom deck
deno run --allow-read --allow-write scripts/generate-from-template.ts \
pitch-library.pptx selections.json acme-pitch.pptx
Scenario: Generate presentation from JSON data (e.g., API response).
Steps:
# 1. Transform your data into spec.json format
# 2. Generate presentation
deno run --allow-read --allow-write scripts/generate-scratch.ts data-spec.json report.pptx
| Script | Purpose | Permissions |
|--------|---------|-------------|
| analyze-template.ts | Extract text inventory from PPTX | --allow-read |
| generate-thumbnails.ts | Get slide info and extract previews | --allow-read --allow-write |
| generate-from-template.ts | Modify templates (replace/combine) | --allow-read --allow-write |
| generate-scratch.ts | Create PPTX from JSON specification | --allow-read --allow-write |
| Type | Description | Key Options |
|------|-------------|-------------|
| text | Text box | text, fontSize, bold, color, align |
| image | Image from file or base64 | path, data, sizing |
| table | Data table | rows, colW, border, fill |
| shape | Geometric shapes | type, fill, line, text |
| chart | Charts and graphs | type, data, title, showLegend |
Symptoms: Output PPTX still contains {{PLACEHOLDER}} tags.
Solution:
analyze-template.ts to verify exact tag textslideNumbers filter in replacementsSymptoms: Slides appear in wrong order after combining.
Solution:
slideSelectionsSymptoms: Image elements are blank in output.
Solution:
Understanding how PowerPoint's OOXML format handles placeholders is crucial for template development.
PowerPoint uses a hierarchical inheritance model:
Theme → Slide Master → Slide Layout → Slide
{{placeholder}} text in a layout does NOT automatically appear on slides using that layout.<a:lstStyle/>, it inherits formatting (color, size, bullets) from the layout's <a:lstStyle>.<p:ph type="..." idx="..."/>. The type (e.g., "title", "body", "ctrTitle") and idx must match.<a:buNone/> in the layout's lstStyle.In layout placeholders, define colors in <a:lstStyle> (inheritable), not in <a:rPr> (run-specific):
<!-- Layout: Color in lstStyle (GOOD - inheritable) -->
<p:txBody>
<a:lstStyle>
<a:lvl1pPr algn="ctr">
<a:buNone/> <!-- Suppress bullets -->
<a:defRPr sz="4400" b="1">
<a:solidFill><a:srgbClr val="FFFFFF"/></a:solidFill>
</a:defRPr>
</a:lvl1pPr>
</a:lstStyle>
<a:p>
<a:r><a:rPr lang="en-US"/><a:t>{{placeholder}}</a:t></a:r>
</a:p>
</p:txBody>
For slides to properly inherit from layouts:
<!-- Slide: Empty lstStyle to inherit from layout -->
<p:sp>
<p:nvSpPr>
<p:cNvPr id="2" name="title 2"/>
<p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr>
<p:nvPr>
<p:ph type="ctrTitle"/> <!-- Links to layout placeholder -->
</p:nvPr>
</p:nvSpPr>
<p:spPr/> <!-- Empty = inherit position from layout -->
<p:txBody>
<a:bodyPr/>
<a:lstStyle/> <!-- Empty = inherit formatting from layout -->
<a:p>
<a:r>
<a:rPr lang="en-US"/> <!-- Empty = inherit character formatting -->
<a:t>{{placeholder}}</a:t> <!-- Content must be here -->
</a:r>
</a:p>
</p:txBody>
</p:sp>
| Issue | Cause | Solution |
|-------|-------|----------|
| Text shows as black instead of white | Color defined in <a:rPr> not <a:lstStyle> | Move color to layout's <a:defRPr> in <a:lstStyle> |
| Unwanted bullets appearing | Master's bodyStyle has bullets, layout doesn't override | Add <a:buNone/> to layout's <a:lvl1pPr> |
| Placeholder text not appearing | Text only in layout, not in slide | Include text content in slide's <p:txBody> |
| Formatting not applying | Slide has explicit formatting | Use empty <a:lstStyle/> and <a:rPr lang="en-US"/> |
| Type | Usage |
|------|-------|
| ctrTitle | Centered title (title slides) |
| title | Standard title |
| subTitle | Subtitle |
| body | Content area (use idx for multiple) |
| pic | Picture placeholder |
| dt | Date/time |
| ftr | Footer |
| sldNum | Slide number |
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
Take jwynia/pptx-generator from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.