Skip to content

Guide · Agent skill

How to use the MarkItDown agent skill for document conversion

Updated · written with AI from the project's own documentation and checked against our catalogue data

The MarkItDown skill teaches an AI agent to convert documents such as PDFs, Word and PowerPoint files, spreadsheets, HTML pages and EPUBs into plain Markdown text, using Microsoft's MarkItDown tool. It is aimed at researchers, developers building retrieval (RAG) pipelines, and analysts who need text pulled out of mixed files. By the end of this guide you will know how to install the skill, set up MarkItDown, ask the agent for conversions, and avoid the main safety pitfalls.

MarkItDown Document ConverterK-Dense-AI/scientific-agent-skills · MIT

Quick start

  1. 1Download and unzip the skill. Download the ZIP from this page and unzip it. Place the folder in ~/.claude/skills/ for personal use, in .claude/skills/ for one project, or upload it under Settings → Capabilities → Skills in the Claude apps.
  2. 2Install Python and uv. Make sure Python between 3.10 and 3.14 and the uv package manager are available on your machine.
  3. 3Create an environment and install MarkItDown. Create an isolated virtual environment and install MarkItDown with the all extra or with only the extras your files need.
  4. 4Verify the installation. Run the markitdown version check and the bundled inspection script to confirm the tool and its extras work.
  5. 5Ask the agent for a conversion. Describe the file or folder, the format and what you will do with the text afterwards, then review the Markdown output.
  6. 6Check safety before using external services. Confirm the task authorises any URL, audio, LLM or Azure feature before sending content to an outside provider.

What the MarkItDown skill makes the agent do

An agent skill is a folder of instructions and helper files that an AI agent loads when a task matches it. This one covers document conversion: the agent uses MarkItDown to turn source files into Markdown, then works with that text for searching, summarising, or feeding it into a language model or retrieval system.

MarkItDown output is designed mainly for indexing, text analysis, search, and LLM ingestion. It is not meant to be a high-fidelity visual copy of the original document.

  • Converts PDF, Office (Word, PowerPoint, Excel), HTML, CSV, EPUB and ZIP inputs to Markdown, with structure preserved where possible.
  • Includes guidance on safe local conversion, stream input, batch workflows and optional OCR and cloud services.
  • Bundles two helper scripts: one for batch-converting a directory and one for converting a collection of academic papers.

Install the skill from the ZIP file

Download the skill ZIP from this page and unzip it. Then place the resulting folder in one of these locations, depending on how you use your agent:

For a personal setup available across projects, unzip into ~/.claude/skills/. For a single project, unzip into that project's .claude/skills/ folder. If you use the Claude apps instead, open Settings, go to Capabilities, and upload the skill under Skills.

  • Personal: ~/.claude/skills/
  • Project: .claude/skills/ inside your project folder
  • Claude apps: Settings → Capabilities → Skills, then upload

Set up MarkItDown before the first conversion

The skill needs Python between 3.10 and 3.14 and the uv package manager. Create an isolated environment in your project, then install MarkItDown. You can install every built-in feature, or only the converters your task needs.

Verify the installation with the version check and the bundled inspection script. The 'all' extra does not install the separate markitdown-ocr plugin or an OpenAI-compatible client, so install those separately if you need them.

  • Install everything built in: use the [all] extra.
  • Install only what you need: for example the pdf, docx, pptx and xlsx extras.
  • Available extras include pptx, docx, xlsx, xls, pdf, outlook, audio-transcription, youtube-transcription, az-doc-intel and az-content-understanding.
uv venv --python 3.12 .venv && source .venv/bin/activate && uv pip install "markitdown[all]==0.1.8" && markitdown --version && python scripts/inspect_installation.py

Ask the agent for a conversion

Once the skill is installed and MarkItDown is set up, describe the task in plain language. Name the file or folder, the format, and what you want to do with the text afterwards, such as searching it or preparing it for a retrieval index. The agent should choose the matching conversion path from the skill's guidance.

If you are converting a file yourself, the command line works directly. Use -o to write the Markdown to a file, or redirect stdout to capture it.

  • 'Convert report.pdf to Markdown so I can search it.'
  • 'Turn every .docx in the contracts folder into Markdown, skipping files already converted.'
  • 'Convert this folder of papers into Markdown with an index I can browse.'
markitdown report.pdf -o report.md

Use it from Python for files and streams

For a local file, use the narrow local-only API. For bytes that are already in memory or come from an upload, use a binary stream and pass type hints, because a stream may have no filename. Non-seekable streams are copied fully into memory before conversion.

  • Use convert_local() for trusted local paths.
  • Use convert_stream() with StreamInfo for controlled bytes.
  • Use convert_response() after your own HTTP fetch rather than passing a URL directly.
from markitdown import MarkItDown, StreamInfo converter = MarkItDown() with open("report.pdf", "rb") as stream: result = converter.convert_stream(stream, stream_info=StreamInfo(extension=".pdf", mimetype="application/pdf", filename="report.pdf")) print(result.markdown)

