PPTX Add Slides for Openclaw

An advanced automation script that inserts new slides into existing PPTX files with 100% style and layout consistency by cloning slide XML elements.

tuobadaidai
v1.0.0
Jun 23, 2026
0
472
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install pptx-add-slides

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install pptx-add-slides using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is PPTX Add Slides?

PPTX Add Slides is a powerful command-line utility designed to insert new slides into existing PowerPoint presentations while guaranteeing absolute style consistency. Unlike standard python-pptx slide insertion which only replicates layout skeletons and loses customized backgrounds, gradients, or shapes, this skill utilizes an advanced XML cloning strategy. By parsing the underlying slide XML of a target template slide, it replaces only the specific text elements (<a:t>), preserving all other style attributes intact.

By leveraging this approach within the Openclaw Skills framework, developers and AI agents can eliminate manual styling adjustments, font size discrepancies, and broken layout designs. It is the perfect tool for dynamically extending slide decks, adding new sections, or supplementing content pages without ruining the visual integrity of professional presentations.

PPTX Add Slides Use Cases

  • Extending existing PowerPoint presentations with new content slides without manually reforming elements.
  • Inserting chapter divider slides dynamically for automated slide deck generation.
  • Batch extending presentations using complex JSON configuration files.
  • Keeping perfect visual style (backgrounds, overlays, colors, and margins) when appending new slides with Openclaw Skills.

How PPTX Add Slides Works

  1. Decompress and Parse: The tool extracts the PPTX archive and identifies target template slides.
  2. Template XML Cloning: It deep-copies the exact XML representation of the chosen template page instead of using high-level layout wrappers.
  3. Targeted Text Replacement: It locates text nodes (<a:t>) inside the cloned XML and swaps the placeholder content with the new text while keeping inline styles (<a:rPr>) untouched.
  4. Conflict Resolution: Relational IDs (rId) and slide relations in slideX.xml.rels are dynamically renumbered to prevent structural conflicts within the XML zip archive.
  5. Manifest Registration: The script updates [Content_Types].xml to register the newly added slides and repacks the zip file back into a fully compatible, uncorrupted PPTX file as part of the Openclaw Skills workflow.

PPTX Add Slides Setup

To get started with PPTX Add Slides in the Openclaw Skills repository, install the required dependencies using pip:

pip install python-pptx lxml

Ensure that your source PPTX file is located in your workspace, then execute the python script found at scripts/add_slides.py.

Example command for adding a content page:

python3 scripts/add_slides.py \
  --source path/to/source.pptx \
  --output path/to/output.pptx \
  --template-page 5 \
  --insert-after 1 \
  --pages '[{"title": "New Page Title", "subtitle": "Subtitle Text", "content": ["Key Point 1", "Key Point 2"], "footer": "Footer summary"}]'

PPTX Add Slides Data Schema & Taxonomy

The script utilizes structured JSON formats passed via CLI arguments to map text placeholders to original presentation templates. Below is the schema detail for content pages and mixed-type configurations:

Single Page Generation Schema

Key Type Description
title String Main title text of the new slide
subtitle String Subtitle text (optional)
content Array of Strings Core bullet points or paragraphs to insert into text blocks
footer String Summary or footer text (optional)

Mixed-Type Configuration (--pages-config) Schema

Field Type Description
template Integer 1-based index of the original slide to use as the style template
insert_after Integer The page index after which the new slide will be inserted
type String Slide type: content, section, or cover
data Object The text payload containing title, content, section_number, or desc depending on the type

PPTX Add Slides Advanced Features

  • Raw XML Injection: Bypasses traditional SDK limitations by operating directly on slide XML to support complex properties like transparency and custom shapes.
  • Relational ID Renumbering: Built-in logic automatically recalculates relationship IDs (rIds) to avoid file corruption when cloning media or master layouts.
  • Theme Color Mapping: Retains dynamic color theme references (e.g., val="accent1") so that cloned slides respond accurately to parent presentation theme changes.
  • Multi-Type Batching: Supports complex pipeline configurations via --pages-config allowing mixed-type (section separators and content slides) insertions in a single command execution with Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*