DOCX to Markdown with Images
Paste the following prompt into your AI chat to install this skill:
Please install @user_29e2fa9e/docx-to-md-with-images using https://skillhub.cn/install/skillhub.md.
About this skill
What It Solves
Converting .docx files to Markdown often loses images, leaves broken absolute paths, and leaves HTML styling behind the text. For engineers who need the output for documentation, search, or further editing, that result is hard to reuse. This skill targets high-fidelity .docx to .md conversion: it preserves headings, tables, lists, bold/italic formatting, and extracts images into usable relative-path assets.
How It Works and Where It Stops
The main workflow prefers pandoc: it checks for pandoc, optionally auto-installs it, runs conversion, then uses fix_images.py to flatten img/media/ into img/, rewrite  links to relative paths, and remove stray HTML tags or style attributes around images. If pandoc is unavailable, the python-docx fallback can handle headings, inline formatting, nested lists, and tables, but it does not extract images. For non-Word formats such as PDF, PPTX, XLSX, HTML, CSV, JSON, and XML, the skill can try uvx markitdown; on some Windows systems this may fail due to onnxruntime DLL issues, so format-specific tools like python-pptx or openpyxl may be needed. Also, .emf images have poor Markdown viewer compatibility, so converting them to PNG is safer, and GFM output is recommended for broad compatibility.
Use Cases
- Convert a Word weekly report into GFM, preserving headings, tables, images, and relative image paths.
- Turn a customer .docx manual into Markdown, then verify image paths and remove stray HTML styles.
- Fall back to python-docx on a machine without pandoc for headings, lists, and tables in internal docs.
- Extract searchable text from PPTX or XLSX via markitdown, switching to format-specific parsers if it fails.
Best For
- Documentation engineers who convert Word specs into searchable Markdown while keeping screenshots intact.
- QA engineers turning .docx test reports, tables, lists, and images into wiki-ready Markdown.
- Project managers who archive client Word manuals and need consistent Markdown with fixed image paths.
- DevOps engineers migrating docs on restricted machines using python-docx when pandoc is unavailable.
Related Skills
Generate and edit .pptx decks with python-pptx, applying structured layouts, design rules, native charts, and visual QA to reduce template-like output.
Tencent Cloud Table Recognition V3 is an OCR skill for detecting and recognizing tables in images or PDFs, supporting various table types like linear and borderless tables, with Excel export.
The complete set of online document operation tools provided by Tencent Docs MCP, supporting creation, querying, and editing of smart docs, Excel, PPT, mind maps, and more.
Turn a topic, notes, or tables into a complete PPT plan with logic, page layouts, visual and chart guidance, and natural defense scripts.