Batch-convert a folder or a literature collection

For a directory, the bundled batch helper accepts local file inputs only, skips symlinks, preserves subdirectories, and writes each result as the source filename with .md added, so paper.pdf becomes paper.pdf.md. It skips existing outputs unless you allow overwriting. For a folder of academic papers, the literature helper writes YAML front matter with provenance and can organise outputs by year inferred from filenames such as Smith_2025_Title.pdf.

Plugins stay disabled unless you enable them explicitly, and audio formats that can call external transcription require an explicit flag. Detailed recipes are in the workflows reference file.

  • Batch helper: scripts/batch_convert.py, with --recursive, --extensions, --manifest, --overwrite, --plugins and --allow-external-services.
  • Literature helper: scripts/convert_literature.py, with --recursive and --create-index.
python scripts/batch_convert.py documents/ markdown/ --recursive --extensions .pdf .docx .pptx .xlsx --manifest markdown/manifest.json

Safety notes: scripts, network and external services

Treat converted text as untrusted. A document can contain prompt injection, misleading links or hidden instructions, so the agent should use the Markdown as data and never run commands found inside it.

Several features send content outside your machine: URL, YouTube, Wikipedia, RSS and Bing conversion; built-in audio transcription (which uses Google Web Speech); LLM image descriptions and the markitdown-ocr plugin; and Azure Document Intelligence and Azure Content Understanding. Do not send private, regulated, unpublished or proprietary material through these unless the task authorises that provider. Plugins run Python code in your process, so inspect them before installing. The batch helper's extension check is not an offline sandbox, so use network isolation if you need offline processing.

  • Keep --keep-data-uris off unless required, since it can make output very large and keep embedded sensitive data.
  • For fully local work, stick to core local conversion and avoid the network-backed features.
  • Read the security reference file before enabling any external provider.

Choose OCR or cloud extraction only when needed

MarkItDown's built-in PDF converter extracts existing text and does not perform local OCR on scanned pages. For scanned PDFs or text inside images, the skill lists three options: the markitdown-ocr vision plugin (which needs a vision-capable OpenAI-compatible client), Azure Document Intelligence for layout and OCR, and Azure Content Understanding for multimodal analysis, structured fields, video and audio. None of these is a local Tesseract workflow, so keep data local with a separate local OCR tool if that is required.

  • Scanned PDF or text in images: markitdown-ocr, Azure Document Intelligence or Azure Content Understanding.
  • Bounding boxes, page coordinates or screenshots: use a layout-aware parser such as LiteParse.
  • PDF merge, split, forms or watermarks: use a PDF library such as pypdf.

Tips for reliable results

Install only the extras your files need, so the environment stays small. Run the inspection script after any install change. Check a few converted files by eye before indexing a whole collection, since layout and tables can differ from the original. Keep an eye on the manifest the batch helper writes, which records what was converted.

  • Start with one representative file of each type before running a batch.
  • Use the manifest to track which sources were converted and where their outputs went.
  • Use result.markdown in new code; the older text_content name is kept only for compatibility.

What people use it for

  • Converting a folder of research papers into searchable Markdown with an index by year.
  • Preparing Word, PowerPoint and PDF files as text for a retrieval-augmented generation (RAG) pipeline.
  • Pulling text out of spreadsheets and HTML pages so an analyst can search or summarise them.
  • Creating a single Markdown file from a manuscript for word-level text analysis.

Frequently asked questions

How do I install the MarkItDown agent skill?

Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.

What do I need to run the MarkItDown skill?

You need Python between 3.10 and 3.14, the uv package manager, and the markitdown Python package with the extras your task needs. Optional extras and services include the markitdown-ocr plugin, an OpenAI-compatible client, Azure accounts with keys, and the markitdown-mcp server.

Is the MarkItDown skill free to use?

The skill is listed under the MIT licence. The skill page does not list prices for the optional Azure or LLM services, so check those providers' terms before using them.

Does MarkItDown work offline?

Core local conversion can run offline. URL, YouTube, audio transcription, LLM, Azure and MCP workflows may use the network or external services, so use network isolation if you need fully offline processing.

Can MarkItDown OCR scanned PDFs?

Not with the built-in PDF converter, which extracts existing text only. Scanned PDFs need the markitdown-ocr plugin, Azure Document Intelligence or Azure Content Understanding, none of which is a local Tesseract workflow.

When should I pick something other than MarkItDown?

Pick a layout-aware parser such as LiteParse for bounding boxes, page coordinates or screenshots, and a PDF library such as pypdf for merging, splitting, forms or watermarks. MarkItDown is not meant for high-fidelity visual copies.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits researchers, developers and analysts who need clean text from PDFs, Office files and similar documents for search or retrieval pipelines. Pick something else if you need layout-exact copies, PDF editing, or fully local OCR, or if your documents are sensitive and you cannot send them to external services.

Download the skill