Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

html-to-pptx

ASecurity

把已有的幻灯片式 HTML(报告 / deck / dashboard)转成**真可编辑**的 PowerPoint .pptx—— 每段文字、每个表格单元格、每个色块、每根图表柱子都是 PPT 原生形状(DrawingML), 可以在 PowerPoint 里直接改字改色,不是把整页截成一张图。用真实无头 Chrome 渲染取布局, 保真度高。当用户说「把 HTML 转成 PPT」「html 转 ppt」「导出成 pptx」「生成可编辑的 PowerPoint」「把这个报告 / 幻灯片 / dashboard 做成 PPT」,或 "html to pptx"、 "convert this HTML to PowerPoint"、"export the deck as an editable ppt" 时使用。 最适合固定画布、每页一屏的 deck,长滚动报告也能自动分页。 ❌ 不用于从零新做一套 HTML 幻灯片——本 skill 只转已经存在的 HTML。

2 stars
0 votes
0 copies
0 views
Added 9/22/2026
datapythongobashnodegit

Security Analysis

A100/100

Pro scans all 19 files and shows the line behind each finding

Scanned 9/22/2026

$npx -y skills add yuna78/html-to-pptx --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of html-to-pptx?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for html-to-pptx
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/yuna78-html-to-pptx/badge)](https://www.skillsdirectory.com/skills/yuna78-html-to-pptx)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: html-to-pptx
description: >-
  把已有的幻灯片式 HTML(报告 / deck / dashboard)转成**真可编辑**的 PowerPoint .pptx——
  每段文字、每个表格单元格、每个色块、每根图表柱子都是 PPT 原生形状(DrawingML),
  可以在 PowerPoint 里直接改字改色,不是把整页截成一张图。用真实无头 Chrome 渲染取布局,
  保真度高。当用户说「把 HTML 转成 PPT」「html 转 ppt」「导出成 pptx」「生成可编辑的
  PowerPoint」「把这个报告 / 幻灯片 / dashboard 做成 PPT」,或 "html to pptx"、
  "convert this HTML to PowerPoint"、"export the deck as an editable ppt" 时使用。
  最适合固定画布、每页一屏的 deck,长滚动报告也能自动分页。
  ❌ 不用于从零新做一套 HTML 幻灯片——本 skill 只转已经存在的 HTML。
tags: [ppt, pptx, html, powerpoint, presentation, export, editable]
license: MIT
---

# html-to-pptx — HTML 转可编辑 PowerPoint

管线:`HTML → 真实浏览器渲染取布局 → 可编辑 SVG 图元 → 原生 DrawingML → .pptx`

完整文档见 [`README.md`](./README.md)(中文)/ [`README.en.md`](./README.en.md);
引擎内部机制见 [`docs/how-it-works.md`](./docs/how-it-works.md)。本文件是给 agent 看的操作要点。

## 什么时候用

- ✅ 用户已有 HTML 报告 / 幻灯片 / dashboard,想要能继续改的 `.pptx`。
- ✅ 固定画布、每页一屏(任意尺寸:1280×720、1600×900……都行)。
- ✅ 长滚动报告——会自动按语义块分页。
- ❌ 用户想**从零新做**一套幻灯片 → 那是做 deck 的 skill 的活。
- ❌ 用户想要**每页一张 AI 出图**的图片式 PPT → 用图片 deck 类 skill。
- ❌ 输入是 PDF → 用 `pdf-to-pptx` skill。

## 用法

一律走包装脚本,它会自举环境再转换:

```bash
H2P="$HOME/.claude/skills/html-to-pptx/bin/html-to-pptx"

# 默认:产物与来源 HTML 同目录同名
"$H2P" /path/to/report.html

# 指定输出文件或目录
"$H2P" /path/to/report.html -o /path/to/deck.pptx

# 画布尺寸默认实测,可强制指定
"$H2P" /path/to/deck.html --canvas 1600x900

# 逃生口:某个变换帮了倒忙时
"$H2P" deck.html --no-prepare      # 原样交给引擎
"$H2P" deck.html --no-reshape      # 保留 prepare,不做表格/富文本重整
"$H2P" deck.html --no-pseudo       # 不物化 ::before / ::after
"$H2P" deck.html --keep-prepared   # 留下中间 HTML 便于排查
"$H2P" deck.html --chrome "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
```

**产物位置约定**:不带 `-o` 时,`.pptx` 写到**来源 HTML 的同目录、同文件名**。
转完把绝对路径告诉用户,并用 `SendUserFile` 把文件发过去。

## 环境依赖

| 依赖 | 缺了会怎样 |
|---|---|
| **Node.js ≥ 22** | `node: command not found` / 提示没有全局 WebSocket |
| **Google Chrome / Chromium** | 转换失败、找不到 chrome |
| **Python ≥ 3.11**(首次自动建 venv) | `ModuleNotFoundError` |
| **中文字体**(中文 deck) | 中文变方框(macOS 罕见) |

一键自检,缺什么直接给安装命令:

```bash
"$HOME/.claude/skills/html-to-pptx/bin/html-to-pptx" --doctor
```

## 转换替你做的事(都可单独关掉)

1. **切页**——给 `.slide` / `.cover` 打分页标记;滚动报告按块边界切页,超长表格按行拆页
   并重复表头,**一行都不丢**。
2. **画布探测**——实测首页尺寸并同步 PPTX 页面大小。
3. **版式重整**——修三种会丢内容的 HTML 形状:多行表格单元格、`<div>` 里的 `<b>`、`<br>` 换行。
4. **图表离线化**——ECharts 的 CDN 标签换成内置 bundle,零出网也出图。
5. **渐变与伪元素**——CSS 渐变拍平成代表色;`::before` / `::after` 的圆点、角标、字形物化成真形状。
6. **交互控件**——分段筛选、tab、`<select>` 压成当前选中值。

## 排查

| 现象 | 怎么办 |
|---|---|
| `node: command not found` | 装 Node.js ≥ 22(`brew install node`) |
| 找不到 Chrome | 装 Chrome,或 `--chrome <路径>` |
| `ModuleNotFoundError: pptx` | 用 `bin/html-to-pptx`,它会自建 venv |
| 只出了 1 页 | 没识别到分页结构;确认是幻灯片式,或让 prepare 分页(默认开) |
| 多行并成一段 / `<b>` 的字不见了 / 多行黏一行 | 重整被关了(`--no-reshape`),或该表没判为密排 |
| 列宽走形 | 该 deck 用 `<col width>` 定列宽;改成写在单元格上 |
| 图表变黑 | 填色来自被剥离的 CSS 变量——通常已被补丁覆盖,可提 issue |
| 中文变方框 | 装中文字体 |

## 仓库

本 skill 同时是开源仓库 <https://github.com/yuna78/html-to-pptx>(MIT)。
它首先是一个**通用命令行工具**(`bin/html-to-pptx`,终端 / CI / 任何脚本都能调,不依赖 Claude),
其次才是 agent skill;`SKILL.md` 是标准 skill 描述文件,任何支持 skill 或外部命令的 agent 都能用。
改动这里的文件就是改仓库,改完记得 push。

Attribution

yuna78yuna78
View sourceSee grades on GitHubMore from yuna78 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Rank Tracker

This skill helps you track, analyze, and report on keyword ranking positions over time. It monitors both traditional SERP rankings and AI/GEO visibility to provide comprehensive search performance insights.

1821 votes

Youtube Competitor Analyzer

Find and analyze YouTube competitor channels using YouTube Data API v3. Discover competitors through keyword search, category matching, content similarity, and related channel discovery. Compare metrics, content strategies, and market positioning. Use when users want to (1) Find competitors for their YouTube channel, (2) Analyze competitor performance metrics, (3) Compare their channel against competitors, (4) Identify content gaps and opportunities, (5) Benchmark against similar creators, (6...

31 votes

Xlsx

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the...

1798860 votes

Weather Fetcher

Instructions for fetching current weather temperature data for Karachi, Pakistan from wttr.in API

671710 votes

Weather

Get current weather and forecasts (no API key required).

486960 votes
View all in data →