agentleFS
GitHubxsyGitHubxsy/agent-skills/skills/markitdown/SKILL.md

markitdown

Skill23 starsChanged 2 months agoApache-2.0View on GitHub

Convert files, documents, images, and URLs into clean Markdown for LLM consumption with Microsoft's MarkItDown. Use for extracting or reading PDF, Word, PowerPoint, Excel, HTML, CSV, JSON, XML, EPUB, ZIP, Outlook, or image content; converting one file or a folder; ingesting documents into a knowledge base; preparing content for summarization, search, RAG, or other analysis; using a configurable OpenAI-compatible vision model to extract text and meaning from standalone images or images embedded in PPTX, DOCX, PDF, and XLSX; or troubleshooting MarkItDown dependencies. Trigger on requests such as "convert to Markdown," "extract text," "read this document into text," "ingest these files," or "turn this PDF/deck/spreadsheet/image into text," even when MarkItDown is not named. Audio and video transcription are intentionally unsupported. Do not use to author or edit Office/PDF files; use the format-specific skill for those tasks.

  • Reads credentials
  • 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

We split this skill into the rules it gives an agent

8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read standalone images or images embedded in PPTX, DOCX, PDF, or XLSX: run the bundled script with an OpenAI-compatible vision model.

    line 15
  2. Very specific:

    Do not install markitdown[all] for this Skill because it includes audio-transcription dependencies.

    line 34
  3. Distinctive:

    Do not alter a user's project environment without permission.

    line 36
  4. Distinctive:

    Use a service that exposes an OpenAI-compatible chat-completions API.

    line 59
  5. Distinctive:

    Use the same option for PPTX, DOCX, PDF, and XLSX.

    line 69
  6. Distinctive:

    When bytes have no useful filename, pass a hint:

    line 124
  7. Distinctive:

    Keep the original source unless the user explicitly authorizes deletion.

    line 150
  8. Distinctive:

    Do not process audio or video with this Skill.

    line 156

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MarkItDown

Convert source material into Markdown optimized for language-model and text-analysis workflows. Preserve useful structure such as headings, lists, tables, links, and metadata; do not promise page-faithful visual reproduction.

Choose a workflow

  • Convert one local file or supported URL: use the markitdown CLI.
  • Convert several local files reproducibly: use scripts/convert.py.
  • Integrate conversion into an application or pass streams: use the Python API.
  • Read standalone images or images embedded in PPTX, DOCX, PDF, or XLSX: run the bundled script with an OpenAI-compatible vision model.
  • Reject audio and video inputs; this Skill does not transcribe them.

Install safely

Require Python 3.10 or newer. Prefer an isolated environment:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install 'markitdown[pdf,docx,pptx,xlsx,xls,outlook]' markitdown-ocr openai

Install only required extras when dependency size matters, for example:

python -m pip install 'markitdown[pdf,docx,pptx,xlsx]'

Do not install markitdown[all] for this Skill because it includes audio-transcription dependencies. Install only the document extras required by the task.

Do not alter a user's project environment without permission. Reuse an existing compatible environment when present; otherwise explain or create an isolated one within the task scope.

Convert content

For one input:

markitdown report.pdf -o report.md
markitdown https://example.com/page -o page.md
cat report.pdf | markitdown > report.md

For multiple local inputs, run:

python scripts/convert.py file.pdf slides.pptx notes.docx --output-dir markdown
python scripts/convert.py source-folder --output-dir markdown

The script recursively converts directories and preserves their relative structure. It preserves each source extension in the output name (file.pdf.md) to avoid collisions. Add --overwrite only when replacing existing outputs is intended.

Read images inside documents with a vision model

Use a service that exposes an OpenAI-compatible chat-completions API. This can be a local Ollama, LM Studio, or vLLM server, or another authorized URL. The model must support image input.

For Ollama, start the service and make sure a vision model is available, then run:

python scripts/convert.py diagram.png \
  --vision-model <vision-model> \
  --output-dir markdown

