Office → Markdown Skill
/install office-to-markdown
Office → Markdown Skill
Convert any uploaded office document to clean Markdown.
All conversion logic lives in scripts/ — load only the script you need.
Security notes
- Dependencies are installed into an isolated temp directory (
/tmp/office_md_deps/) and pinned to reviewed versions. The system Python environment is not modified.- For scanned or image-only content, pages are sent to Anthropic's vision API. Always ask the user for confirmation before enabling vision (see Workflow step 3).
Script Reference
| Format | Extensions | Script |
|---|---|---|
| PDF (text + scanned/image) | .pdf |
scripts/pdf-to-md.py |
| PowerPoint | .pptx, .ppt |
scripts/pptx-to-md.py |
| Word | .docx, .doc |
scripts/docx-to-md.py |
| Excel | .xlsx, .xls |
scripts/xlsx-to-md.py |
| CSV | .csv |
scripts/csv-to-md.py |
Workflow
1. Confirm conversion intent
Only proceed if the user has explicitly asked to convert, extract, or export the document to Markdown. A bare file upload without a conversion request is not sufficient to trigger this skill.
2. Run the matching script (text-only pass first)
python scripts/\x3Cscript-name>.py \
/mnt/user-data/uploads/\x3Cinput-file> \
/mnt/user-data/outputs/\x3Cstem>.md
Each script installs its own pinned dependencies into /tmp/office_md_deps/
on first run (isolated from the system Python environment).
3. Vision consent — REQUIRED before image extraction
If the script output indicates image-only pages were detected (or the document is known to be scanned), stop and ask the user:
"This document has N image-only page(s) that cannot be extracted without sending them to Anthropic's vision API. Page images will be transmitted externally for OCR. Would you like to proceed with vision extraction?"
Only if the user confirms, re-run with the --allow-vision flag:
python scripts/\x3Cscript-name>.py \
/mnt/user-data/uploads/\x3Cinput-file> \
/mnt/user-data/outputs/\x3Cstem>.md \
--allow-vision
If the user declines, save the text-only result and note which pages were skipped.
4. Present the file
Use present_files with the output .md path, then give a brief summary:
- File type and page/slide/sheet count
- Whether vision was used and for how many pages (or that it was skipped)
How vision works (PDF / PPTX / DOCX)
Each script uses a two-pass strategy:
- Text pass — extract text normally (fast, no API call, always runs)
- Vision pass — only runs when
--allow-visionis passed AND pages had no extractable text; those pages are rendered and sent to the Claude vision API
Edge Cases
| Situation | Behaviour |
|---|---|
| Fully scanned PDF | All pages flagged for vision; user confirmation required |
| Mixed PDF (some text, some images) | Only image pages flagged; user confirmation required |
| User declines vision | Text-only .md is saved; skipped pages are noted inline |
| Password-protected file | Script exits with a clear error message |
| Very large PDF (50+ image pages) | Script adds 0.3s sleep between vision calls |
| Image too large (>4MB base64) | Reduce DPI: edit dpi=150 → dpi=100 in pdf-to-md.py |
| Encoding errors in CSV | Script auto-retries with latin-1 |
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install office-to-markdown - 安装完成后,直接呼叫该 Skill 的名称或使用
/office-to-markdown触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Office → Markdown Skill 是什么?
Converts office automation documents — PDF, PPTX, DOCX, XLSX, CSV — into clean, readable Markdown. Use this skill when a user explicitly asks to convert, ext... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 54 次。
如何安装 Office → Markdown Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install office-to-markdown」即可一键安装,无需额外配置。
Office → Markdown Skill 是免费的吗?
是的,Office → Markdown Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Office → Markdown Skill 支持哪些平台?
Office → Markdown Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Office → Markdown Skill?
由 Naimal Salahuddin(@naimalarain13)开发并维护,当前版本 v1.0.1。