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

  1. Bash(which node) — required
  2. Bash(test -d node_modules/puppeteer && echo yes || echo no) — if no, tell user /doctor or run npm i -D puppeteer

Steps

  1. Resolve paths:
    • $0 = input HTML (required)
    • $1 = output (default: input with .pdf extension)
    • Bash(mkdir -p $(dirname <output>)) if needed
Related skills
Installs
9
GitHub Stars
82
First Seen
13 days ago