Bibek KC

DOCX TO HTML CONVERTER

办公效率v1.0.0
作者:Bibek KC更新于 2026-05-11docx-to-html@clawhub_bibekyess/docx-to-html
文档处理#Browser#Document

据 AlphaMoat 统计,截至 2026-09,DOCX TO HTML CONVERTER 累计下载 872 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 5,066 位,在「办公效率」分类(435 个)中排名第 433 位。

累计安装
106
累计下载
872
星标
-
全站排名
#5,066
全站前 100% · 「办公效率」前 100%
平台累计安装累计下载星标评论
ClawHub ↗21847--
SkillHub ↗106872-—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文描述使用 Python 包装脚本和 Node.js 的 mammoth 转换文档结构、表格、列表与图像,再用于浏览器查看、摘要、问答、索引或数据提取。转换可能保留文档全文、嵌入图片和活动链接;只处理获准的文档,并将输出保存在受控位置。生成的 HTML 可能未经清理,不应未经审核或净化就嵌入应用或公开提供。

资料发布于 2026-10-29

可以用来做什么

  • 提取 DOCX 中的标题、表格和列表
  • 将文档转换为适合浏览器查看的 HTML
  • 准备文档内容用于索引或问答

什么时候用

  • 需要把 DOCX 转换为 HTML 或提取结构化内容时
  • 文档已获准在当前工作区处理时
  • 生成的 HTML 在发布或嵌入前可以审核或净化时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

说明 DOCX 转换流程,但不要处理未获批准的文档
转换后提醒检查 HTML 是否含敏感内容和活动链接
在把输出嵌入应用前先列出需要净化的风险

月度数据趋势

累计下载872
2655919172026-03 · 累计下载 3102026-05 · 累计下载 4842026-06 · 累计下载 5702026-07 · 累计下载 7252026-08 · 累计下载 7782026-09 · 累计下载 87226-0326-09
星标-
0112026-03 · 星标 -2026-05 · 星标 -2026-06 · 星标 -2026-07 · 星标 -2026-08 · 星标 -2026-09 · 星标 -26-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-09872—-
2026-08778+7.3%-
2026-07725+27.2%-
2026-06570+17.8%-
2026-05484—-
2026-03310—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

3.7 KB · ClawHub v1.0.0
---
name: docx-to-html
description: "Use this skill whenever the user has a DOCX file (.docx) and wants to convert, read, view, extract content from, or process it in any way — including summarization, displaying in a browser, extracting tables or lists, or feeding into AI pipelines. Always use this skill for any task involving .docx files, even if the request seems simple. Triggers include: 'convert docx', 'open word file', 'read word document', 'extract tables from docx', or any mention of a .docx filename."
---

# DOCX to HTML Converter

This skill provides a straightforward method to convert Microsoft Word (.docx) documents into clean, semantic HTML, making them suitable for various web-based and AI-driven applications.

## Compatibility
展开全部(共 74 行)

- **Python 3** (for the conversion wrapper)
- **Node.js** with `mammoth` installed (core conversion engine)

To install Node.js dependencies, run once from the `scripts/` directory:
```bash
npm install
```

## Use Cases

- **Browser-Based Viewing**: Convert DOCX documents for display in web browsers without requiring Microsoft Word.
- **AI-Ready Content**: Prepare DOCX content for LLMs for tasks like summarization, Q&A, and semantic search.
- **Web Integration**: Integrate Word document content into web applications, CMS, or online editors.
- **Data Extraction**: Extract structured data (tables, lists, headings) from DOCX files for automated reporting and analysis.
- **Search and Indexing**: Enable full-text and vector search by converting DOCX content into easily indexable HTML.

## Workflow

1. **Locate DOCX File**: Identify the path to the `.docx` file to convert.

2. **Run Conversion Script**: Execute the Python wrapper from the skill's `scripts/` directory:
   ```bash
   python3 <skill-dir>/scripts/convert.py <input_path.docx> <output_path.html>
   ```
   Replace `<skill-dir>` with the actual path where this skill is installed.

3. **Verify Output**: Open the generated `.html` file in a browser and check:
   - Headings (`<h1>`, `<h2>`, etc.) appear at the correct hierarchy levels
   - Tables render with the expected rows and columns
   - Lists appear as bullet or numbered items (not plain text)
   - Bold, italic, and inline formatting are preserved
   - Images are visible (embedded as base64 by default)

4. **Process HTML**: Use the resulting HTML for further tasks like summarization, indexing, or display.

## Bundled Resources

- `scripts/docx-converter.js`: Core Node.js conversion logic using `mammoth.js`.
- `scripts/convert.py`: Python wrapper for invoking the Node.js converter.
- `scripts/package.json`: Node.js dependency manifest (includes `mammoth`).

## Technical Details

The conversion leverages `mammoth.js`, which prioritizes semantic meaning over visual replication:

- **Semantic Conversion**: Document structure maps to proper HTML — headings become `<h1>`/`<h2>`, lists become `<ul>`/`<ol>`, etc.
- **Basic Styling**: Bold, italics, and common paragraph styles are preserved.
- **Image Embedding**: Images are extracted and embedded as base64 data URIs in the HTML output.

## Troubleshooting

| Problem | Likely Cause | Fix |
|---|---|---|
| `node: command not found` | Node.js not installed | Install Node.js (v16+) |
| `Cannot find module 'mammoth'` | npm deps missing | Run `npm install` in `scripts/` |
| Empty or garbled output | Corrupted or password-protected DOCX | Try re-saving the file from Microsoft Word |
| Missing images | Large embedded images | Check `mammoth.js` image size limits in `docx-converter.js` |

## Limitations

- Advanced or highly specific styling from the original DOCX may not be perfectly replicated in the HTML output.
- Features like tracked changes, comments, or complex layout elements may be simplified or omitted.

「办公效率」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。