/slides-ai-plugin:pptx-slidesfrom slides-ai-plugin
Generates OOXML-compliant .pptx files with PptxGenJS, including precise layout, text measurement, overlap validation, and theme presets.
Ships in slides-ai-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Generate professional, editable PowerPoint presentations using PptxGenJS (Node.js). Produces OOXML-compliant .pptx files with precise layout, text measurement, and overlap validation.
Every PPTX generation script imports the bundled TypeScript helper modules via bun:
import pptxgen from 'pptxgenjs';
import * as h from '${CLAUDE_PLUGIN_ROOT}/skills/pptx-slides/scripts/main.ts';
const pptx = new pptxgen();
pptx.layout = 'LAYOUT_16x9'; // 10" × 5.625"
Run generation scripts with bun (no build step needed):
npx -y bun ${CLAUDE_PLUGIN_ROOT}/skills/pptx-slides/scripts/main.ts theme list
Dependencies (skia-canvas, fontkit, linebreak, prismjs) are auto-installed by bun on first run — no manual install step needed.
| Module | Key Exports | Purpose |
|---|---|---|
| text | autoFontSize(), calcTextBoxHeightSimple(), scale() | Font-aware text measurement via skia-canvas, adaptive sizing |
| theme | createTheme(), PRESETS, sectionBackground() | Design token system with 12 curated presets |
| layout | warnIfSlideHasOverlaps(), alignSlideElements(), distributeSlideElements() | Overlap detection, bounds checking, positioning |
| layout_builders | addFeatureGrid(), addCardRow(), addTimeline(), addMetricsRow(), addComparisonTable() | High-level component builders |
| decorative | addStaircase(), addSectionBadge(), addProgressBar(), addSlideNumber() | Visual personality elements |
| validation | validateDeck() | Consolidated pre-save quality validation |
| code | codeToRuns() | Prism.js syntax highlighting to PptxGenJS text runs |
| image | getImageDimensions(), imageSizingCrop(), imageSizingContain() | Binary dimension detection and aspect-ratio sizing |
| svg | svgToDataUri() | SVG sanitization and base64 data URI encoding |
| util | safeOuterShadow(), normalizeColor(), inchesToEmu() | Shadow effects, color/unit conversion |
Pick a curated preset or create a custom theme:
// Use a preset
const theme = h.createTheme(h.PRESETS.darkMonospace);
// Or customize
const theme = h.createTheme({
accent: 'ff6b35',
font: { heading: 'Poppins', body: 'Inter' },
});
Available presets: darkMonospace, swissModern, boldSignal, darkBotanical, cleanCorporate, neonCyber, warmMinimal, vintageEditorial, terminalGreen, gradientWave, midnightBlue, paperInk.
For mixed-background decks, define a section map:
const sectionMap = { '0': 'brand', '1-3': 'light', '4-8': 'default' };
const colors = { brand: theme.accent, light: theme.bg.secondary, default: theme.bg.primary };
slide.background = { color: h.sectionBackground(slideIndex, sectionMap, colors) };
Use scale() instead of hardcoded font sizes — the PPTX equivalent of CSS clamp():
const titleSize = h.scale(theme.size.title.min, theme.size.title.max, { bullets: 0, textLength: title.length });
const bodySize = h.scale(theme.size.body.min, theme.size.body.max, { bullets: 5, textLength: 800 });
For precise text box fitting, use autoFontSize() with skia-canvas measurement:
const opts = h.autoFontSize('Long paragraph text...', 'Arial', { w: 8, h: 3, minFontSize: 14, maxFontSize: 28 });
slide.addText(text, { x: 1, y: 1.5, ...opts });
references/slide-patterns.mdaddFeatureGrid(), addCardRow(), etc.h.validateDeck(pptx) before saving.pptx file with speaker notes on every content slidescale() for adaptive sizing.h.resolveFont(theme, 'heading') for proper fallback chainstheme.spacing.margin)h.alignSlideElements() and h.distributeSlideElements() for precisiontheme.text.primary, theme.accent — never hardcode colorsRun h.validateDeck(pptx) before saving every deck. It checks:
scale() or autoFontSize()validateDeck() before savingfit or autoFit instead of h.autoFontSize()Design for editability — recipients must be able to modify the deck:
slide.addNotes('...') on every content slide.Build architecture diagrams using PptxGenJS native shapes rather than images:
slide.addShape('rect', { ... })slide.addShape('line', { ... })theme.accent for active components, theme.text.secondary for inactivereferences/pptxgenjs-helpers.md — Full API reference for bundled helper modulesreferences/slide-patterns.md — Detailed slide type patterns with dimensions and positioningscripts/main.ts — TypeScript CLI entry point and library re-exports (run via npx -y bun)scripts/types.ts — Shared TypeScript interfaces for all helper modulesscripts/theme.ts — 12 curated theme presets with createTheme() and resolveFont()scripts/text.ts — Font-aware text measurement via skia-canvas, autoFontSize(), scale()scripts/layout.ts — Overlap detection, element alignment, bounds checkingscripts/layout_builders.ts — addFeatureGrid(), addCardRow(), addTimeline(), etc.scripts/decorative.ts — addStaircase(), addSectionBadge(), addProgressBar()scripts/validation.ts — validateDeck() pre-save quality validationscripts/code.ts — Prism.js syntax highlighting to PptxGenJS text runsscripts/image.ts — Binary dimension detection and aspect-ratio sizingscripts/svg.ts — SVG sanitization and base64 data URI encodingscripts/util.ts — Shadow effects, color normalization, unit conversionreferences/pptxgenjs-helpers.md (opens in a new tab)references/slide-patterns.md (opens in a new tab)scripts/code.ts (opens in a new tab)scripts/decorative.ts (opens in a new tab)scripts/image.ts (opens in a new tab)scripts/layout.ts (opens in a new tab)scripts/layout_builders.ts (opens in a new tab)scripts/main.ts (opens in a new tab)scripts/svg.ts (opens in a new tab)scripts/text.ts (opens in a new tab)scripts/theme.ts (opens in a new tab)scripts/tsconfig.json (opens in a new tab)scripts/types.ts (opens in a new tab)scripts/util.ts (opens in a new tab)scripts/validation.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub proyecto26/slides-ai-plugin --plugin slides-ai-plugin3 skills in this plugin
/html-slidesUsed when the user asks to "create HTML slides", "generate an HTML presentation", "make animated slides", "build interactive slides", "create web slides", "GSAP presentation", "browser-based slides", "convert PPTX to HTML", "animated deck", "reveal.js slides", or when the output format is HTML for any presentation task. Also triggers on "single-file presentation", "CSS animations in slides", "scroll-based slides", or "web presentation". Generates self-contained, single-file HTML with viewport fitting, CSS/GSAP animations, and curated style presets./slide-designUsed when the user asks to "create slides", "make a presentation", "build a deck", "design slides", "generate a pitch deck", "create a conference talk", "make a keynote", "presentation design", "slide layout", "slide template", "presentation structure", or mentions slides, presentations, decks, or talks in any context. Also triggers when the user wants to plan the content and visual direction of a presentation before generating it. This is the entry-point orchestrator that drives the full slide creation workflow across both HTML and PPTX formats. Examples: "I need to create slides for my conference talk about AI adoption", "can you turn this markdown into a presentation?", "I have a product demo tomorrow and need visual materials", "convert my existing PowerPoint to interactive HTML slides".Other plugins' skills for the same job