Skip to content
Back to skills

Docx To Md

ASecurity

将Word文档(.docx)转换为Markdown格式并提取图片。使用此技能当用户需要:(1)将Word文档转换为Markdown格式,(2)从Word文档中提取图片,(3)同时完成文档格式转换和图片提取任务。

  • 16 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added June 7, 2026
toolspythonbash

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

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

Scanned June 7, 2026

npx -y skills add modbender/skill-library-mcp --skill docx-to-md --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docx To Md?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docx To Md
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-docx-to-md/badge)](https://www.skillsdirectory.com/skills/modbender-docx-to-md)

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

Download with Pro
SKILL.md
---
name: docx-to-md
description: 将Word文档(.docx)转换为Markdown格式并提取图片。使用此技能当用户需要:(1)将Word文档转换为Markdown格式,(2)从Word文档中提取图片,(3)同时完成文档格式转换和图片提取任务。
---

# docx-to-md

将Word文档(.docx)转换为Markdown格式,并提取文档中的图片到指定目录。

## 使用方法

运行脚本进行转换:
```python
import sys
sys.path.insert(0, '<skill目录>/scripts')
from docx_to_md import docx_to_md

docx_to_md('输入文件.docx', '输出目录')
```

或在命令行运行(需手动处理参数转义):
```bash
python <skill路径>/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

```bash
pip install python-docx
```

Files in this skill

  • SKILL.md1.3 KB
  • scripts/docx_to_md.py4.7 KB

Attribution

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

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.