Sandbox
@Hasasasa/html-to-editable-pptx

HTML to editable PPTX skill for Claude Code

This repo converts HTML decks into `.pptx` while keeping text editable and searchable in PowerPoint. It parses the page, maps supported HTML and CSS into native PPT objects, embeds fonts, and uses local snapshots only for effects PowerPoint cannot express cleanly. It also creates audit material so you can compare the HTML source with the PowerPoint result and fix tricky slides iteratively.

65 starsβ€’7 forksβ€’Pythonβ€’Updated 2mo ago
Who it's for

Builders who make slide decks in HTML and want a PowerPoint file they can still edit.

What it delivers

You can ship an editable `.pptx` instead of a flat image deck, with a review loop for hard layouts.

What it does

Editable text output

Converts text into native PowerPoint textboxes instead of screenshots.

Local snapshot fallback

Renders complex effects like gradients, shadows, filters, and blend modes as local underlays while keeping text vector-based.

Font subsetting and embedding

Subsets Google Fonts to the characters used and can embed fonts for better cross-machine rendering.

Visual audit pipeline

Generates side-by-side HTML and PPT comparison images, contact sheets, and review prompts.

Incremental slide reruns

Supports rerunning only selected slides during audit and fix iterations.

Claude Code skill packaging

Includes `SKILL.md` so the repo can be installed and used as an agent skill.

How to get it

  1. 1In a Claude Code session, just hand Claude the repo URL
    Install this skill for me: https://github.com/Hasasasa/claude-skill-html-to-pptx
  2. 2After install, ask in plain language
    Convert D:\path\to\deck.html to pptx
  3. 3Requires Python 3.10+ and pip.
    git clone https://github.com/Hasasasa/claude-skill-html-to-pptx.git
    cd claude-skill-html-to-pptx
    pip install -r requirements.txt
    python -m playwright install chromium
  4. 4Run
    python convert.py path/to/deck.html
  5. 5Regression tests cover OOXML invariants (assemble), font-resolver caching semantics, and…
    python -m pytest tests -q

README

HTML-TO-PPTX

Python License: MIT Platform Claude Code skill

πŸ“– English | δΈ­ζ–‡

Convert HTML slide decks into editable .pptx: text stays as native PowerPoint textboxes, fonts are subset on demand, complex CSS decorations fall back to local snapshots, and HTML/PPT side-by-side audit material is generated for review.

Original HTML renderinghtml-to-pptx output rendered in PowerPoint
Original HTMLhtml-to-pptx output, opened in PowerPoint

Text stays as editable vectors; complex decorations are rasterized locally.

Why this exists

HTML is a great medium for slide decks β€” layout, typography, animation, and complex visuals are all more flexible than in PowerPoint. But delivery often requires .pptx, and most "HTML β†’ PPT" tools flatten each page into a single image, leaving text uneditable, unsearchable, and pixelated when zoomed.

html-to-pptx avoids the "whole-page screenshot" route. It decomposes HTML into objects PowerPoint understands: text becomes editable textboxes; simple geometry becomes native shapes / lines; effects PPT can't express natively (gradients, shadows, filters, blend modes) are snapshotted locally and placed as a decoration layer behind the vector text.

The result: the output stays close to the HTML source while remaining searchable, editable, and rescalable in PowerPoint / WPS β€” not a stack of immutable images.

Gets better with use

Each install keeps a private references/lessons-learned.md β€” seeded once from the committed template, then gitignored. When the audit loop turns up a generalizable HTML anti-pattern or OOXML boundary, the fix recipe gets appended there. Every subsequent convert re-reads the file, so decks sharing traits with ones you've already audited tend to land cleaner on the first pass.

The local copy is never overwritten by upstream β€” git pull updates the template, not your accumulated notes.

What it handles

Supports single-file HTML decks from beautiful-html-templates / guizang-ppt-skill / Reveal.js / hand-written decks / browser fullscreen pages, with automatic slide detection.

CSS β†’ PPT routing:

HTML element / CSSWhat it becomes in PPT
Text, rich text, color, size, tracking, line-height, alignmentEditable textboxes β€” searchable and scalable
Background color, border, border-radius, linesNative OOXML geometry
gradient, box-shadow, filter, backdrop-filter, mix-blend-mode, complex transformsLocal snapshot underlay; text still drawn on top as vector
SVG, images, canvasEmbedded directly
Google FontsSubset by characters actually used; CJK content auto-seeds Noto Sans SC / Noto Serif SC

For the full CSS coverage matrix, see references/supported-css.md.

Quick start (Claude Code)

Install

In a Claude Code session, just hand Claude the repo URL:

Install this skill for me: https://github.com/Hasasasa/claude-skill-html-to-pptx

