convert-documents-to-markdown
它能做什么
这项技能运行一个命令行工具,把办公文件、PDF、电子书和电子表格转换为 Markdown 文本。适合那些 AI 无法直接打开文档、却需要读取其内容的人。
适用场景
- ✓当你分享了一个 Word 或 PDF 文件,想让 AI 阅读并总结时。
- ✓当电子表格或演示文稿需要转换为文本以便分析时。
- ✓当长文档应保存为文件,以便只读取你需要的部分时。
技能链接
https://github.com/firecrawl/anydoc/blob/main/skills/convert-documents-to-markdown/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这份 PDF 报告转换为文本,然后帮我总结其中的主要结论。”
每周 5 个新技能,1 分钟读完。
工作原理
技能会运行转换器,根据文件内容判断文件类型,然后把 Markdown 输出到屏幕或文件中,无需单独的安装步骤。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Convert documents to Markdown
Run the anydoc CLI. It needs Node 20+ and no install:
npx -y @firecrawl/anydoc <file> # Markdown to stdout
npx -y @firecrawl/anydoc <file> -o out.md # write to a file
npx -y @firecrawl/anydoc - --format csv < f # read stdin
Rules:
- Supported inputs:
.doc,.docx,.docm,.odt,.rtf,.epub,.pdf,.ppt,.pps,.pot,.pptx,.pptm,.ppsx,.ppsm,.odp,.xls,.xlsx,.xlsm,.xlsb,.ods,.csv. - The format is detected from the file content. Pass
--format <name>only when detection cannot work: CSV from stdin, or a missing or wrong extension. - Exit codes: 0 success, 1 the document could not be converted, 2 usage error, 3 pages of a PDF need OCR. Failures print one
anydoc: <message>line to stderr. The CLI never prompts. - For a large document, write to a file with
-oand read the parts you need instead of streaming everything into context. - Scanned and image-only pages need OCR, which anydoc does not do, so the document exits 3. Rerun with
--ocr hostedto send it to Firecrawl Parse. No signup needed. Pass--api-keyor setFIRECRAWL_API_KEYfor higher limits. - Inside a Node, Python, or Rust codebase, prefer the library over shelling out:
@firecrawl/anydocon npm,firecrawl-anydocon PyPI,anydocon crates.io. Each exposes the sameto_markdown/toMarkdownAPI.
常见问题
它能读取哪些文件类型?
它支持 Word、PowerPoint、Excel、OpenDocument、RTF、EPUB、CSV 和 PDF 文件。
扫描页面怎么办?
扫描页面需要 OCR,而该工具本身不做 OCR。技能可以改用托管的 Firecrawl Parse 选项处理这些页面。
需要先安装吗?
不需要。它通过 npx 运行,需要 Node 20 或更新版本。
详情
作者的原始描述
Convert Word (.doc, .docx), PowerPoint (.ppt, .pptx), Excel (.xls, .xlsx), OpenDocument (.odt, .ods, .odp), RTF, EPUB, CSV, and PDF files to GitHub-Flavored Markdown. Use when a task needs the contents of an office document, spreadsheet, presentation, ebook, or PDF you cannot read directly.
repo: firecrawl/anydoc
热度
- GitHub 星标
- 23k
- 排名
- #10124
- 许可证
- MIT
- 更新时间
- 2026/10/23
评论
- …