Use when the user wants to export completed local HTML output directories to PDF, PNG, or WebP using Chromium/Playwright.
Especially use for adaptive-html-final outputs with CSS-only ahf-theme radios, :has() selectors, inline CSS, large SVG, no-JS constraints,
theme-by-theme screenshots, export manifests, HTML SHA stability checks, and browser-openable PDF/PNG/WebP links.
Trigger examples: "HTML PDF로 변환", "PDF/PNG/WebP export", "테마별 스크린샷", "PDF 링크 제공", "output 폴더 변환".
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Use when the user wants to export completed local HTML output directories to PDF, PNG, or WebP using Chromium/Playwright.
Especially use for adaptive-html-final outputs with CSS-only ahf-theme radios, :has() selectors, inline CSS, large SVG, no-JS constraints,
theme-by-theme screenshots, export manifests, HTML SHA stability checks, and browser-openable PDF/PNG/WebP links.
Trigger examples: "HTML PDF로 변환", "PDF/PNG/WebP export", "테마별 스크린샷", "PDF 링크 제공", "output 폴더 변환".
HTML Exporter
Build-time helper for exporting finished HTML output directories to PDF, PNG, and WebP without modifying the source HTML.
Core contract
Use Chromium/Playwright for rendering. Do not use WeasyPrint/wkhtmltopdf for :has() theme outputs.
Treat source HTML as read-only. Do not inject JS or write generated .html outside exports/.
Write artifacts only under <output_dir>/exports/{pdf,png,webp}/ plus <output_dir>/exports/export-manifest.json.
Request themes light,light2,white,dark,dark2,blue,skyblue,sepia by default; capture only DOM radios that exist: input[name="ahf-theme"]#ahf-<theme>.
Hide export controls at render time only: .ahf-themebar, .reading-progress, .skip, .ahf-color-audit.
Confirm regression safety from manifest: html_sha256_unchanged, sources_sha256_unchanged, validate_issues_unchanged.
Quick workflow
Identify the output directory, usually output/<name>.
If the project already has scripts/export_output.mjs, use it. Otherwise copy this skill's scripts/export_output.mjs into the project scripts/ directory.
localhost links for useful PDFs/PNGs when a local server is expected.
Common commands
# Default: pdf,png,webp + light,light2,white,dark,dark2,blue,skyblue,sepia
npm run export:output -- output/<dir> --clean
# PDF only
npm run export:output -- output/<dir> --formats pdf --clean
# Dark PNG only, lower scale
npm run export:output -- output/<dir> --formats png --themes dark --scale 1 --clean