/export-presentation:export-presentationfrom export-presentation
Exports HTML slide presentations to PDF or PNG using browser automation. Detects available tools (agent-browser, Playwright, Chrome DevTools MCP) and assembles PDFs with img2pdf or ImageMagick.
Ships in export-presentation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Export HTML slide presentations (built with slides-presentation) to PDF or PNG screenshots using browser automation.
Check for available browser tools in this priority order. Use the first one found and read its reference doc for tool-specific commands:
| Priority | Tool | How to detect | Reference |
|---|---|---|---|
| 1 | agent-browser CLI | which agent-browser | references/browser-agent-browser.md |
| 2 | Claude in Chrome MCP | MCP tools mcp__claude-in-chrome__* available | references/browser-claude-in-chrome.md |
| 3 | Playwright | which playwright or npx playwright --version, or MCP tools available | references/browser-playwright.md |
| 4 | Chrome DevTools MCP | MCP tools mcp__chrome-devtools__* available | references/browser-chrome-devtools.md |
If no browser tool is found, stop and tell the user which tools are supported with links to install them. Recommend agent-browser as the simplest option.
Read the reference doc for the detected tool before proceeding — it contains the exact commands for navigation, screenshots, and viewport configuration.
Before starting the (slow) screenshot loop, validate everything upfront:
data-slide attributes to count slides. If no data-slide attributes found, warn the user this may not be a slides-presentation deckpython3 -c "import img2pdf" (preferred — lossless PNG embedding)which magick or which convert (ImageMagick fallback)pip install img2pdfFor PDF assembly details, see references/pdf-assembly.md.
If given a URL: Use it directly. Skip to Step 4.
If given a file path: Start a local HTTP server automatically:
bash scripts/serve-local.sh /path/to/presentation.html
The script outputs the URL and PID. Use the URL for browser navigation. The PID is needed for cleanup in Step 7.
Read the HTML file and count data-slide attributes:
grep -c 'data-slide=' presentation.html
Or parse more precisely for data-slide="N" to get the exact count. Slides are zero-indexed (data-slide="0" through data-slide="N-1"), so slide count = max index + 1.
Using the detected browser tool's commands (from its reference doc):
1920x1080 (16:9, matching presentation aspect ratio)screenshots/ in the output location)slide-01.pngArrowRight to advance0.5s for the CSS transition to completeslide-NN.png (zero-padded, 1-indexed filenames)Report progress as you go (e.g., "Captured slide 5 of 20").
PDF mode (default):
Assemble all screenshots into a single PDF. See references/pdf-assembly.md for the exact commands.
Output filename: <input-basename>.pdf in the same directory as the HTML file (or current directory if URL input).
Images-only mode:
If the user requested images only, skip PDF assembly. The screenshots directory is the final output.
Exported 20 slides to presentation.pdf
slides-presentation template (uses data-slide attributes for navigation)scripts/serve-local.sh <file.html> — Starts a local HTTP server bound to 127.0.0.1 on an available port. Outputs the full URL and server PID. Serves from the directory containing the HTML file.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jtsternberg/claude-plugins --plugin export-presentation