Skip to content
Back to skills

Docx To Markdown

ASecurity

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

  • 50 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 11, 2026
content-marketingpythonbash

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 3 files and shows the line behind each finding

Scanned June 11, 2026

npx -y skills add jykim/claude-obsidian-skills --skill docx-to-markdown --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docx To Markdown?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docx To Markdown
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jykim-docx-to-markdown/badge)](https://www.skillsdirectory.com/skills/jykim-docx-to-markdown)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# DOCX to Markdown Skill

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

## Usage

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

## Features

- **Metadata extraction**: title, author, subject, keywords
- **Heading preservation**: Maintains H1-H6 hierarchy from Word styles
- **Inline formatting**: Bold, italic conversion
- **List support**: Ordered and unordered lists
- **Table extraction**: Tables converted to markdown format
- **Image extraction**: Extracts images to `_files_/` folder with document prefix

## 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:
- Title: "Die Empty: Unleash Your Best Work Every Day"
- Prefix: `DieEmptyUnleash` (first 3 words, special chars removed)
- Image: `_files_/DieEmptyUnleash_image1.png`

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

## Output Format

```markdown
---
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

```bash
pip install python-docx
```

Or use requirements.txt:
```bash
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

- **Password-protected DOCX**: Cannot be opened (will fail with error)
- **Complex layouts**: May not preserve exact positioning
- **Embedded objects**: Non-image objects may not be extracted

Files in this skill

  • SKILL.md1.9 KB
  • docx_to_markdown.py11.5 KB
  • requirements.txt19 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.