$npx -y skills add virgo777/buddyme --skill markitdown-skill-1.0.1OpenClaw agent skill for converting documents to Markdown. Documentation and utilities for Microsoft's MarkItDown library. Supports PDF, Word, PowerPoint, Excel, images (OCR), audio (transcription), HTML, YouTube.
| 1 | # MarkItDown Skill |
| 2 | |
| 3 | Documentation and utilities for converting documents to Markdown using Microsoft's [MarkItDown](https://github.com/microsoft/markitdown) library. |
| 4 | |
| 5 | > **Note:** This skill provides documentation and a batch script. The actual conversion is done by the `markitdown` CLI/library installed via pip. |
| 6 | |
| 7 | ## When to Use |
| 8 | |
| 9 | **Use markitdown for:** |
| 10 | - 📄 Fetching documentation (README, API docs) |
| 11 | - 🌐 Converting web pages to markdown |
| 12 | - 📝 Document analysis (PDFs, Word, PowerPoint) |
| 13 | - 🎬 YouTube transcripts |
| 14 | - 🖼️ Image text extraction (OCR) |
| 15 | - 🎤 Audio transcription |
| 16 | |
| 17 | ## Quick Start |
| 18 | |
| 19 | ```bash |
| 20 | # Convert file to markdown |
| 21 | markitdown document.pdf -o output.md |
| 22 | |
| 23 | # Convert URL |
| 24 | markitdown https://example.com/docs -o docs.md |
| 25 | ``` |
| 26 | |
| 27 | ## Supported Formats |
| 28 | |
| 29 | | Format | Features | |
| 30 | |--------|----------| |
| 31 | | PDF | Text extraction, structure | |
| 32 | | Word (.docx) | Headings, lists, tables | |
| 33 | | PowerPoint | Slides, text | |
| 34 | | Excel | Tables, sheets | |
| 35 | | Images | OCR + EXIF metadata | |
| 36 | | Audio | Speech transcription | |
| 37 | | HTML | Structure preservation | |
| 38 | | YouTube | Video transcription | |
| 39 | |
| 40 | ## Installation |
| 41 | |
| 42 | The skill requires Microsoft's `markitdown` CLI: |
| 43 | |
| 44 | ```bash |
| 45 | pip install 'markitdown[all]' |
| 46 | ``` |
| 47 | |
| 48 | Or install specific formats only: |
| 49 | ```bash |
| 50 | pip install 'markitdown[pdf,docx,pptx]' |
| 51 | ``` |
| 52 | |
| 53 | ## Common Patterns |
| 54 | |
| 55 | ### Fetch Documentation |
| 56 | ```bash |
| 57 | markitdown https://github.com/user/repo/blob/main/README.md -o readme.md |
| 58 | ``` |
| 59 | |
| 60 | ### Convert PDF |
| 61 | ```bash |
| 62 | markitdown document.pdf -o document.md |
| 63 | ``` |
| 64 | |
| 65 | ### Batch Convert |
| 66 | ```bash |
| 67 | # Using included script |
| 68 | python ~/.openclaw/skills/markitdown/scripts/batch_convert.py docs/*.pdf -o markdown/ -v |
| 69 | |
| 70 | # Or shell loop |
| 71 | for file in docs/*.pdf; do |
| 72 | markitdown "$file" -o "${file%.pdf}.md" |
| 73 | done |
| 74 | ``` |
| 75 | |
| 76 | ## Python API |
| 77 | |
| 78 | ```python |
| 79 | from markitdown import MarkItDown |
| 80 | |
| 81 | md = MarkItDown() |
| 82 | result = md.convert("document.pdf") |
| 83 | print(result.text_content) |
| 84 | ``` |
| 85 | |
| 86 | ## Troubleshooting |
| 87 | |
| 88 | ### "markitdown not found" |
| 89 | ```bash |
| 90 | pip install 'markitdown[all]' |
| 91 | ``` |
| 92 | |
| 93 | ### OCR Not Working |
| 94 | ```bash |
| 95 | # Ubuntu/Debian |
| 96 | sudo apt-get install tesseract-ocr |
| 97 | |
| 98 | # macOS |
| 99 | brew install tesseract |
| 100 | ``` |
| 101 | |
| 102 | ## What This Skill Provides |
| 103 | |
| 104 | | Component | Source | |
| 105 | |-----------|--------| |
| 106 | | `markitdown` CLI | Microsoft's pip package | |
| 107 | | `markitdown` Python API | Microsoft's pip package | |
| 108 | | `scripts/batch_convert.py` | This skill (utility) | |
| 109 | | Documentation | This skill | |
| 110 | |
| 111 | ## See Also |
| 112 | |
| 113 | - [USAGE-GUIDE.md](USAGE-GUIDE.md) - Detailed examples |
| 114 | - [reference.md](reference.md) - Full API reference |
| 115 | - [Microsoft MarkItDown](https://github.com/microsoft/markitdown) - Upstream library |