agentleFS
OpenTechILOpenTechIL/markitdown-for-ai/skills/document-to-markdown/SKILL.md

document-to-markdown

Skill3 starsChanged 7 months agoApache-2.0View on GitHub

Use when asked to read, extract content from, or convert documents — PDF, DOCX, PPTX, XLSX, or HTML files — into Markdown text so an AI agent can process them.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. instrument-org/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When a user gives you a document file to read or analyze:

    line 72
  2. Distinctive:

    Check if Docker is available — if not, try Podman (the skill automatically falls back)

    line 74
  3. Distinctive:

    Run the conversion command above

    line 75
  4. Distinctive:

    Read and reason over the Markdown directly — no temp files needed

    line 77
  5. Distinctive:

    Use this skill whenever you need to extract or process content from documents.

    line 90
  6. Distinctive:

    Processing uploaded files: When users upload documents for analysis — convert first, then reason over the markdown

    line 154
  7. Distinctive:

    Linux servers without Docker: - No daemon required

    line 203
  8. Distinctive:

    Check what container runtime is installed:

    line 215
  9. Distinctive:

    If Docker is not available, Podman can be used as a direct drop-in replacement.

    line 225

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Document to Markdown Conversion

Convert documents to Markdown using the markitdown-for-ai Docker image. No local Python install needed — runs entirely in Docker.

Prerequisites

⚠️ This skill requires Docker or Podman to be installed and available on your system. Ensure either Docker Desktop or Podman is running before using this skill.

Quick Commands

This skill uses Docker by default. If Docker is not available, it will automatically try Podman instead.

From stdin (pipe):

# Try Docker first
docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < file.pdf

# If Docker is not available, use Podman:
podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < file.pdf

From a local file (mount current directory):

# Try Docker first
docker run --rm -v "$(pwd):/data" -w /data ghcr.io/opentechil/markitdown-for-ai:latest file.docx

# If Docker is not available, use Podman:
podman run --rm -v "$(pwd):/data" -w /data ghcr.io/opentechil/markitdown-for-ai:latest file.docx

Save output to a file:

# Try Docker first
docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < input.pptx > output.md

# If Docker is not available, use Podman:
podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < input.pptx > output.md

Pipe from cat:

# Try Docker first
cat file.xlsx | docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest

# If Docker is not available, use Podman:
cat file.xlsx | podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest

Supported Formats

FormatExtension
PDF.pdf
Word.docx
PowerPoint.pptx
Excel.xlsx
HTML.html

Pull the Image (first time)

docker pull ghcr.io/opentechil/markitdown-for-ai:latest

Agent Workflow

When a user gives you a document file to read or analyze:

  1. Check if Docker is available — if not, try Podman (the skill automatically falls back)
  2. Run the conversion command above
  3. Capture stdout as the Markdown content
  4. Read and reason over the Markdown directly — no temp files needed

Example — user says "summarize this PDF":

# Capture markdown into a shell variable or pipe directly to next step
docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < report.pdf

# If Docker fails, try Podman:
podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < report.pdf

When to Use This Skill

Use this skill whenever you need to extract or process content from documents. Here are common scenarios:

Document Conversion & Extraction

  • Reading DOCX files: "Read this Word document", "extract text from docx"
    docker run --rm -v "$(pwd):/data" -w /data ghcr.io/opentechil/markitdown-for-ai:latest document.docx
    
    # Or with Podman if Docker is not available:
    podman run --rm -v "$(pwd):/data" -w /data ghcr.io/opentechil/markitdown-for-ai:latest document.docx
  • Reading PDF files: "Convert PDF to markdown", "extract PDF content"
    docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < report.pdf
    
    # Or with Podman:
    podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < report.pdf
  • Processing PowerPoint: "Extract slides from pptx", "convert presentation"
    docker run --rm -v "$(pwd):/data" -w /data ghcr.io/opentechil/markitdown-for-ai:latest slides.pptx
    
    # Or with Podman:
    podman run --rm -v "$(pwd):/data" -w /data ghcr.io/opentechil/markitdown-for-ai:latest slides.pptx
  • Extracting Excel data: "Read spreadsheet", "convert xlsx to markdown"
    docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < data.xlsx
    
    # Or with Podman:
    podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < data.xlsx
  • Scraping HTML: "Convert web page to markdown", "extract article content"
    docker run --rm -v "$(pwd):/data" -w /data ghcr.io/opentechil/markitdown-for-ai:latest page.html
    
    # Or with Podman:
    podman run --rm -v "$(pwd):/data" -w /data ghcr.io/opentechil/markitdown-for-ai:latest page.html