Claude will git clone it into the right skills directory for your platform (macOS / Linux: ~/.claude/skills/; Windows: %USERPROFILE%\.claude\skills\) and walk you through installing Python 3.10+, Playwright, and dependencies. System-level steps will still ask for your confirmation.

Use

After install, ask in plain language:

Convert D:\path\to\deck.html to pptx

Full skill invocation rules, audit mode, and fix discipline are in SKILL.md.

Manual usage (without Claude Code)

If you're not using Claude Code, clone the repo and run the CLI directly.

Install

Requires Python 3.10+ and pip.

git clone https://github.com/Hasasasa/claude-skill-html-to-pptx.git
cd claude-skill-html-to-pptx
pip install -r requirements.txt
python -m playwright install chromium

The visual audit step renders .pptx to PNG. Either of the following works:

  • Windows + Office
  • LibreOffice

requirements.txt already includes pywin32 (Windows-only) and pdf2image. For the LibreOffice route, you also need LibreOffice installed on the system; on Windows, pdf2image typically needs Poppler too. The .pptx itself still generates without a renderer β€” only the HTML/PPT side-by-side audit images are skipped.

Run

python convert.py path/to/deck.html

Output goes to path/to/deck.pptx next to the input. On first run, a working copy at path/to/deck.audited.html is created automatically; all subsequent audit fixes modify this copy, leaving the original HTML untouched.

Common flags:

FlagWhat it does
--out <path>Custom output .pptx path
--keep-screenshotsKeep per-slide HTML reference screenshots and measurement files
--install-user-fontsInstall non-CJK fonts into the user font directory so WPS / PowerPoint COM can render them
--no-embed-fontsSkip font embedding β€” smaller file but may fall back to system fonts on other machines
--no-preflightSkip the Stage 1 risk pre-scan
--no-verifySkip the Stage 5a structural self-check
--no-visual-auditSkip the Stage 5b visual audit material generation
--only-slides 2,7,12Re-run only the listed slides (incremental mode for audit iteration)
--cleanupClean up audit / measurement / preflight intermediate artifacts

Tests

Regression tests cover OOXML invariants (assemble), font-resolver caching semantics, and browser-based measure/discovery checkpoints (auto-skipped if Playwright/Chromium is unavailable):

python -m pytest tests -q

More demos

Each pair: HTML rendering on the left, html-to-pptx output (rendered in PowerPoint) on the right.

Signal

Signal HTML renderingSignal PPT output
HTMLhtml-to-pptx output

Market Outlook

Market Outlook HTML renderingMarket Outlook PPT output
HTMLhtml-to-pptx output

OpenClaw β€” Human-AI Collaboration Framework

OpenClaw HTML renderingOpenClaw PPT output
HTMLhtml-to-pptx output

8-Bit Orbit

8-Bit Orbit HTML rendering8-Bit Orbit PPT output
HTMLhtml-to-pptx output

Apex Group (Bold Poster)

Bold Poster HTML renderingBold Poster PPT output
HTMLhtml-to-pptx output

Broadside

Broadside HTML renderingBroadside PPT output
HTMLhtml-to-pptx output

Pipeline

[1 preflight] -> [2 measure] -> [3 assemble] -> [4 embed fonts] -> [5a self check] -> [5b visual audit]
 preflight.py     measure.py      assemble.py     embed_fonts.py      self_check.py      visual_audit.py
  • preflight: scan for high-risk HTML/CSS patterns.
  • measure: probe the DOM with Playwright, extracting text, shape, media, and decoration records.
  • assemble: write OOXML β€” textbox / shape / media / snapshot.
  • embed_fonts: subset and embed fonts by characters actually used.
  • self_check: scan PPTX for structural risks and call the renderer to export per-slide PNGs.
  • visual_audit: generate HTML/PPT side-by-side images, contact sheet, audit index, and the review prompt.

Design principles

PrincipleWhat it means
Vector-firstText and simple geometry stay as native PPT objects β€” editable, searchable, scalable
Local fallbackOnly complex decorations go through the snapshot channel β€” no whole-page rasterization
Portable fontsGoogle Fonts auto-resolved and subset-embedded to reduce cross-machine drift
AuditablePer-slide HTML/PPT comparison material lets visual issues be located and iterated
Source-preservingA .audited.html working copy is created automatically; the original HTML is never modified

Further reading

Files in the repo

Repository payloadβ€’12 top-level entries
  • assets
  • references
  • scripts
  • tests
  • .config.local.toml.example
  • .gitignore
  • convert.py
  • LICENSE
  • README.md
  • README.zh-CN.md
  • requirements.txt
  • SKILL.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications β€” runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k