docx-to-md

Convert .docx files to Markdown with image extraction and pandoc cleanup.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/fabioc-aloha/tldr --skill docx-to-md-fabioc-aloha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx-to-md
Source: https://github.com/fabioc-aloha/tldr/tree/main/.github/skills/docx-to-md
Command: npx skills add https://github.com/fabioc-aloha/tldr --skill docx-to-md-fabioc-aloha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convert Word documents (.docx) into clean, Markdown-formatted text with image extraction and pandoc cleanup to streamline content workflows and publishing.

Core Features & Use Cases

  • Image extraction: Embedded images are saved to an images/ folder with sequential naming.
  • Pandoc cleanup: Removes escaped brackets, span classes, and trailing backslashes to produce clean Markdown.
  • Table normalization: Aligns columns and fixes table formatting for consistent rendering.
  • Heading normalization: Normalizes the document hierarchy so it starts at H1.
  • Frontmatter: Optional YAML frontmatter with title and date to enable metadata-driven docs.
  • Comment stripping: Removes Word review comments to reduce clutter.

Quick Start

Process a sample .docx file to generate a clean Markdown document.

Frequently Asked Questions about docx-to-md

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

FAQPage Schema
How do I convert Word documents to Markdown with images extracted?

Converting Word documents to Markdown with image extraction saves embedded images to an images/ folder with sequential naming. It also normalizes headings to start at H1 and strips Word comments for clean Markdown output.

What is the best way to clean up pandoc output when converting docx to Markdown?

Pandoc cleanup for docx to Markdown conversion removes escaped brackets, span classes, and trailing backslashes. It also aligns table columns and fixes table formatting to ensure consistent Markdown rendering.

Can I add YAML frontmatter when converting a .docx file to Markdown?

Adding YAML frontmatter during .docx to Markdown conversion is optional and includes title and date metadata. This enables metadata-driven document workflows for content migration and knowledge-base preparation.

Does docx to Markdown conversion preserve table formatting and heading hierarchy?

Docx to Markdown conversion normalizes document heading hierarchy to start at H1 and aligns table columns for consistent rendering. This ensures structured content remains intact for Markdown publishing workflows.

Why does my converted Markdown still contain Word review comments?

Converted Markdown retains Word review comments when comment stripping is not applied. This conversion process removes Word comments to reduce clutter, alongside cleaning escaped brackets and span classes from pandoc output.