Use the same option for PPTX, DOCX, PDF, and XLSX. The OCR converter extracts embedded images, asks the configured model to read visible text and important visual information, and inserts the result into the document Markdown:

python scripts/convert.py presentation.pptx \
  --vision-model <vision-model> \
  --output-dir markdown

The default endpoint is the local Ollama URL http://127.0.0.1:11434/v1. Configure any other http:// or https:// OpenAI-compatible endpoint and its API key through dedicated environment variables:

export MARKITDOWN_LLM_BASE_URL=https://llm.example.com/v1
export MARKITDOWN_LLM_API_KEY=<api-key>

python scripts/convert.py presentation.pptx \
  --vision-model <vision-model> \
  --output-dir markdown

MARKITDOWN_LLM_API_KEY is optional for servers that do not authenticate; the script uses a non-secret placeholder when it is unset.

The CLI option overrides MARKITDOWN_LLM_BASE_URL when a one-off endpoint is needed:

python scripts/convert.py photos \
  --vision-model <vision-model> \
  --llm-base-url http://localhost:1234/v1 \
  --image-prompt "Describe the image and transcribe visible text." \
  --output-dir markdown

The script accepts valid http:// and https:// endpoints and never prints the API key. A remote endpoint receives standalone or document-embedded image bytes, so confirm authorization and data-handling requirements before using one. PPTX uses MarkItDown's built-in image-description path; DOCX, PDF, and XLSX explicitly register only their OCR converters rather than loading arbitrary plugins. Without --vision-model, JPG/PNG conversion is limited to locally extractable metadata, and document output omits model-generated image text.

For application code:

from markitdown import MarkItDown

converter = MarkItDown(enable_plugins=False)
result = converter.convert("report.xlsx")
markdown = result.markdown

result.text_content remains a soft-deprecated alias for result.markdown.

Choose the narrowest API that fits:

MethodUse for
convert(source)Trusted path, URL, or stream when permissive dispatch is useful
convert_local(path)Local files only; safest default for on-disk content
convert_uri(uri) / convert_url(url)Remote content, including supported YouTube URLs
convert_stream(fileobj)An already-open binary stream; provide StreamInfo when the type is ambiguous
convert_response(response)A requests.Response fetched under caller-controlled network policy

When bytes have no useful filename, pass a hint:

from markitdown import MarkItDown, StreamInfo

with open("mystery.bin", "rb") as stream:
    result = MarkItDown().convert_stream(
        stream,
        stream_info=StreamInfo(extension=".pdf", mimetype="application/pdf"),
    )

Handle failures

Catch MarkItDownException when conversion errors need programmatic handling. Its subclasses include MissingDependencyException, UnsupportedFormatException, and FileConversionException. A recognized format with a missing parser can surface as a FileConversionException wrapping the dependency error, so inspect the full message and conversion attempts instead of catching only MissingDependencyException.

Install the exact extra named in a missing-dependency message and retry. If installation is unavailable, fall back to a dedicated format skill rather than abandoning the extraction task.

Verify the result

After conversion:

  1. Confirm the output exists, is non-empty, and is valid UTF-8 Markdown.
  2. Inspect headings, tables, links, and representative sections against the source.
  3. Report unsupported or weakly extracted content instead of silently claiming completeness.
  4. For standalone and embedded images, confirm the vision model returned useful visible text and visual descriptions.
  5. Keep the original source unless the user explicitly authorizes deletion.

Security boundaries

MarkItDown performs file and network I/O with the current process privileges. Treat source paths, URLs, archives, plugins, and generated output as untrusted when their provenance is unknown. Avoid broad filesystem privileges, do not enable plugins implicitly, and use the narrowest conversion method available. Prefer a loopback LLM for sensitive material; when a remote endpoint is configured, treat every extracted image as externally transmitted data.

Do not process audio or video with this Skill. Route those inputs to a separately reviewed local transcription workflow if support is added later.

MarkItDown produces analysis-oriented Markdown, not a high-fidelity replacement for the original document. Use a format-specific document skill when layout preservation, editing, tracked changes, or pixel-accurate rendering matters.

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.