Catalog
openai/slides

openai

slides

Create and edit presentation slide decks (`.pptx`) with PptxGenJS, bundled layout helpers, and render/validation utilities. Use when tasks involve building a new PowerPoint deck, recreating slides from screenshots/PDFs/reference decks, modifying slide content while preserving editable output, adding charts/diagrams/visuals, or diagnosing layout issues such as overflow, overlaps, and font substitution.

global
0installs0uses~1.1k
v1.0Saved Apr 5, 2026

Slides

Overview

Use PptxGenJS for slide authoring. Do not use python-pptx for deck generation unless the task is inspection-only; keep editable output in JavaScript and deliver both the .pptx and the source .js.

Keep work in a task-local directory. Only copy final artifacts to the requested destination after rendering and validation pass.

Bundled Resources

  • assets/pptxgenjs_helpers/: Copy this folder into the deck workspace and import it locally instead of reimplementing helper logic.
  • scripts/render_slides.py: Rasterize a .pptx or .pdf to per-slide PNGs.
  • scripts/slides_test.py: Detect content that overflows the slide canvas.
  • scripts/create_montage.py: Build a contact-sheet style montage of rendered slides.
  • scripts/detect_font.py: Report missing or substituted fonts as LibreOffice resolves them.
  • scripts/ensure_raster_image.py: Convert SVG/EMF/HEIC/PDF-like assets into PNGs for quick inspection.
  • references/pptxgenjs-helpers.md: Load only when you need API details or dependency notes.

Workflow

  1. Inspect the request and determine whether you are creating a new deck, recreating an existing deck, or editing one.
  2. Set the slide size up front. Default to 16:9 (LAYOUT_WIDE) unless the source material clearly uses another aspect ratio.
  3. Copy assets/pptxgenjs_helpers/ into the working directory and import the helpers from there.
  4. Build the deck in JavaScript with an explicit theme font, stable spacing, and editable PowerPoint-native elements when practical.
  5. Run the bundled scripts from this skill directory or copy the needed ones into the task workspace. Render the result with render_slides.py, review the PNGs, and fix layout issues before delivery.
  6. Run slides_test.py for overflow checks when slide edges are tight or the deck is dense.
  7. Deliver the .pptx, the authoring .js, and any generated assets that are required to rebuild the deck.

Authoring Rules

  • Set theme fonts explicitly. Do not rely on PowerPoint defaults if typography matters.
  • Use autoFontSize, calcTextBox, and related helpers to size text boxes; do not use PptxGenJS fit or autoFit.
  • Use bullet options, not literal characters.
  • Use imageSizingCrop or imageSizingContain instead of PptxGenJS built-in image sizing.
  • Use latexToSvgDataUri() for equations and codeToRuns() for syntax-highlighted code blocks.
  • Prefer native PowerPoint charts for simple bar/line/pie/histogram style visuals so reviewers can edit them later.
  • For charts or diagrams that PptxGenJS cannot express well, render SVG externally and place the SVG in the slide.
  • Include both warnIfSlideHasOverlaps(slide, pptx) and warnIfSlideElementsOutOfBounds(slide, pptx) in the submitted JavaScript whenever you generate or substantially edit slides.
  • Fix all unintentional overlap and out-of-bounds warnings before delivering. If an overlap is intentional, leave a short code comment near the relevant element.

Recreate Or Edit Existing Slides

  • Render the source deck or reference PDF first so you can compare slide geometry visually.
  • Match the original aspect ratio before rebuilding layout.
  • Preserve editability where possible: text should stay text, and simple charts should stay native charts.
  • If a reference slide uses raster artwork, use ensure_raster_image.py to generate debug PNGs from vector or odd image formats before placing them.

Validation Commands

Examples below assume you copied the needed scripts into the working directory. If not, invoke the same script paths relative to this skill folder.

# Render slides to PNGs for review
python3 scripts/render_slides.py deck.pptx --output_dir rendered

# Build a montage for quick scanning
python3 scripts/create_montage.py --input_dir rendered --output_file montage.png

# Check for overflow beyond the original slide canvas
python3 scripts/slides_test.py deck.pptx

# Detect missing or substituted fonts
python3 scripts/detect_font.py deck.pptx --json

Load references/pptxgenjs-helpers.md if you need the helper API summary or dependency details.

Files19
19 files · 159.3 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Safety

88

Quality

92

Clarity

89

Completeness

83

Summary

