docx-to-md for Openclaw

A robust automation tool to convert .docx files into structured Markdown while preserving formatting and extracting images.

ooliuhao
v1.0.0
Feb 27, 2026
0
1.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install docx-to-md

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install docx-to-md using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is docx-to-md?

The docx-to-md utility is a streamlined solution for converting legacy Microsoft Word documents into clean, web-ready Markdown. As a key component of the Openclaw Skills library, it allows developers and content creators to automate the migration of documentation without losing critical structure or visual assets.

The skill handles the conversion of headers, lists, and tables, ensuring that the resulting markdown is compatible with modern text editors and static site generators. By automating the extraction of embedded images and providing relative links within the text, it significantly reduces the manual overhead typically associated with document format migration. This makes it an essential tool for maintaining consistency across a variety of documentation platforms using Openclaw Skills.

docx-to-md Use Cases

  • Migrating legacy corporate documentation from Microsoft Word to GitHub or GitLab repositories.
  • Batch processing Word-based drafts for technical blogs and static site generators like Jekyll or Hugo.
  • Extracting high-quality images from Word files for use in web development and content management projects.
  • Automating content pipelines that require document format standardization within Openclaw Skills workflows.

How docx-to-md Works

  1. The skill receives a .docx file path as the primary input for processing.
  2. It utilizes the python-docx library to parse the internal XML structure of the Word document.
  3. It maps specific Word styles, such as Heading 1 through Heading 4, into their standard Markdown equivalents.
  4. All embedded images are extracted from the document and saved as individual files (PNG, JPG, or GIF) in a designated output folder.
  5. It generates a final Markdown file where text formatting is preserved and extracted images are correctly referenced via relative paths.

docx-to-md Setup

Ensure you have Python 3.7 or higher installed. You will need to install the primary dependency before running the skill:

pip install python-docx

You can then run the conversion script via the command line:

python scripts/docx_to_md.py "your_document.docx"

docx-to-md Data Schema & Taxonomy

The skill organizes its output into a structured directory to ensure asset integrity.

File Type Description Format
Source Input Microsoft Word file .docx
Output File Converted Markdown document .md
Assets Extracted document images image_*.png/jpg/gif

Formatting Mapping Table:

  • Header 1 to 4 -> # to ####
  • Unordered Lists -> - List Item
  • Ordered Lists -> 1. List Item
  • Tables -> Markdown Pipe Tables
  • Images -> Markdown Image Syntax

docx-to-md Advanced Features

  • Automated image extraction with intelligent filename generation to prevent overwrites.
  • Precise table conversion that maintains structural integrity for complex data sets.
  • Flexible output directory management to support organized documentation storage within Openclaw Skills.
  • Scriptable interface allowing for integration into larger Python-based automation suites.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*