AI & Automation Use Cases

  • Summarizing documents: "Summarize this PDF/report/document" — first convert to markdown, then use the extracted content for summarization
    content=$(docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < document.pdf)
    
    # If Docker fails, try Podman:
    content=$(podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < document.pdf)
    
    # Then feed $content to your summarization prompt
  • Analyzing contracts/agreements: "Extract key terms from this PDF", "read the contract"
    docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < contract.pdf
    
    # Or with Podman:
    podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < contract.pdf
  • Processing uploaded files: When users upload documents for analysis — convert first, then reason over the markdown
  • Batch document processing: Convert multiple files in a loop for indexing or analysis
    for f in *.pdf; do
      docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < "$f" > "${f%.pdf}.md"
      # Also try with Podman if needed:
      # podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < "$f" > "${f%.pdf}.md"
    done
  • RAG/embedding pipelines: "Prepare documents for vector storage" — convert documents to markdown for chunking and embedding
    docker run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < document.pdf | text-embeddings-cli embed
    
    # Or with Podman:
    podman run --rm -i ghcr.io/opentechil/markitdown-for-ai:latest < document.pdf | text-embeddings-cli embed

Examples

User RequestAction
"Read this PDF for me"Convert PDF to markdown and display content
"What's in this Word doc?"Convert DOCX to markdown and summarize
"Extract the table from this Excel file"Convert XLSX — tables are preserved in markdown format
"Convert this webpage to markdown"Convert HTML to markdown
"Summarize the presentation"Convert PPTX slides to markdown

Common Mistakes

MistakeFix
Using {owner} placeholderUse ghcr.io/opentechil/markitdown-for-ai:latest
Forgetting -i flag for stdinAlways add -i when piping
Mounting wrong pathUse $(pwd) and -w /data together
Expecting Docker to find relative paths without mountMount with -v "$(pwd):/data"

Docker vs Podman

This skill supports both Docker and Podman. Choose based on your environment:

When to use Docker

  • Development workstation - Docker Desktop on macOS/Windows
  • Production servers - Linux systems with Docker Engine
  • Most use cases - Full feature parity, easier setup

When to use Podman

  • Rootless containers - Better security and isolation
  • Linux servers without Docker - No daemon required
  • Cloud Native environments - Works with Kubernetes and container orchestration
  • Security compliance - Runs without root privileges

Choosing the right command

The examples above provide both Docker and Podman commands. The skill recommends trying Docker first — if it fails with "command not found" or other execution errors, simply use the Podman command instead.

Both Docker and Podman share the same image (ghcr.io/opentechil/markitdown-for-ai:latest), so the commands are identical except for docker vs podman.

Verifying which is available

Check what container runtime is installed:

# Check for Docker
docker --version

# Check for Podman
podman --version

If Docker is not available, Podman can be used as a direct drop-in replacement.

Pulling the image (one-time setup)

Since Docker and Podman share the same registry, the pull command is identical:

docker pull ghcr.io/opentechil/markitdown-for-ai:latest
podman pull ghcr.io/opentechil/markitdown-for-ai:latest

Pull once with your preferred runtime, and both will have access to the image locally.

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.