File contents 在线文档转 Markdown
在线文档转 Markdown 技能支持将云文档内容以 Markdown 格式提取。
本技能依赖 kdocs 技能的基础文档操作能力(认证、文件管理等),请确保已安装该技能。详见 references/core/ 目录。
操作指南
通用操作路由
意图
路由
读取文档内容
read_file(统一入口,按后缀自动返回 Markdown 或结构化数据)
创建/写入
create_file_with_content(统一入口,新建文档并写入内容,返回 link_url)
局部更新
改块/改段/改单元格,已有目标文档上的修改 → 按「支持的文档类型」→ 对应 reference
类型专属能力
条件格式、导出转换、翻译、PDF 拆分、幻灯片主题、数据校验
获取文件标识指南
必读 references/file-locating-guide.md
高频流程指引
文档内容转 Markdown
🎯 核心工具 :read_file(format="markdown") 可将 .otl / .docx / .pdf 内容提取为 Markdown 文本。
适用类型 :智能文档(.otl)、Word(.docx)、PDF(.pdf)
不适用 :表格(.xlsx / .ksheet)、多维表格(.dbt)、演示文稿(.pptx)
步骤 1: 定位文档
- 用户给文件名/关键词 → search_files(keyword="文档名") 获取 file_id
- 用户给链接 → 直接提取 url 或 link_id
步骤 2: read_file(file_id=..., format="markdown") 或 read_file(url=...) / read_file(link_id=...)
→ status=ok 时取 data.content
→ status=pending 时原参数 + task_id 再次调用
步骤 3: 将 Markdown 文本直接返回给用户
⚠️ "导出为 MD 文件" :云端不支持创建 .md 后缀文件,应将 Markdown 文本直接输出给用户,由用户自行保存为本地 .md 文件。
风险控制
以下工具不可逆,调用前必须向用户确认(详细约束见各工具参考文档的「操作约束」区):
cancel_share
工具组合速查
用户需求
推荐工具组合
将在线文档(智能文档、Word、PDF)内容转换为 Markdown 输出
search_files → read_file(format=markdown) → 返回 Markdown 文本
1 --- 2 name: doc-to-markdown 3 description: 在线文档转 Markdown 4 --- 5 6 # 在线文档转 Markdown 7 8 在线文档转 Markdown 技能支持将云文档内容以 Markdown 格式提取。 9 10 > 本技能依赖 `kdocs` 技能的基础文档操作能力(认证、文件管理等),请确保已安装该技能。详见 `references/core/` 目录。 11 12 --- 13 14 15 --- 16 17 ## 操作指南 18 19 ### 通用操作路由 20 21 | 意图 | 路由 | 22 |------|------| 23 | 读取文档内容 | `read_file`(统一入口,按后缀自动返回 Markdown 或结构化数据) | 24 | 创建/写入 | `create_file_with_content`(统一入口,新建文档并写入内容,返回 link_url) | 25 | 局部更新 | 改块/改段/改单元格,已有目标文档上的修改 → 按「支持的文档类型」→ 对应 reference | 26 | 类型专属能力 | 条件格式、导出转换、翻译、PDF 拆分、幻灯片主题、数据校验 | 按「支持的文档类型」→ 对应 reference 中的专属功能章节 | 27 | 获取文件标识指南 | **必读** `references/file-locating-guide.md` | 28 29 ### 高频流程指引 30 31 #### 文档内容转 Markdown 32 33 > 🎯 **核心工具**:`read_file(format="markdown")` 可将 .otl / .docx / .pdf 内容提取为 Markdown 文本。 34 35 **适用类型**:智能文档(.otl)、Word(.docx)、PDF(.pdf) 36 **不适用**:表格(.xlsx / .ksheet)、多维表格(.dbt)、演示文稿(.pptx) 37 38 ``` 39 步骤 1: 定位文档 40 - 用户给文件名/关键词 → search_files(keyword="文档名") 获取 file_id 41 - 用户给链接 → 直接提取 url 或 link_id 42 43 步骤 2: read_file(file_id=..., format="markdown") 或 read_file(url=...) / read_file(link_id=...) 44 → status=ok 时取 data.content 45 → status=pending 时原参数 + task_id 再次调用 46 47 步骤 3: 将 Markdown 文本直接返回给用户 48 ``` 49 50 > ⚠️ **"导出为 MD 文件"**:云端不支持创建 `.md` 后缀文件,应将 Markdown 文本直接输出给用户,由用户自行保存为本地 `.md` 文件。 51 52 --- 53 ## 风险控制 54 55 以下工具不可逆,调用前必须向用户确认(详细约束见各工具参考文档的「操作约束」区): 56 57 `cancel_share` 58 59 --- 60 61 ## 工具组合速查 62 63 | 用户需求 | 推荐工具组合 | 64 |----------|-------------| 65 | 将在线文档(智能文档、Word、PDF)内容转换为 Markdown 输出 | `search_files` → `read_file(format=markdown)` → 返回 Markdown 文本 |
infometa/workbuddyskills/tree/main/experts/kdocs-doc-butler/skills/doc-to-markdown commit 4ef53f0047
Frequently asked questions How do I install the Doc To Markdown skill? Run npx skillmds@latest add infometa/doc-to-markdown in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Doc To Markdown skill do? 在线文档转 Markdown It is listed under Docs & Writing on SkillMD.
Is Doc To Markdown safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Doc To Markdown? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Doc To Markdown free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Doc To Markdown? infometa (@infometa) published this skill. Their other Agent Skills are listed on their SkillMD profile.