A comprehensive PowerPoint slide authoring skill that uses PptxGenJS (JavaScript library) to create and edit presentation decks with high-quality layout control. It provides bundled helper modules for text measurement, image sizing, code highlighting, LaTeX rendering, and slide validation, plus Python utilities for rendering, font detection, and quality assurance.

Static Analysis Findings

1 finding

Patterns detected by deterministic static analysis before AI scoring. Hover over any finding code for detailed information and remediation guidance.

Destructive Operation
SEC-002Privilege Escalation3x in 1 file

Privilege escalation (sudo)

scripts/ensure_raster_image.pysudo a3x

Detected Capabilities

JavaScript slide generation with PptxGenJS libraryText measurement and auto-sizing via skia-canvas and fontkitImage handling with crop and contain sizing modesSyntax-highlighted code blocks via Prism.jsLaTeX equation rendering to SVG via MathJaxPPTX to PNG rasterization via LibreOffice and pdf2imageFont detection and substitution analysis via fontconfigImage format conversion (SVG, EMF, HEIC, PDF, JPEG XR to PNG)Slide validation (overlap detection, boundary checking, font inspection)Montage/contact-sheet generation from rendered slides

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

create presentation deckpptx authoringslide layouttext sizingfont substitutiondiagram renderingslide validationrender to pngrecreate slidesfix layout overflow

Risk Signals

INFO

String 'sudo a' detected in ensure_raster_image.py

scripts/ensure_raster_image.py
INFO

Multiple occurrences of SEC-002 (sudo privilege escalation) in static analysis

scripts/ensure_raster_image.py | static analysis pre-scan
INFO

Shell command execution via subprocess.run() for external tools (soffice, inkscape, convert, gs, heif-convert, JxrDecApp, fc-list)

scripts/ensure_raster_image.py, scripts/render_slides.py, scripts/detect_font.py, scripts/create_montage.py, scripts/slides_test.py
INFO

File system operations: reading PPTX/PDF files, writing PNG outputs, temporary directory creation

All Python scripts and JavaScript helpers
INFO

Network-free operation: no outbound requests, no credential access, no environment variable reads for secrets

All files

Referenced Domains

External domains referenced in skill content, detected by static analysis.

developers.google.comschemas.openxmlformats.orgwww.apache.orgwww.w3.org

Use Cases

  • Build a new presentation deck from scratch with PptxGenJS
  • Recreate slides from reference PDFs or screenshots while preserving editability
  • Modify existing PPTX files while maintaining consistent typography and layout
  • Add complex visuals like charts, diagrams, syntax-highlighted code, and rendered equations
  • Diagnose and fix layout issues such as text overflow, element overlap, and font substitution

Quality Notes

  • Excellent documentation: SKILL.md provides clear workflow steps, authoring rules, validation commands, and references to helper APIs
  • Strong helper design: bundled JavaScript modules (text.js, image.js, layout.js, etc.) abstract complex measurements and styling logic, reducing boilerplate
  • Comprehensive Python utilities: render_slides.py, slides_test.py, detect_font.py, create_montage.py, ensure_raster_image.py cover the full validation/diagnostics pipeline
  • Well-scoped dependencies: clearly documented npm and system tool requirements (Inkscape, ImageMagick, Ghostscript, LibreOffice, fontconfig)
  • Error handling in Python scripts: graceful fallbacks (e.g., PPTX → ODP → PDF conversion chain in render_slides.py) and appropriate exception raising
  • Type hints and docstrings in Python modules improve maintainability
  • Clear design rationale in detect_font.py explains why fontconfig synonyms are preferred over ad-hoc alias tables
  • Test/validation integration: instructions explicitly state when to run slides_test.py and warnIfSlideHasOverlaps/warnIfSlideElementsOutOfBounds in generated JavaScript
  • Asset organization: pptxgenjs_helpers folder is well-structured and readily copyable into task workspaces
  • Authoring rules are specific and actionable (e.g., 'Use autoFontSize, calcTextBox; do not use PptxGenJS fit or autoFit')
  • Minor: static analysis shows 'sudo a' as a match; this is almost certainly a false positive (substring match on 'sudo a' in a compound word or comment) and does not represent actual privilege escalation code
  • Minor: no explicit allowed-tools field in frontmatter (would improve MCP client ability to restrict capabilities), but inline documentation is thorough
Model: claude-haiku-4-5-20251001Analyzed: Apr 5, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Add openai/slides to your library

Command Palette

Search for a command to run...