← 返回 Skills 市场
kaisersong

Kai Html Export

作者 Kaiser · GitHub ↗ · v1.2.0 · MIT-0
darwinlinuxwindows ✓ 安全检测通过
394
总下载
1
收藏
0
当前安装
10
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

\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
安全使用建议
This skill appears internally consistent with its description: it uses Playwright to render HTML, python-pptx to assemble slides, and optional helpers to publish via Cloudflare Pages or Vercel. Before installing, consider: (1) dependencies — it will install Python packages and may download Playwright's browser if no system Chrome/Edge/Brave is available; (2) publishing requires Node/CLI tools and an interactive login (wrangler / vercel) and will upload staged files — don't publish anything containing secrets or private credentials; (3) the share helper runs external subprocesses (wrangler, npx vercel) and uses temporary staging directories — review scripts/share-html.py and the deploy scripts if you need to confirm sandbox-detection or want to audit exact behavior; (4) the scanner found a 'base64-block' pattern in SKILL.md (likely a false positive) — if you are obtaining this skill from an untrusted source, inspect SKILL.md and the code for any unexpected embedded payloads. If you trust the repository and only use export features locally (not publishing), the risk is limited and proportionate.
功能分析
Type: OpenClaw Skill Name: kai-html-export Version: 1.2.0 The kai-html-export skill bundle is a legitimate tool for converting HTML content into PPTX or PNG formats and publishing it to Cloudflare Pages or Vercel. The scripts (e.g., scripts/export-native-pptx.py and scripts/share-html.py) use Playwright and python-pptx to reconstruct web content into document formats. Notably, the bundle includes security-conscious features such as sandbox detection in scripts/share-html.py to prevent unauthorized deployments from cloud environments and path traversal protections in the asset staging logic of the deployment scripts. No evidence of malicious intent, data exfiltration, or unauthorized remote control was found.
能力评估
Purpose & Capability
Name and description match the code and install: Python + playwright + python-pptx + bs4 + lxml are appropriate for screenshotting, DOM parsing, and assembling PPTX. The presence of Cloudflare/Vercel deploy helpers matches the 'share HTML' feature documented in SKILL.md.
Instruction Scope
SKILL.md instructs the agent to run the bundled Python scripts (export-pptx.py, export-native-pptx.py, screenshot.py, share-html.py). Those scripts perform browser automation, local file staging, and may invoke external CLIs (wrangler / vercel via npx) when publishing. This behavior is expected for the stated share/export features, but note the share helper will run external commands and upload staged files to third-party services when you invoke it.
Install Mechanism
Dependencies are standard Python packages (python-pptx, playwright, beautifulsoup4, lxml) installed via package manager (uv/pip). No arbitrary URL downloads, executable installers, or extracted archives from personal servers are used in the install spec.
Credentials
The skill declares no required environment variables or credentials. The deploy helpers rely on external CLIs (wrangler/vercel) and interactive login flows rather than embedding or requesting credentials in environment variables, which is proportionate to optional publishing functionality.
Persistence & Privilege
The skill does not request always:true and has no special persistence or system-wide configuration modifications. It runs as an opt-in, user-invoked skill and uses temporary staging directories for deploys.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kai-html-export
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kai-html-export 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
Added Cloudflare-first HTML sharing via share-html.py, kept Vercel fallback, and disabled auto-share in hosted sandboxes.
v1.1.7
Fix native mode images missing when wrapped in transparent animation divs (kd-reveal etc). Two bugs: (1) decorative-blob filter skipped entire subtrees containing images; (2) object-fit:contain/fill fell back to silent Playwright path. Also adds Brand Style Migration use case to README.
v1.1.6
Post-export thumbnail preview grid, PPTX structural validation, sandbox-safe browser launch (Chrome→Edge→Chromium→Playwright fallback, --no-sandbox on Linux), QA process docs in SKILL.md.
v1.1.5
Fix native mode image placement: 16:9 viewport, PIL pre-crop, non-cover fallback to screenshot
v1.1.3
- Bumped version to 1.1.3. - Updated SKILL.md to YAML multiline formatting for the description and improved metadata structure. - No functional or user-facing feature changes.
v1.1.2
Add native mode test coverage (TestNativeMode, 5 tests); total 26 tests
v1.1.1
kai-html-export 1.1.1 introduces native (fully editable) PPTX export: - Added native PPTX export mode: convert HTML slides to fully editable PowerPoint text, shapes, tables, and images - New script: export-native-pptx.py for native conversion - Expanded triggers to support Chinese phrases for export - Added dependencies: beautifulsoup4 and lxml for HTML parsing - Documentation updates for export modes and options
v1.0.2
kai-html-export 1.0.2 - Added comprehensive test suite, including sample HTML fixtures and tests for PPTX and PNG export functionality. - Updated documentation in SKILL.md to reflect current usage and features. - Improved reliability and coverage for PPTX export and screenshot scripts.
v1.0.1
- Added README.md with usage instructions and documentation. - Added README.zh-CN.md for Chinese language support.
v1.0.0
Initial release. Export any HTML to PPTX or PNG via headless browser. Works with kai-slide-creator, kai-report-creator, or any HTML file.
元数据
Slug kai-html-export
版本 1.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 10
常见问题

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。

💬 留言讨论