agentleFS
phanghonghaophanghonghao/THU-Awesome-Skills/skills/markitdown/SKILL.md

markitdown

Skill8 starsChanged 4 months agoMITView on GitHub

Convert various document formats to Markdown using Microsoft's markitdown library. Supports PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, IPYNB, ZIP and more. Use when user mentions markitdown, convert to markdown, PPTX to md, XLSX to md, EPUB to md, or needs to read formats not covered by /pdf-reader or /word2md.

  • Installs packages

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use scientific-slides and doc-coauthoring.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ZanderRussSkill

    scientific-slides

    Build slide decks and presentations for research talks. Use this for making PowerPoint slides, conference presentations, seminar talks, research presentations, thesis defense slides, or any scientific talk. Provides slide structure, design templates, timing guidance, and visual validation. Works with PowerPoint and LaTeX Beamer.

    Also in 3 projects that use this

  • JetBrainsSkill

    doc-coauthoring

    Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

    Also in 3 projects that use this

The file

Files
SKILL.md

Markitdown Skill (microsoft/markitdown)

Microsoft's markitdown converts 15+ file formats to Markdown. This skill covers formats not handled by /pdf-reader and /word2md — primarily PPTX, XLSX, EPUB, HTML, and more.

When to Use

  • User mentions: "markitdown", "/markitdown", "convert to markdown"
  • Need to read PPTX, XLSX, EPUB, IPYNB, ZIP — these are NOT covered by /pdf-reader or /word2md
  • Need table-aware PDF extraction (markitdown detects tables, /pdf-reader does not)
  • User says "PPTX to markdown", "Excel to markdown", "EPUB to markdown"
  • Quick one-shot conversion of any document to Markdown

When NOT to Use (use other skills instead)

FormatBetter skillReason
PDF (reading)/pdf-readerPyMuPDF has 3 modes, higher fidelity, dict mode for LaTeX conversion
DOCX (with math)/word2mdCorrect OMML→LaTeX; markitdown has escaped-underscore bug (\_{c} instead of _{c})
DOCX (with images)/word2mdExtracts images to files; markitdown embeds base64 data URIs

Supported Formats

PDF, DOCX, PPTX, XLSX, HTML, EPUB, Images (via LLM caption or EXIF), IPYNB, CSV, Plain text, ZIP (processes contents), Audio/Video (transcription via Azure), Outlook MSG, RSS, Wikipedia, YouTube (transcript).

Installation

python -m pip install markitdown 2>&1 | tail -3

Usage

CLI (recommended for single files)

# Convert to stdout
PYTHONIOENCODING=utf-8 markitdown "<INPUT_FILE>" 2>/dev/null

# Convert and save to file
PYTHONIOENCODING=utf-8 markitdown "<INPUT_FILE>" -o "<OUTPUT.md>" 2>/dev/null

# Pipe from stdin
PYTHONIOENCODING=utf-8 markitdown -x pptx < "<INPUT_FILE>" 2>/dev/null

Python API (for batch or programmatic use)

PYTHONIOENCODING=utf-8 python -c "
from markitdown import MarkItDown
import sys

md = MarkItDown()
result = md.convert(sys.argv[1])
print(result.text_content)
" "<INPUT_FILE>"

Batch conversion (multiple files)

PYTHONIOENCODING=utf-8 python -c "
from markitdown import MarkItDown
import sys, os, glob

md = MarkItDown()
files = glob.glob(sys.argv[1])
for f in files:
    print(f'--- {os.path.basename(f)} ---')
    result = md.convert(f)
    print(result.text_content[:2000])
    print()
" "<GLOB_PATTERN>"

Examples

PPTX (PowerPoint) to Markdown

PYTHONIOENCODING=utf-8 markitdown "presentation.pptx" -o "presentation.md" 2>/dev/null

XLSX (Excel) to Markdown

PYTHONIOENCODING=utf-8 markitdown "spreadsheet.xlsx" 2>/dev/null

EPUB to Markdown

PYTHONIOENCODING=utf-8 markitdown "book.epub" -o "book.md" 2>/dev/null

HTML to Markdown

PYTHONIOENCODING=utf-8 markitdown "page.html" 2>/dev/null

PDF with table detection

PYTHONIOENCODING=utf-8 markitdown "report.pdf" -o "report.md" 2>/dev/null

markitdown uses pdfplumber to detect tables and output pipe-formatted markdown tables. If pdfplumber fails, falls back to pdfminer.

CLI Options

FlagDescription
-o, --outputOutput file path (default: stdout)
-x, --extensionHint file extension (when reading stdin)
-m, --mime-typeHint MIME type
-c, --charsetHint charset (e.g. UTF-8)
-d, --use-docintelUse Azure Document Intelligence (requires endpoint)
-p, --use-pluginsEnable 3rd-party plugins
--keep-data-urisKeep base64 images in output (default: truncated)
--list-pluginsList installed plugins

Known Limitations

  1. DOCX math bug: OMML→LaTeX escapes underscores (\_{c} instead of _{c}), breaking LaTeX rendering. Use /word2md for DOCX with math.
  2. Base64 images: Images embedded as data URIs, truncated by default. Use --keep-data-uris to preserve (output becomes very large). Use /word2md if you need image files extracted.
  3. Scanned PDFs: Like all text extractors, cannot handle image-only pages. Needs OCR (paddleocr, tesseract).
  4. Audio/Video transcription: Requires Azure Document Intelligence endpoint (-d -e <endpoint>).

Rules

  1. Always use PYTHONIOENCODING=utf-8 — Windows defaults to GBK
  2. Always suppress warnings with 2>/dev/null — markitdown's dependency warnings are noisy
  3. For DOCX with math formulas — recommend /word2md instead (this skill's OMML converter has bugs)
  4. For PDF reading — prefer /pdf-reader for high fidelity; use this skill when you need table detection
  5. Check dependencies: Some formats need extras (pip install markitdown[pdf], etc.)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.