export-pdf
Installation
SKILL.md
Export PDF
Produce a PDF from an HTML artifact. Uses puppeteer's Page.pdf() which is lossless vector when the source is HTML/CSS/SVG.
Why puppeteer instead of Chrome DevTools MCP: the MCP does not expose Page.printToPDF directly (only take_screenshot, list_console_messages, evaluate_script, etc.). Using puppeteer via a Node script is deterministic and matches /export-pptx.
Preflight
Bash(which node)— requiredBash(test -d node_modules/puppeteer && echo yes || echo no)— if no, tell user/doctoror runnpm i -D puppeteer
Steps
- Resolve paths:
$0= input HTML (required)$1= output (default: input with.pdfextension)Bash(mkdir -p $(dirname <output>))if needed