doc-to-markdown

Convert DOCX, PDF, and PPTX documents into clean Markdown files.

Updated Jul 6, 2026
One-click install
npx skills add https://github.com/shirulot/codex-skill --skill doc-to-markdown
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doc-to-markdown
Source: https://github.com/shirulot/codex-skill/tree/main/doc-to-markdown
Command: npx skills add https://github.com/shirulot/codex-skill --skill doc-to-markdown

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymupdf4llm, markitdown, pandoc, python-docx, pymupdf, pytest, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill solves the frustration of messy, broken, or unusable Markdown output when converting complex DOCX, PDF, or PPTX files, ensuring clean and structured results.

Core Features & Use Cases

  • Intelligent Orchestration: Automatically selects the best tool (Pandoc, PyMuPDF4LLM, or MarkItDown) based on the file format and desired quality mode.
  • Automatic Post-Processing: Fixes common conversion artifacts like broken grid tables, incorrect image paths, CJK bold spacing, and Pandoc attribute noise.
  • Use Case: Convert a complex 19MB technical manual containing 77 images and nested tables into a clean, readable Markdown file ready for documentation or LLM ingestion.

Quick Start

Use the doc-to-markdown skill to convert the document named report.docx into a high-quality markdown file.

Frequently Asked Questions about doc-to-markdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a complex PDF with tables and images to clean Markdown?

To convert a complex PDF to clean Markdown, this Skill orchestrates extraction engines like PyMuPDF4LLM to handle tables, images, and text structure while applying automated post-processing fixes for high-quality output.

What is the best way to convert DOCX files for LLM ingestion?

The best way to convert DOCX files for LLM ingestion is using automated orchestration tools that select Pandoc or MarkItDown, applying post-processing to fix broken grid tables and CJK bold spacing for clean structural results.

Why does my Pandoc conversion output contain broken grid tables and attribute noise?

Pandoc conversion often outputs broken grid tables and attribute noise due to format parsing limitations; automated post-processing fixes are required to clean these artifacts and produce structured Markdown files.

Can I automate document migration for production-grade pipelines using MarkItDown?

Yes, you can automate production-grade document migration by orchestrating MarkItDown alongside Pandoc and PyMuPDF4LLM, ensuring complex formats like DOCX and PPTX are transformed into clean Markdown for pipeline integration.

Does PyMuPDF4LLM support extracting text structure from technical manuals with nested tables?

Yes, PyMuPDF4LLM supports extracting text structure from technical manuals with nested tables, intelligently routing the extraction process to ensure images and complex grid structures are preserved in the final Markdown file.