docx-to-md_skill

This skill converts Word documents to Markdown and extracts embedded images, streamlining documentation workflows efficiently.
  • Python

2.5k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill docx-to-md

  • _meta.json274 B
  • SKILL.md1.2 KB

Overview

This skill converts Microsoft Word (.docx) documents into Markdown files and extracts embedded images to a target directory. It provides both a programmatic API and a simple command-line entry point for quick conversions. The output preserves headings, lists, tables and writes extracted images as image_*.png/jpg/gif files. It is implemented in Python and uses python-docx for parsing.

How this skill works

The tool parses the .docx file structure, maps Word elements to Markdown equivalents (headings, ordered/unordered lists, tables, images), and writes a .md file with inline image references. Images found in the document are saved to the output directory with predictable filenames. You can call the docx_to_md function from Python or run the provided script from the command line with a path to the .docx file.

When to use it

  • You need to convert a .docx document into Markdown for publishing or version control.
  • You want to extract all embedded images from a Word document into a separate folder.
  • You need a quick programmatic conversion inside a Python workflow or pipeline.
  • You prefer a lightweight, dependency-minimal tool that preserves basic formatting.

Best practices

  • Run conversions in a copy of the original file to avoid accidental edits.
  • Provide an explicit output directory to keep converted files and images organized.
  • Check tables and complex layouts after conversion; adjust by hand if needed.
  • Ensure python-docx is installed (pip install python-docx) and use Python 3.7+.
  • Name files and directories using ASCII-safe characters to prevent path encoding issues.

Example use cases

  • Migrating project documentation from Word to a Markdown-based docs site or wiki.
  • Extracting figures from research reports for reuse in presentations or web pages.
  • Automating batch conversion of .docx files in a content migration script.
  • Preparing Word-authored blog posts for static site generators that accept Markdown.

FAQ

No. It preserves basic structure: headings, lists, tables and images. Footnotes, tracked changes and advanced layout features are not converted and may require manual handling.

How do I control the output folder name?

You can pass an output_dir argument to the docx_to_md function. If omitted, the tool creates a default <filename>_output folder next to the input file.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational