Docx to markdown

From jykim/claude-obsidian-skills · View interactive version

Docx to markdown is an AI agent skill from the GitHub repository jykim/claude-obsidian-skills. Convert DOCX files to well-formatted markdown files with images extracted.

How to use this skill

Skill file

DOCX to Markdown Skill

Convert DOCX files to well-formatted markdown files with images extracted.

Usage

python3 docx_to_markdown.py "<docx_path>" -o "<output_path>"

Features

Output Structure

output_dir/
├── document.docx           # Original file
├── document.md             # Extracted markdown
└── _files_/                # Images folder
    ├── DocTitle_image1.png
    ├── DocTitle_figure2.jpg
    └── ...

Image Prefix

Images are extracted with a document prefix derived from the title:

This prevents filename collisions when extracting multiple documents to the same folder.

Output Format

---
title: {from metadata}
author: {from metadata}
source_file: original.docx
source_type: docx
extracted: YYYY-MM-DD HH:MM:SS
status: extracted
---

# {Document Title}

{content with ![alt](_files_/DocTitle_image.png) links}

Dependencies

pip install python-docx

Or use requirements.txt:

pip install -r requirements.txt

Options

| Flag | Description |

|------|-------------|

| -o, --output | Output markdown file path (default: same as docx with .md) |

| -q, --quiet | Suppress progress messages |

Limitations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.