读取 Word 文档(.docx 和 .doc 格式)并提取文本内容。支持文档解析、表格提取、图片处理等功能。使用当用户需要分析 Word 文档内容、提取文本信息或批量处理文档时。
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install word-reader或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install word-reader⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/word-reader/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: word-reader description: | 读取 Word 文档(.docx 和 .doc 格式)并提取文本内容。支持文档解析、表格提取、图片处理等功能。使用当用户需要分析 Word 文档内容、提取文本信息或批量处理文档时。 homepage: https://python-docx.readthedocs.io/ metadata: { "openclaw": { "emoji": "📄", "requires": { "bins": ["python3"], "env": ["PYTHONPATH"] }, "install": [ { "id": "pip", "kind": "pip", "package": "python-docx", "bins": ["python3"], "label": "Install python-docx (pip)", }, { "id": "system", "kind": "system", "command": "sudo apt-get install antiword -y", "label": "Install antiword for .doc support (optional)", "platform": "linux-debian" } ], }, } ---
使用 Python 解析 Word 文档,提取文本内容和结构化信息。
python3 {baseDir}/scripts/read_word.py <文件路径>
# JSON 输出
python3 {baseDir}/scripts/read_word.py <文件路径> --format json
# 纯文本输出
python3 {baseDir}/scripts/read_word.py <文件路径> --format text
# Markdown 格式
python3 {baseDir}/scripts/read_word.py <文件路径> --format markdown
# 只提取文本
python3 {baseDir}/scripts/read_word.py <文件路径> --extract text
# 提取表格数据
python3 {baseDir}/scripts/read_word.py <文件路径> --extract tables
# 获取文档元数据
python3 {baseDir}/scripts/read_word.py <文件路径> --extract metadata
# 处理目录下所有 .docx 文件
python3 {baseDir}/scripts/read_word.py <目录路径> --batch
| 参数 | 说明 | 默认值 | |------|------|--------| | --format | 输出格式(json/text/markdown) | text | | --extract | 提取内容类型(text/tables/images/metadata/all) | all | | --batch | 批量处理模式 | false | | --output | 输出文件路径 | stdout | | --encoding | 文本编码(utf-8/gb2312) | utf-8 |
{
"metadata": {
"title": "文档标题",
"author": "作者姓名",
"created": "2024-01-01T10:00:00",
"modified": "2024-01-01T12:00:00"
},
"text": "文档全文内容...",
"tables": [
[
["表头1", "表头2"],
["行1列1", "行1列2"],
["行2列1", "行2列2"]
]
],
"images": [
{
"filename": "image1.png",
"description": "图片描述",
"size": "1024x768"
}
]
}
# 文档标题
**作者**:作者姓名
**创建时间**:2024-01-01 10:00:00
## 正文内容
这是文档的正文内容...
### 表格示例
| 表头1 | 表头2 |
|-------|-------|
| 行1列1 | 行1列2 |
| 行2列1 | 行2列2 |

## 图片列表
1. **image1.png** (1024x768) - 图片描述
python3 {baseDir}/scripts/read_word.py 项目需求.docx --format markdown
python3 {baseDir}/scripts/read_word.py 会议记录.docx --extract text
python3 {baseDir}/scripts/read_word.py ./文档目录 --batch --format json --output results.json
pip3 install python-docx
对于 .doc 格式支持:
# Ubuntu/Debian
sudo apt-get install antiword
# macOS
brew install antiword
脚本会自动处理以下文档元素:
安装 Word Reader 后,可以对 AI 说这些话来触发它
Help me get started with Word Reader
Explains what Word Reader does, walks through the setup, and runs a quick demo based on your current project
Use Word Reader to read Word documents (
Invokes Word Reader with the right parameters and returns the result directly in the conversation
What can I do with Word Reader in my documents & notes workflow?
Lists the top use cases for Word Reader, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/word-reader/ 目录(个人级,所有项目可用),或 .claude/skills/word-reader/(项目级)。重启 AI 客户端后,用 /word-reader 主动调用,或让 AI 根据上下文自动发现并使用。
Word Reader 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Word Reader 可免费安装使用。请查阅仓库了解许可证信息。
读取 Word 文档(.docx 和 .doc 格式)并提取文本内容。支持文档解析、表格提取、图片处理等功能。使用当用户需要分析 Word 文档内容、提取文本信息或批量处理文档时。
Word Reader 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my documents & notes tasks using Word Reader
Identifies repetitive steps in your workflow and sets up Word Reader to handle them automatically