mcpField
M
markitdown

markitdown

github.com/yitianlianDocuments446 installsUpdated 29w ago
Repository

About markitdown

A skill that uses the `markitdown` CLI to convert files and web pages into Markdown. It is intended for users preparing documents for reading, extraction, or further processing, with single-file and batch workflows.

Key features

  1. 01Converts documents and web pages to Markdown
  2. 02Supports office, data, image, audio, and archive formats
  3. 03Saves output to a file or prints to stdout
  4. 04Handles directories and glob patterns
  5. 05Offers optional post-processing guidance

Use cases

  1. 01Converting a PDF or presentation for review
  2. 02Turning spreadsheets or CSV files into Markdown tables
  3. 03Batch-converting a folder of supported documents
  4. 04Fetching a web page into Markdown

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/yitianlian/markitdown-skill --skill markitdown

After installing, type/markitdownin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

install.sh
.gitignore
README.md
LICENSE

Details

From the project README

MarkItDown - File to Markdown Converter

Convert file to Markdown: $ARGUMENTS

Prerequisites

markitdown CLI must be installed. If not found, install it:

# Preferred (fastest, no conflicts)
uv tool install 'markitdown[all]'

# Alternatives
pipx install 'markitdown[all]'
pip install --user 'markitdown[all]'

Supported Formats

FormatExtensionsNotes
PDF.pdfText extraction with layout preservation
Word.docxHeadings, tables, lists preserved
PowerPoint.pptxSlide-by-slide with headers
Excel.xlsx, .xlsSheet-by-sheet tables
HTML.html, .htmFull structure conversion
CSV.csvConverted to Markdown tables
JSON.jsonFormatted output
XML.xmlFormatted output
Images.jpg, .png, .gif, .webpEXIF metadata extraction
Audio.mp3, .wavTranscription (requires ffmpeg)
Email.msgOutlook message extraction
eBook.epubFull text extraction
Archives.zipLists contents, converts supported files inside
URLshttp://...Fetches and converts web pages

Workflow

Step 1: Parse Arguments

Parse $ARGUMENTS to identify:

  • Target: file path, glob pattern, directory, or URL
  • Output option: -o output.md to save, or print to stdout
  • Batch mode: if target is a directory or glob pattern

If no arguments given, ask the user what file they want to convert.

Step 2: Validate Target
# Check if file exists
ls -la "$TARGET"

# Check markitdown is available
markitdown --version

If markitdown is not installed, install it with:

uv tool install 'markitdown[all]'
Step 3: Convert

Single file:

markitdown "$FILE_PATH"

Save to file:

markitdown "$FILE_PATH" -o "$OUTPUT_PATH"

From URL:

markitdown "$URL"

Batch convert (directory):

for f in "$DIR"/*.{pdf,docx,pptx,xlsx,html,csv}; do
    [ -f "$f" ] && markitdown "$f" -o "${f%.*}.md"
done

From stdin with extension hint:

cat "$FILE" | markitdown -x .html
Step 4: Present Results
  • For short output (< 200 lines): display directly in the conversation
  • For long output: save to a .md file and report the path
  • For batch conversions: report summary of converted files
Step 5: Post-Processing (Optional)

If the user asks, you can:

  1. Summarize: Read the converted markdown and provide a summary
  2. Extract specific info: Parse the markdown for tables, headings, key data
  3. Clean up: Remove artifacts, fix formatting issues
  4. Translate: The markdown is now clean text that can be translated
  5. Split: Break large documents into sections

Examples

/markitdown report.pdf
/markitdown slides.pptx -o slides.md
/markitdown data.xlsx
/markitdown https://example.com/page.html
/markitdown ./documents/              # batch convert all supported files
/markitdown *.pdf                     # convert all PDFs in current directory

Error Handling

ErrorFix
markitdown: command not foundRun: uv tool install 'markitdown[all]'
No such file or directoryCheck the file path with ls
Audio transcription failsInstall ffmpeg: brew install ffmpeg (macOS) or apt install ffmpeg (Linux)
PDF extraction is emptyThe PDF may be image-only; suggest using OCR tools
Encoding issuesTry: markitdown -c UTF-8 "$FILE"

Comments

Markdown supported