/install kai-html-export
\r \r
kai-html-export\r
\r Export any HTML file to PPTX or PNG using a headless browser, or publish it to a public URL. PPTX and PNG export need no Node.js; the optional share helper uses Cloudflare Pages by default and Vercel as a fallback. In hosted cloud sandboxes, automatic sharing is disabled and the helper prints manual-share guidance instead of starting a deploy flow.\r \r
Commands\r
\r
| Command | What it does |\r
|---------|-------------|\r
| /kai-html-export [file.html] | Export HTML presentation to PPTX (auto-detects slides) |\r
| /kai-html-export --pptx [file.html] | Explicit PPTX export |\r
| /kai-html-export --png [file.html] | Full-page screenshot to PNG |\r
| /kai-html-export --png --scale 2 [file.html] | 2× resolution screenshot |\r
| python3 \x3Cskill-path>/scripts/share-html.py [file.html|folder] | Publish HTML to a public URL (Cloudflare default) |\r
| python3 \x3Cskill-path>/scripts/share-html.py --provider vercel [file.html|folder] | Publish HTML to a public URL with Vercel |\r
\r
If no file is specified, use the most recently modified .html file in the current directory.\r
\r
Export to PPTX\r
\r Run the bundled script:\r \r
python3 \x3Cskill-path>/scripts/export-pptx.py \x3Cfile.html> [output.pptx] [--mode image|native] [--width 1440] [--height 900]\r
```\r
\r
### Export Modes\r
\r
**`--mode image`** (default):\r
- Pixel-perfect screenshots of each slide\r
- Visual fidelity: ⭐⭐⭐⭐⭐\r
- Editability: ❌ None (text is rasterized)\r
- Best for: archiving, sharing final presentations\r
\r
**`--mode native`** (new):\r
- Editable text, shapes, and tables\r
- Visual fidelity: ⭐⭐⭐ (simplified gradients, no shadows)\r
- Editability: ✅ Full text editing\r
- Best for: collaborative editing, content reuse\r
\r
Supported in native mode:\r
- Text (h1-h6, p): font size, color, bold, alignment\r
- Lists (ul, ol): bullet points\r
- Tables: editable cells\r
- Shapes (div with solid background): rectangles\r
- Images: native insertion\r
\r
Not supported in native mode (fall back to image):\r
- CSS gradients → solid color approximation\r
- Box shadows → omitted\r
- Custom web fonts → system fonts\r
- SVG graphics → rasterize to PNG\r
\r
## Export to PNG\r
\r
Run the bundled script:\r
\r
```bash\r
python3 \x3Cskill-path>/scripts/screenshot.py \x3Cfile.html> [output.png] [--width 1440] [--scale 2]\r
```\r
\r
- Captures the full page at the specified width\r
- `--scale 2` produces a 2× retina-quality image\r
- Useful for sharing reports or single-page HTML as images\r
\r
## Share HTML to a public URL\r
\r
Run the bundled helper:\r
\r
```bash\r
python3 \x3Cskill-path>/scripts/share-html.py \x3Cfile.html|folder>\r
python3 \x3Cskill-path>/scripts/share-html.py --provider vercel \x3Cfile.html|folder>\r
```\r
\r
- Accepts either a single HTML file or a folder containing `index.html`\r
- Copies common relative assets automatically when starting from a single file\r
- Uses Cloudflare Pages by default and keeps Vercel as an optional fallback\r
- Cloudflare is the recommended default for China-facing links\r
- Automatic sharing is disabled in hosted cloud sandboxes; the helper tells the user to share manually from a local machine instead\r
- Cloudflare requires `wrangler login` before first local use\r
- Vercel requires `npx vercel login` before first local use\r
\r
## Dependencies\r
\r
| Package | Purpose | Install |\r
|---------|---------|---------|\r
| `playwright` | Headless browser screenshots | `pip install playwright` |\r
| `python-pptx` | Assemble screenshots into PPTX | `pip install python-pptx` |\r
| Node.js + Wrangler / Vercel CLI | Optional live URL publishing | `wrangler login` or `npx vercel login` |\r
\r
No browser download needed if Chrome, Edge, or Brave is already installed. URL publishing is optional and separate from export.\r
\r
## QA Process\r
\r
After every native-mode export, assume something looks wrong until proven otherwise:\r
\r
1. **Preview grid** — the export automatically saves `{name}-preview.png` with thumbnails of slide 1, ~1/3, ~2/3, and last. Open it immediately: `open {name}-preview.png`\r
2. **Structural check** — if slide count mismatches or any slide is unreadable, the script prints `⚠` warnings\r
3. **Open PPTX** — for image issues or layout problems, open the PPTX in Keynote/PowerPoint to verify the render\r
4. **Re-export** — if visual quality is wrong, diagnose the root cause in the HTML before re-running\r
\r
## Works with any HTML\r
\r
Designed to work with output from:\r
- **kai-slide-creator** — HTML presentations with `.slide` elements\r
- **kai-report-creator** — Single-page HTML reports\r
- Any self-contained HTML file\r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install kai-html-export - 安装完成后,直接呼叫该 Skill 的名称或使用
/kai-html-export触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Kai Html Export 是什么?
Export any HTML file to PPTX or PNG, or publish HTML to a public share URL. Use when the user wants to convert an HTML presentation to PowerPoint, screenshot... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 394 次。
如何安装 Kai Html Export?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install kai-html-export」即可一键安装,无需额外配置。
Kai Html Export 是免费的吗?
是的,Kai Html Export 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Kai Html Export 支持哪些平台?
Kai Html Export 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux, windows)。
谁开发了 Kai Html Export?
由 Kaiser(@kaisersong)开发并维护,当前版本 v1.2.0。