/markitdown-converter:file-to-markdownfrom markitdown-converter
Convert any document to Markdown using Microsoft MarkItDown. Trigger automatically whenever the user shares or points to a file (PDF, Word/.docx, PowerPoint/.pptx, Excel/.xlsx, .csv, images, .html, .epub, audio, .zip, etc.) and wants its text content — e.g. "convert this to markdown", "extract the text", "turn this file into markdown", or simply attaches a document to work with its contents. Supports optional LLM-Vision OCR (via markitdown-ocr) to read text inside images embedded in PDF/DOCX/PPTX/XLSX. Do NOT trigger when the user needs to edit and re-save a formatted Office document (use the docx/xlsx/pptx skills instead) or only wants a summary that native Read already provides.
Ships in markitdown-converter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Convert documents to clean Markdown text with Microsoft's MarkItDown. Use this whenever the user wants the textual content of a file as Markdown, or attaches a document to work with its contents.
The sandbox is reset between sessions, so install every time before first use in a session. It is fast when already cached.
pip install --break-system-packages -q 'markitdown[all]' markitdown-ocr openai 2>&1 | tail -3
Verify:
python3 -m markitdown --version
User-attached files live under the uploads mount. In the Bash sandbox that path is /sessions/*/mnt/uploads/ (translate from the upload path shown in the conversation). If the user connected a folder, read from there instead. Always use absolute paths.
Use this unless the file contains images with text the user needs read.
from markitdown import MarkItDown
md = MarkItDown()
result = md.convert("/absolute/path/to/file.ext")
print(result.text_content)
OCR uses LLM Vision and requires an OpenAI-compatible API key. Only use this path when the document has embedded images/scanned pages whose text matters.
If no OPENAI_API_KEY is set in the environment, ask the user for a key (or an OpenAI-compatible base URL + key) before running. Never hardcode keys into files.
import os
from markitdown import MarkItDown
from openai import OpenAI
client = OpenAI() # reads OPENAI_API_KEY; add base_url=... for compatible endpoints
md = MarkItDown(enable_plugins=True, llm_client=client, llm_model="gpt-4o")
result = md.convert("/absolute/path/to/file.pdf")
print(result.text_content)
CLI equivalent: markitdown file.pdf --use-plugins --llm-client openai --llm-model gpt-4o
For short content, show the Markdown inline in the reply. For longer content or when the user wants a file, write <original-name>.md to the outputs directory and present it with the file-sharing tool. When converting a folder, loop over its files and write one .md per input.
markitdown --list-plugins shows ocr before relying on OCR.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub siriusest/lang-plugins --plugin markitdown-converter