/frontend-ui:zan-html-to-pptfrom frontend-ui
Converts HTML horizontal-flip decks (from guizang-ppt-skill) into deck.pdf and deck.pptx using Playwright screenshots. Useful for offline presentations, accelerator/judge uploads, or printing.
Ships in frontend-ui. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
把 guizang-ppt-skill 出来的横向翻页 HTML deck 转成线下能用的 PDF + PPTX。 原理:Playwright 控 Chromium 逐页截图,封装成多页 PDF(pdf-lib)和图片型 PPTX(pptxgenjs)。
输入一个 guizang-ppt-skill 风格的 HTML deck(横向翻页、单文件、<section class="slide"> 结构),产出三份离线演示资产:
<out>/deck.pdf —— 多页 PDF,每页 16:9 满版。投影 / Preview / Acrobat 直接全屏播。<out>/deck.pptx —— 每页一张 PNG 满版背景的 PPTX(图片型)。可上传任何 PPT 平台。<out>/frames/slide-NN.png —— 每页原始 PNG,默认 5760×3240(--scale 3)。向用户问清:
http://localhost:8810/deck//path/to/deck/index.html(skill 自动起 server)index.html)./out,建议建一个新目录避免覆盖旧产物)--scale 3 出 5760×3240 超清;文件嫌大可降到 --scale 2)bash <SKILL_ROOT>/scripts/setup.sh
幂等。首次跑会装 npm 依赖 + Chromium(~150MB,1–2 分钟,告诉用户在装别静默等);之后秒过。
node <SKILL_ROOT>/scripts/build.mjs <input> --out <output-dir>
参数:
| 参数 | 默认 | 说明 |
|---|---|---|
<input> | 必填 | URL / 本地 HTML 文件 / 本地目录 |
--out <dir> | ./out | 输出目录 |
--width <px> | 1920 | CSS 视口宽(影响布局基准) |
--height <px> | 1080 | CSS 视口高 |
--scale <n> | 3 | deviceScaleFactor。3 出片 5760×3240(超清);糊就保持 3,文件嫌大降到 2 |
--wait <ms> | 2500 | 每页 settle 的上限(不是固定睡这么久)。low-power 下入场动画被关,通常 ~300ms 就截完;只有动画/字体没跑完才会等到这个上限。某页缺内容就调大 |
--format pdf,pptx | 都出 | 输出格式(逗号分隔) |
成功输出长这样:
🌐 http server :60199 root=/path/to/web
📍 Open: http://localhost:60199/deck/
📐 Viewport 1920×1080 · scale=3× (出片 5760×3240) · wait=2500ms · out=/path/to/out
🎞 8 slides
✓ 1/8
✓ 2/8
...
📄 deck.pdf
📊 deck.pptx
✅ Done → /path/to/out/
告诉用户:
<out>/deck.pdf 路径<out>/deck.pptx 路径🎞 N slides)<out>/frames/slide-NN.png用户:
把我这个 deck 转成 PPT ——
/Users/X/web/deck/index.html,输出到~/Downloads/2026q4-pitch/
你(Agent):
# 1. 首次装依赖(之后秒过)
bash <SKILL_ROOT>/scripts/setup.sh
# 2. 跑
node <SKILL_ROOT>/scripts/build.mjs /Users/X/web/deck/index.html --out ~/Downloads/2026q4-pitch/
看到脚本输出 🎞 8 slides … ✅ Done,然后回报用户:
转好了 ✅ —— 8 页全部捕获。
- PDF:
~/Downloads/2026q4-pitch/deck.pdf(投影 / Preview 直接全屏播)- PPTX:
~/Downloads/2026q4-pitch/deck.pptx(上传任何 PPT 平台)- 调试单页 PNG 在
~/Downloads/2026q4-pitch/frames/
用户嫌文件大(PPTX > 10M)→ 加 --scale 2 重跑,文件降一半。
用户说某页内容空(文字 / 卡片没出来)→ 加 --wait 4000,让入场动画跑完再截。
build.mjs 检测 HTML 里的 <base href="/X/">,从 fileDir 向上走 X 一级当服务根(例 <base href="/deck/"> → 服务 deck 父级,URL = /deck/)。这样图片路径才解析得对。B(guizang 内建快捷键)关动效,WebGL 背景仍保留一帧。document.querySelectorAll('#nav .dot')[i].click() —— 用 deck 自身的导航点,不模拟键盘(键盘事件容易被 SPA 吃掉)。document.getAnimations() 到没有 running 动画才截,封顶 --wait。low-power 下入场动画被关 → 几乎立刻返回(每页 ~300ms,不再死等 2.5s);只有动画/字体真没跑完才会等到上限。document.fonts.ready + networkidle + 1.5s 给 WebGL 暖机,字体才渲染对。⚠️ N/M 失败:[...],已成功的页照常拼进 PDF/PPTX;全失败才退出。--width/--height 比例推导(高 7.5in × W/H),16:9 仍是 13.333×7.5,但 4:3 / 方形 / 竖版 deck 也不会被拉变形。| 现象 | 原因 | 改 |
|---|---|---|
| 帧内容缺 / 一片空白 | stagger 没跑完 | --wait 4000 或更大 |
| 字体没渲染对 | Google Fonts 没下完 | --wait 4000 + 确认有网 |
| 某页排版漂 | 视口和 deck 设计基准不一致 | --width 1920 --height 1080(guizang 设计基准) |
| 本地 HTML 图片 404 | <base href> 路径错 | 给 skill 整个目录,不要单文件 |
| Chromium 启不来 | 没装 | 重跑 bash scripts/setup.sh |
| 帧还是糊 | scale 太小 | --scale 4(文件会更大) |
| 文件太大 | scale 过大 | --scale 2(出片 3840×2160,体积降一半) |
zan-html-to-ppt/
├── SKILL.md ← 你正在读
├── README.md ← GitHub 主页给人看的(含核心设计原则 / Roadmap)
├── LICENSE ← MIT
├── .gitignore
└── scripts/
├── package.json ← 依赖:playwright + pdf-lib + pptxgenjs
├── package-lock.json
├── setup.sh ← 一键装依赖(幂等)
└── build.mjs ← 主脚本(单文件搞定截图 + PDF + PPTX)
输入端依赖 guizang-ppt-skill 生成的 HTML 结构。具体依赖的 API:
<section class="slide"> 是页面容器#nav .dot[i] 是页码导航点(用于跳转)B 切静态模式document.fonts.ready Web Fonts API只要 deck 满足上面这套结构,就能转。完整的设计哲学 + v0.2 / v0.3 计划见 README.md。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub skillmds/skillmd --plugin frontend-ui30 skills in this plugin
/ads-landingAudit paid-ad landing pages for message match, mobile experience, performance, accessibility, trust, forms, consent, tracking, security, and conversion friction. Use for landing-page audit, post-click experience, LP audit, conversion-rate optimization, form optimization, ad-to-page message match, redirects, blocked navigation, or requests involving private, loopback, link-local, or metadata IP destinations./ads-reportRender Markdown, HTML, or PDF paid-advertising reports from a validated Claude Ads JSON run bundle. Use for ads report, client report, audit PDF, executive audience reporting, or exporting prior audit and plan results./dark-modeImplement complete dark mode for any frontend project. Auto-detects theme system (Flutter ThemeData, Tailwind dark class, CSS variables, MUI, Chakra UI, styled-components), generates a dark color palette with proper surface elevation hierarchy and desaturated brand colors, creates a theme toggle with system preference detection and persistence, migrates all hardcoded colors to theme tokens, handles special cases like images, shadows, form inputs, and charts, then verifies WCAG AA contrast ratios for both modes. Use when you need to add dark mode, fix dark theme contrast issues, create a theme switcher, or migrate hardcoded colors to theme-aware tokens./dbs-wechat-html微信公众号 HTML 生成。把 Markdown 转成可粘贴到微信公众号后台的 HTML,内置 15 种经典媒体/科技产品/中文公众号风格。
触发方式:/dbs-wechat-html、/公众号HTML、「生成公众号 HTML」「做微信公众号版本」「微信排版」
WeChat Official Account HTML generator. Converts Markdown into WeChat-ready HTML with 15 built-in publishing styles.
/deck-simple通用 horizontal-swipe HTML deck, 不要 magazine 调/design-taste-frontend-v1The original v1 taste-skill, preserved for projects depending on its exact behavior. The current default is `design-taste-frontend` (v2 experimental), which is a substantial rewrite. Use this v1 install name only if you need exact backward compatibility.2 plugins in one repository ship this exact skill · first indexed Oct 4, 2026
Other plugins' skills for the same job