home / skills / 404kidwiz / claude-supercode-skills / pptx-skill

pptx-skill skill

/pptx-skill

This skill helps you generate and automate PowerPoint presentations programmatically using python-pptx and PptxGenJS, speeding slide creation and branding

npx playbooks add skill 404kidwiz/claude-supercode-skills --skill pptx-skill

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.0 KB
---
name: pptx-skill
description: Expert in creating, editing, and automating PowerPoint presentations using python-pptx and PptxGenJS. Use when generating slides programmatically, modifying presentations, or building report automation. Triggers include "PowerPoint", "PPTX", "slides", "presentation", "python-pptx", "PptxGenJS", "slide deck".
---

# PPTX Skill

## Purpose
Provides expertise in programmatic PowerPoint presentation creation, editing, and automation. Specializes in using python-pptx (Python) and PptxGenJS (JavaScript) for generating dynamic slide decks and automating presentation workflows.

## When to Use
- Generating presentations programmatically
- Creating slides from data sources
- Modifying existing PowerPoint files
- Building automated report generators
- Adding charts and tables to slides
- Applying templates and branding
- Extracting content from presentations
- Batch processing multiple presentations

## Quick Start
**Invoke this skill when:**
- Creating PowerPoint files from code
- Automating slide generation
- Modifying existing PPTX files
- Building presentation templates
- Extracting data from slides

**Do NOT invoke when:**
- PDF generation → use `/pdf-skill`
- Word documents → use `/docx-skill`
- Excel files → use `/xlsx-skill`
- Manual presentation design → use appropriate design tools

## Decision Framework
```
PPTX Operation?
├── Generate from Scratch
│   ├── Python → python-pptx
│   └── JavaScript → PptxGenJS
├── Modify Existing
│   └── python-pptx (read + modify)
├── Template-Based
│   └── Load template, fill placeholders
└── Extract Content
    └── python-pptx for reading
```

## Core Workflows

### 1. Presentation Generation (python-pptx)
1. Install python-pptx
2. Create Presentation object
3. Add slides from layouts
4. Add content (text, images, tables)
5. Apply formatting
6. Save presentation

### 2. Chart Creation
1. Prepare data for chart
2. Create chart data object
3. Add chart to slide
4. Configure chart type and options
5. Style chart elements
6. Position and size appropriately

### 3. Template-Based Generation
1. Create master template with placeholders
2. Load template in code
3. Identify placeholder shapes
4. Replace placeholder content
5. Add dynamic slides as needed
6. Save as new file

## Best Practices
- Use slide layouts from the template
- Keep text within placeholder boundaries
- Use appropriate chart types for data
- Maintain consistent styling
- Test output in PowerPoint
- Handle missing fonts gracefully

## Anti-Patterns
| Anti-Pattern | Problem | Correct Approach |
|--------------|---------|------------------|
| Ignoring layouts | Inconsistent formatting | Use slide layouts |
| Hardcoded positions | Layout breaks | Use placeholders |
| Too much text per slide | Unreadable | Limit content, use bullets |
| Missing templates | Reinventing styling | Create reusable templates |
| No error handling | Corrupted files | Validate and handle errors |

Overview

This skill is an expert module for creating, editing, and automating PowerPoint presentations programmatically using python-pptx and PptxGenJS. It streamlines slide generation, template application, chart and table insertion, and batch processing for report automation. Use it to convert data into polished slide decks and to modify existing PPTX files reliably.

How this skill works

The skill inspects the requested PPTX operation and routes to the appropriate toolchain: python-pptx for Python-based read/edit workflows and PptxGenJS for JavaScript generation. It can create presentations from templates, identify and replace placeholders, add text, images, tables, and charts, and save or export the resulting PPTX. Error handling and layout-aware placement are applied to avoid broken slides.

When to use it

  • Generate presentations programmatically from data sources or APIs
  • Build automated report pipelines that output PPTX files
  • Modify or augment existing PowerPoint files (text, images, charts)
  • Apply branded templates and fill placeholders at scale
  • Batch-create or update multiple slide decks
  • Extract slide content or metadata for downstream processing

Best practices

  • Prefer template slide layouts and placeholders over hardcoded positions
  • Keep slide text concise and within placeholder bounds
  • Choose chart types that match the data story and preformat axes/labels
  • Test generated PPTX files in PowerPoint to validate fonts and rendering
  • Handle missing resources (fonts, images) and validate inputs before writing files
  • Use consistent naming and folder structure when batch-processing outputs

Example use cases

  • Generate monthly KPI decks by pulling data from a database and inserting charts/tables
  • Create onboarding presentations from a template that populate user-specific details
  • Automate weekly status reports across teams with standardized slides and charts
  • Batch-update branding across many presentations by replacing logos and theme elements
  • Extract slide text and images to index presentation content for search or compliance

FAQ

Which library should I choose for server-side automation?

Use python-pptx for Python server automation and for editing existing PPTX files. Use PptxGenJS for Node.js or browser-based generation when JS environment is preferred.

Can I preserve a PowerPoint template’s layouts and themes?

Yes. Load the template, use its slide layouts and placeholders, replace content programmatically, and save as a new PPTX to preserve theme and formatting.