Skip to content
Cload Cloud
Documentation

pptx

Read, generate, and adjust slides, layouts, templates.

What pptx Does

The pptx skill enables you to programmatically read, generate, and modify PowerPoint presentations directly within Claude Code. Whether you need to extract data from existing slides, create presentations from scratch, or adjust layouts and templates, this skill automates what would otherwise require manual work in PowerPoint or similar tools. It’s designed for product designers, project managers, and knowledge workers who need to generate reports, create slide decks from data, or maintain consistent branding across presentations without touching the GUI.

How to Install

  1. Access Claude Code environment within your Claude workspace
  2. Import the pptx skill from the official skills repository: from skills import pptx
  3. Verify installation by checking available functions: help(pptx)
  4. Ensure you have python-pptx library available in your environment (typically pre-installed)
  5. Test basic functionality by reading an existing .pptx file to confirm setup
  6. For advanced features, review the skill documentation at https://github.com/anthropics/skills/tree/main/skills/pptx

Use Cases

  • Automated Report Generation: Convert data exports, metrics, or analysis results into formatted slide decks with charts, tables, and summaries in minutes instead of hours
  • Batch Presentation Updates: Modify multiple presentations simultaneously—change logos, update brand colors, refresh templates across an entire folder of files
  • Template Standardization: Create and apply consistent slide layouts, fonts, and design systems across your organization to maintain brand compliance
  • Data Visualization Pipeline: Generate slides programmatically from live data sources, CSV files, or API responses, enabling dynamic presentation creation
  • Presentation Content Extraction: Parse existing PowerPoint files to pull text, images, and layout information for analysis, archival, or repurposing

How It Works

The pptx skill wraps the python-pptx library, which provides object-oriented access to PowerPoint file structures. When you read a presentation, the skill parses the .pptx file (which is actually a zipped XML archive) into Python objects representing slides, shapes, text boxes, and formatting properties. This allows you to inspect and modify every element programmatically without opening the GUI. For generation, the skill constructs new Presentation objects from scratch, adding slides with specified layouts, inserting text and images, and applying formatting rules before writing to disk.

Under the hood, each slide is a container of shapes—text boxes, images, tables, and charts. The skill lets you access properties like font size, color, alignment, and positioning, then modify them as needed. Templates are referenced as slide layouts within the presentation’s master slide definitions. When generating presentations, you can clone layouts from existing templates or build slides from predefined style rules, ensuring consistency without manual formatting.

The skill handles the conversion between Python data types and the XML-based .pptx format transparently, so you can work with familiar objects (strings, lists, colors) and let the library manage serialization. This makes it possible to chain operations—read a template, extract its layout structure, apply it to new slides, and save the result—all in a few lines of code.

Pros and Cons

Pros:

  • Fully programmatic—automate presentation creation and updates without GUI interaction
  • Preserves existing formatting and templates, enabling non-destructive modifications
  • Integrated with Claude Code, so you can generate presentations as part of multi-step workflows
  • Handles complex layouts, images, tables, and shapes with precise control
  • No external dependencies beyond python-pptx; works offline

Cons:

  • Limited support for advanced features like animations, transitions, and video embedding
  • Only supports .pptx format; cannot read legacy .ppt files
  • Requires understanding of python-pptx API for complex tasks
  • Difficult to match pixel-perfect design work done manually in PowerPoint
  • No built-in support for real-time collaborative editing
  • csv: Process tabular data and convert it into presentation tables or chart data
  • json: Parse structured data from APIs or exports and map it into slide content
  • image_tools: Generate charts, graphs, or visualizations to embed in slides
  • web_scraper: Extract data from websites to populate presentations automatically
  • file_manager: Batch process multiple .pptx files or organize presentation assets

Alternatives

  • Google Slides API: Cloud-native alternative for collaborative presentation editing; limited offline support and requires authentication
  • Canva API: Design-focused tool for templated presentations; less flexible for programmatic data-driven content
  • LibreOffice UNO: Open-source alternative with broader file format support but steeper learning curve and less Python-friendly API
Glossary

Key terms

Slide Layout
A predefined template structure within a presentation that specifies placeholder positions, default formatting, and design elements. Layouts are stored in the master slide and can be applied to multiple slides for consistency.
Shape
Any individual element on a slide—text boxes, images, tables, charts, or graphical objects. Each shape has properties like position, size, fill color, and text formatting that can be read and modified.
Master Slide
The underlying template that defines the default appearance, fonts, colors, and layout structure for all slides in a presentation. Changes to the master slide propagate to linked slide layouts.
.pptx File Format
The Office Open XML standard for PowerPoint files, which is a zipped archive containing XML files representing slides, layouts, images, and metadata. This format is fully supported by python-pptx and the pptx skill.
Placeholder
A predefined shape on a slide layout (e.g., title box, content area) that users or code can fill with content. Placeholders inherit formatting from the layout but can be customized individually.
FAQ

Frequently Asked Questions

How do I read text content from an existing PowerPoint file?

Use the read function to load a .pptx file, then iterate through slides and shapes to extract text. Example: `presentation = pptx.read('file.pptx')` followed by accessing `slide.shapes` and `.text` properties on text boxes.

Can I create a presentation from scratch with custom layouts?

Yes. Initialize a new Presentation object, add slides using specified layouts, insert shapes (text boxes, images, tables), and format them. You can define custom layouts or use blank slides and position elements manually using coordinates.

What's the difference between layouts and templates in pptx?

Layouts are slide blueprints (master slide definitions) that define placeholder positions and default formatting. Templates are complete .pptx files containing multiple layouts plus branding, fonts, and color schemes. You can apply layouts to individual slides; use templates as starting points for new presentations.

How do I change colors or fonts across multiple slides?

Load the presentation, loop through slides and shapes, access the `.font` or `.fill` properties, and modify them programmatically. You can also apply a master slide layout to reset formatting across slides.

Can I add images, charts, or tables to generated presentations?

Yes. The skill supports inserting images from file paths, creating tables by defining rows/columns and populating cells, and embedding charts. You specify position, size, and styling for each element.

What file formats does pptx support?

The skill primarily works with .pptx files (Office Open XML). Older .ppt (binary) files are not supported. You can export generated presentations only as .pptx format.

How do I preserve existing slide designs when adding new content?

Reference the original presentation's layouts and master slides. When adding slides, use `slide_layout = presentation.slide_layouts[index]` to apply an existing design template rather than creating blank slides.

Can pptx handle animations, transitions, or speaker notes?

The skill has limited support for these features. Text and basic shapes are fully supported, but complex animations and transitions may not be preserved. Speaker notes can be read and written as text, but advanced animation control requires direct XML manipulation.

More in Documentation

All →
Documentation

Twitter Algorithm Optimizer

Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit tweets to improve engagement and visibility.

ComposioHQ
Documentation

NotebookLM Integration

Lets Claude Code chat directly with NotebookLM for source-grounded answers based exclusively on uploaded documents.

PleasePrompto
Documentation

Meeting Insights Analyzer

Analyzes meeting transcripts to uncover behavioral patterns including conflict avoidance, speaking ratios, filler words, and leadership style.

ComposioHQ