跳到正文
FunCoding

document-converter

Convert Office documents (PPTX, DOCX, XLSX, PDF, HTML, CSV, JSON, XML, images) to Markdown using Microsoft MarkItDown. Provides the agent with conversion strategies for academic and research workflows.

Star
859
最近提交
2026年8月20日

skills/document-converter/SKILL.md

在 GitHub 上查看

Document Converter (MarkItDown)

Convert Office and structured documents to Markdown for LLM consumption using Microsoft MarkItDown.


Overview

MarkItDown is a Microsoft open-source tool that converts a wide range of document formats into clean Markdown text. This is essential for academic research workflows where source materials arrive in diverse formats (PDFs from journals, PPTX from conferences, DOCX from collaborators, XLSX data tables).


Supported Formats

FormatExtensionsNotes
PDF.pdfText extraction; scanned PDFs require OCR
Word.docxParagraphs, tables, lists, headings preserved
PowerPoint.pptxSlide-by-slide with speaker notes
Excel.xlsx, .xlsSheet-by-sheet, tables as Markdown tables
HTML.html, .htmCleaned content extraction
CSV.csvConverted to Markdown table
JSON.jsonPretty-printed structured output
XML.xmlStructured text extraction
Images.jpg, .png, .gif, .bmp, .tiffOCR text extraction (requires optional deps)
Audio.mp3, .wavTranscription (requires optional deps)
ZIP.zipRecursively converts contained files

MCP Tool Usage

When the markitdown-mcp server is configured, use the convert_to_markdown tool:

Tool: convert_to_markdown
Parameters:
  uri: "file:///absolute/path/to/document.pptx"

The uri parameter accepts:

  • Local files: file:///path/to/file.docx
  • HTTP URLs: https://example.com/paper.pdf

Important

  • Always use absolute paths with the file:// URI scheme for local files.
  • The tool returns the full Markdown text content of the converted document.
  • For large documents, the output may be substantial. Consider summarizing or extracting relevant sections after conversion.

CLI Fallback

If the MCP server is not available, use the CLI directly via shell:

# Convert a single file
markitdown document.pptx

# Save output to file
markitdown document.pptx > output.md

# Convert from URL
markitdown https://example.com/paper.pdf

Academic Research Workflows

1. Conference Presentation Analysis

Convert a PPTX to Markdown, then analyze the content:

  1. Convert the presentation with convert_to_markdown
  2. The output preserves slide structure and speaker notes
  3. Summarize key findings, methodology, and conclusions

2. Paper Review from PDF

  1. Convert the PDF to Markdown
  2. Extract sections: Abstract, Introduction, Methods, Results, Discussion
  3. Cross-reference with literature library

3. Data Table Extraction

  1. Convert XLSX to Markdown tables
  2. Each sheet becomes a separate section
  3. Use the extracted tables for analysis or comparison

4. Batch Literature Processing

When processing multiple documents:

  1. Convert each document individually
  2. Extract metadata (title, authors, date) from the content
  3. Add to the literature library with library_add_paper

Output Quality Notes

FormatQualityCaveats
DOCXExcellentComplex layouts may lose formatting
PPTXGoodDiagrams/charts become text descriptions
XLSXGoodMerged cells may not render perfectly
PDFVariableDepends on PDF type (text vs scanned)
HTMLGoodJavaScript-rendered content not captured
CSVExcellentDirect table conversion

When to Use This Skill

  • User uploads or references an Office document (PPTX, DOCX, XLSX)
  • User wants to analyze content from a PDF
  • User needs to extract text from images (OCR)
  • User wants to convert a document for inclusion in notes or workspace
  • User asks to read, summarize, or analyze a non-Markdown file
  • Batch processing of research materials in mixed formats

When NOT to Use

  • File is already Markdown or plain text
  • User wants to edit the original document format (use appropriate editor)
  • User needs pixel-perfect layout preservation (use the original format)
  • File is a scanned PDF without OCR support configured

Troubleshooting

IssueSolution
markitdown not foundRun pip install 'markitdown[all]'
MCP tool not availableEnsure markitdown-mcp is installed and configured in openclaw.json
Empty output from PDFPDF may be scanned/image-only; needs OCR dependencies
Encoding errorsEnsure file is not corrupted; try re-saving from source application
Large file timeoutConvert via CLI instead of MCP for very large files

Installation

Local (macOS/Linux)

pip install 'markitdown[all]' markitdown-mcp

Verify

markitdown --help

Docker

MarkItDown is pre-installed in the Research-Claw Docker image.

相似的 Skill

精选

pdf

提取文本和表格、合并拆分、填写表单,也能对扫描件做 OCR。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

canvas-design

按设计理念生成海报和视觉作品,输出 PNG 或 PDF。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

docx

创建和编辑 Word 文档,支持目录、页码、页眉等排版。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

doc-coauthoring

按步骤协作撰写技术方案、提案和决策文档,逐轮修改。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

xlsx

读写 Excel 和 CSV,处理公式、格式、图表与数据清洗。

ANanthropics/skills181k近 7 天新增 1,119 个 star

精选

pptx

生成、读取和修改演示文稿,也能合并拆分幻灯片。

ANanthropics/skills181k近 7 天新增 1,119 个 star