跳到正文
FunCoding

markdown-converter

Convert binary documents (PDF, DOCX, XLSX, PPTX, HTML, EPUB, images) to clean LLM-friendly Markdown using Microsoft's `markitdown` Python tool. Use when a user attaches a binary file and you need to read its contents.

Star
1,361
许可证
Apache-2.0
最近提交
2026年10月10日

backend/commonly-bundled-skills/markdown-converter/SKILL.md

在 GitHub 上查看

markdown-converter — binary doc → markdown for agent input

markitdown is installed via pip3 install markitdown and is on PATH. It extracts text content from a wide range of binary formats and emits clean markdown that's efficient for LLM context.

Supported input formats

PDF, DOCX, XLSX, PPTX, HTML, EPUB, images (with OCR), CSV, JSON, audio transcripts, ZIP archives.

Basic usage

# Convert a single file to markdown on stdout
markitdown /workspace/$(basename "$PWD")/input.pdf

# Save to a markdown file
markitdown /workspace/$(basename "$PWD")/input.docx > /workspace/$(basename "$PWD")/input.md

# Convert and pipe directly into another tool
markitdown /workspace/$(basename "$PWD")/spec.xlsx | head -200

Reading a user-attached file

Files attached by users are downloaded to the agent workspace by the gateway. Once you have a workspace path:

# 1. Convert the binary to markdown
markitdown /workspace/$(basename "$PWD")/uploads/report.pdf > /tmp/report.md

# 2. Read the markdown into your context
cat /tmp/report.md

Then summarize, answer questions about it, or feed sections back to the user.

Useful flags

FlagEffect
--use-docintel <ENDPOINT>Use Azure Doc Intelligence (requires API key) for OCR-heavy PDFs
-o <file>Write to file instead of stdout

When NOT to use markdown-converter

  • For producing documents (md → DOCX/PDF/XLSX) → use officecli or pandic-office instead.
  • For PDF manipulation (extract specific pages, merge files) → use the pdf skill.

Troubleshooting

  • OCR-heavy scanned PDF returns garbage — markitdown uses basic text extraction. If the PDF is image-only, the result will be empty or unhelpful. Mention this limitation to the user.
  • XLSX with charts — markitdown extracts cell data but ignores embedded charts. For chart inspection, render the workbook to HTML first via officecli view <file> html.

相似的 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