
Markitdown
Convert PDFs, Word docs, and slides to Markdown so agents and solo builders can search, summarize, and pipeline scientific sources.
Overview
MarkItDown is an agent skill most often used in Idea research (also Build docs, Grow content) that converts PDF, DOCX, and PPTX files to Markdown via the MarkItDown Python library.
Install
npx skills add https://github.com/k-dense-ai/scientific-agent-skills --skill markitdownWhat is this skill?
- Single API: MarkItDown().convert(path) for PDF, DOCX, and PPTX
- Stream conversion via convert_stream with explicit file_extension
- Batch loop pattern over research_papers/ with mirrored markdown output
- UTF-8 safe write pattern for downstream chunking and embeddings
- Pathlib-based directory workflows for indie research archives
- Supports PDF, DOCX, and PPTX in documented examples
Adoption & trust: 590 installs on skills.sh; 27.6k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your research and references are locked in PDFs and Office formats that agents cannot chunk, cite, or search effectively.
Who is it for?
Solo builders building literature corpora, notebooks, or RAG from downloaded papers and slide decks on disk.
Skip if: Live web scraping-only workflows or teams that already standardize on a managed document API with OCR you do not control locally.
When should I use this skill?
You have binary documents on disk and need Markdown text for agent analysis, search, or embedding pipelines.
What do I get? / Deliverables
You get UTF-8 Markdown files per document—ready for summarization, embedding pipelines, or repo-backed knowledge bases.
- Per-file .md text output
- Optional batch markdown corpus in an output directory
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
MarkItDown is shelved under Idea research because the primary trigger is ingesting external papers and reports before analysis, prototyping, or knowledge-base build-out. Research subphase covers normalizing heterogeneous document formats into agent-readable text for literature review and RAG prep.
Where it fits
Batch-convert arXiv PDFs in research_papers/ before summarization or hypothesis work.
Turn internal DOCX specs into Markdown committed beside agent SKILL.md files.
Convert webinar PPTX decks into Markdown drafts for blog and newsletter repurposing.
How it compares
Python integration skill for local file conversion—not a hosted OCR SaaS or LaTeX authoring template.
Common Questions / FAQ
Who is markitdown for?
Indie researchers, data-minded solo founders, and agent builders who need quick PDF and Office-to-Markdown conversion in Python scripts.
When should I use markitdown?
Use it in Idea research when collecting papers, in Build docs when normalizing specs, and in Grow content when repurposing slide decks into searchable Markdown.
Is markitdown safe to install?
Use the Security Audits panel on this Prism page to review risk and dependencies before installing; conversion only touches files you point the library at.
SKILL.md
READMESKILL.md - Markitdown
# MarkItDown Example Usage This document provides practical examples of using MarkItDown in various scenarios. ## Basic Examples ### 1. Simple File Conversion ```python from markitdown import MarkItDown md = MarkItDown() # Convert a PDF result = md.convert("research_paper.pdf") print(result.text_content) # Convert a Word document result = md.convert("manuscript.docx") print(result.text_content) # Convert a PowerPoint result = md.convert("presentation.pptx") print(result.text_content) ``` ### 2. Save to File ```python from markitdown import MarkItDown md = MarkItDown() result = md.convert("document.pdf") with open("output.md", "w", encoding="utf-8") as f: f.write(result.text_content) ``` ### 3. Convert from Stream ```python from markitdown import MarkItDown md = MarkItDown() with open("document.pdf", "rb") as f: result = md.convert_stream(f, file_extension=".pdf") print(result.text_content) ``` ## Scientific Workflows ### Convert Research Papers ```python from markitdown import MarkItDown from pathlib import Path md = MarkItDown() # Convert all papers in a directory papers_dir = Path("research_papers/") output_dir = Path("markdown_papers/") output_dir.mkdir(exist_ok=True) for paper in papers_dir.glob("*.pdf"): result = md.convert(str(paper)) # Save with original filename output_file = output_dir / f"{paper.stem}.md" output_file.write_text(result.text_content) print(f"Converted: {paper.name}") ``` ### Extract Tables from Excel ```python from markitdown import MarkItDown md = MarkItDown() # Convert Excel to Markdown tables result = md.convert("experimental_data.xlsx") # The result contains Markdown-formatted tables print(result.text_content) # Save for further processing with open("data_tables.md", "w") as f: f.write(result.text_content) ``` ### Process Presentation Slides ```python from markitdown import MarkItDown from openai import OpenAI # With AI descriptions for images client = OpenAI() md = MarkItDown( llm_client=client, llm_model="anthropic/claude-sonnet-4.5", llm_prompt="Describe this scientific slide, focusing on data and key findings" ) result = md.convert("conference_talk.pptx") # Save with metadata output = f"""# Conference Talk {result.text_content} """ with open("talk_notes.md", "w") as f: f.write(output) ``` ## AI-Enhanced Conversions ### Detailed Image Descriptions ```python from markitdown import MarkItDown from openai import OpenAI # Initialize OpenRouter client client = OpenAI( api_key="your-openrouter-api-key", base_url="https://openrouter.ai/api/v1" ) # Scientific diagram analysis scientific_prompt = """ Analyze this scientific figure. Describe: - Type of visualization (graph, microscopy, diagram, etc.) - Key data points and trends - Axes, labels, and legends - Scientific significance Be technical and precise. """ md = MarkItDown( llm_client=client, llm_model="anthropic/claude-sonnet-4.5", # recommended for scientific vision llm_prompt=scientific_prompt ) # Convert paper with figures result = md.convert("paper_with_figures.pdf") print(result.text_content) ``` ### Different Prompts for Different Files ```python from markitdown import MarkItDown from openai import OpenAI # Initialize OpenRouter client client = OpenAI( api_key="your-openrouter-api-key", base_url="https://openrouter.ai/api/v1" ) # Scientific papers - use Claude for technical analysis scientific_md = MarkItDown( llm_client=client, llm_model="anthropic/claude-sonnet-4.5", llm_prompt="Describe scientific figures with technical precision" ) # Presentations - use GPT-4o for visual understanding presentation_md = MarkItDown( llm_client=client, llm_model="anthropic/claude-sonnet-4.5", llm_prompt="Summarize slide content and key visual elements" ) # Use appropriate instance for each file paper_result = scientific_md.convert("research.pdf") slides_result = presentation_md.convert("talk.pptx") `