← 返回 Skills 市场
1011
总下载
0
收藏
8
当前安装
1
版本数
在 OpenClaw 中安装
/install docx-to-md
功能描述
将Word文档(.docx)转换为Markdown格式并提取图片。使用此技能当用户需要:(1)将Word文档转换为Markdown格式,(2)从Word文档中提取图片,(3)同时完成文档格式转换和图片提取任务。
使用说明 (SKILL.md)
docx-to-md
将Word文档(.docx)转换为Markdown格式,并提取文档中的图片到指定目录。
使用方法
运行脚本进行转换:
import sys
sys.path.insert(0, '\x3Cskill目录>/scripts')
from docx_to_md import docx_to_md
docx_to_md('输入文件.docx', '输出目录')
或在命令行运行(需手动处理参数转义):
python \x3Cskill路径>/scripts/docx_to_md.py "文件.docx"
参数
input_file: Word文档路径(.docx)output_dir: 输出目录(可选,默认创建同名_output文件夹)
输出
*.md: 转换后的Markdown文件image_*.png/jpg/gif: 提取的图片文件
转换规则
| Word格式 | Markdown |
|---|---|
| 标题1 | # 标题 |
| 标题2 | ## 标题 |
| 标题3 | ### 标题 |
| 标题4 | #### 标题 |
| 无序列表 | - 内容 |
| 有序列表 | 1. 内容 |
| 表格 | Markdown表格 |
| 图片 |
依赖
- Python 3.7+
- python-docx
pip install python-docx
安全使用建议
This skill appears coherent and safe for its stated purpose. Before installing/using: (1) ensure you have python 3.7+ and install python-docx (pip install python-docx); (2) run it on .docx files you trust or in a controlled output directory (it will create an <basename>_output folder or use the provided output path and write image_*.png/jpg files and a .md file); (3) be aware it writes files to disk and may overwrite files in the chosen output directory — pick a safe location. If you want extra assurance, inspect scripts/docx_to_md.py yourself; it contains no network calls or credential handling.
功能分析
Type: OpenClaw Skill
Name: docx-to-md
Version: 1.0.0
The skill bundle is classified as suspicious due to potential vulnerabilities, not clear malicious intent. The `SKILL.md` provides a command-line execution example which, if not properly sanitized by the OpenClaw agent, could lead to shell injection. Additionally, the `scripts/docx_to_md.py` script uses `zipfile.ZipFile.extract` to process DOCX files; this operation is susceptible to a Zip Slip vulnerability if a specially crafted DOCX file contains path traversal sequences, potentially allowing files to be written outside the intended output directory. There is no evidence of intentional data exfiltration, persistence, or other malicious activities by the skill author.
能力评估
Purpose & Capability
The SKILL.md and the included scripts/docx_to_md.py implement the described functionality: extracting media from the .docx ZIP (word/media/) and converting document content to Markdown using python-docx. There are no unrelated credentials, binaries, or external services requested.
Instruction Scope
Runtime instructions only reference the input .docx path and an output directory. The code reads the provided .docx, extracts files under 'word/media/' into the output directory and writes a Markdown file — behavior consistent with the documented scope. The SKILL.md does not instruct reading other system files or transmitting data externally.
Install Mechanism
There is no install spec; this is instruction/code-only. The only dependency is python-docx (documented in SKILL.md with a pip install command). No remote download URLs or archive extraction from arbitrary hosts are used.
Credentials
No environment variables, credentials, or config paths are required. The skill operates on user-supplied file paths only, which is proportionate to its purpose.
Persistence & Privilege
always is false and the skill does not request persistent global privileges or modify other skills/configs. It writes output files only into the specified output directory.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install docx-to-md - 安装完成后,直接呼叫该 Skill 的名称或使用
/docx-to-md触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of docx-to-md.
- Convert Word (.docx) documents to Markdown format.
- Extract images from Word documents to a specified directory.
- Supports headings, lists, tables, and image conversion.
- Provides both Python function and command-line usage.
- Includes detailed usage instructions and conversion rules.
元数据
常见问题
docx-to-md 是什么?
将Word文档(.docx)转换为Markdown格式并提取图片。使用此技能当用户需要:(1)将Word文档转换为Markdown格式,(2)从Word文档中提取图片,(3)同时完成文档格式转换和图片提取任务。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1011 次。
如何安装 docx-to-md?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install docx-to-md」即可一键安装,无需额外配置。
docx-to-md 是免费的吗?
是的,docx-to-md 完全免费(开源免费),可自由下载、安装和使用。
docx-to-md 支持哪些平台?
docx-to-md 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 docx-to-md?
由 ooliuhao(@ooliuhao)开发并维护,当前版本 v1.0.0。
推荐 Skills