askill
markdown-to-docx

markdown-to-docxSafety 100Repository

Convert markdown documents to Microsoft Word (.docx) format with Korean font support, bold/italic formatting, nested list indentation, and professional styling

1 stars
1.2k downloads
Updated 12/4/2025

Package Files

Loading files...
SKILL.md

Markdown to DOCX Converter

Convert markdown documents to professionally formatted Microsoft Word (.docx) files with full support for Korean text, inline formatting, and nested lists.

When to Use This Skill

Use this skill when you need to:

  • Convert markdown documents to Word format for sharing or editing
  • Create DOCX files with proper Korean font rendering
  • Preserve formatting like bold, italic, headers, and lists
  • Export vault notes to Word documents
  • Generate professional documents from markdown content

Trigger phrases:

  • "Convert this markdown to DOCX"
  • "Export [filename].md to Word"
  • "Create a Word document from this markdown"
  • "Generate DOCX from [filename]"

Features

✅ Korean Language Support

  • Default font: Malgun Gothic (맑은 고딕)
  • Proper rendering of Korean characters
  • Mixed Korean/English text support

✅ Inline Formatting

  • Bold text: **text** or __text__
  • Italic text: *text* or _text*
  • Preserves formatting in headers, lists, and paragraphs

✅ Nested List Support

  • Bullet lists with proper indentation
  • Numbered lists with hierarchy
  • Automatic indent calculation (2 spaces = 0.5 inch)
  • Checkbox support: - [ ] and - [x]

✅ Document Structure

  • Headers: H1, H2, H3, H4
  • Block quotes with indentation
  • Regular paragraphs
  • Comment filtering (%%comment%%)

How It Works

  1. Parse Markdown: Reads markdown content line by line
  2. Process Structure: Identifies headers, lists, quotes, paragraphs
  3. Apply Formatting: Converts markdown syntax to DOCX formatting
  4. Set Fonts: Applies Korean-friendly fonts throughout
  5. Generate File: Creates .docx file ready for Word/Google Docs

Usage Examples

Example 1: Convert Korean Document

"Convert this markdown to DOCX:

# 한국어 문서 제목

## 소개
이것은 **굵은 글씨**이고 이것은 *기울임*입니다.

- 항목 1
  - 중첩된 항목
- 항목 2"

Example 2: Export Vault Note

"Export 'Publish/AI for Better Me/AI for Better Me - FastCampus Class.md' to DOCX"

Example 3: Mixed Language Content

"Create a Word document from this:

# AI for PKM

## Core Concepts
- **지식 관리** (Knowledge Management)
  - Information capture
  - 자동 정리 (Auto-organization)
- AI Integration"

Supported Markdown Elements

Markdown SyntaxDOCX OutputNotes
# Heading 1Heading Level 1H1 style
## Heading 2Heading Level 2H2 style
### Heading 3Heading Level 3H3 style
**bold**Bold textRun-level formatting
*italic*Italic textRun-level formatting
- Item• Bullet listList Bullet style
- Nested◦ Indented bullet0.5" indent
1. Item1. Numbered listList Number style
- [ ]☐ CheckboxUnchecked
- [x]☑ CheckboxChecked
> QuoteIndented quoteItalic, 0.5" indent
%%comment%%(removed)Filtered out

Technical Details

Font Configuration

  • Default: Malgun Gothic (11pt)
  • Applied to all runs and paragraphs
  • Consistent rendering across Korean/English

Indentation Rules

  • Base indent: 0.5 inches per level
  • Calculated from leading spaces (2 spaces = 1 level)
  • Applies to both bullet and numbered lists

Processing Steps

# Main workflow
1. Read markdown file or content
2. Skip YAML frontmatter (---...---)
3. Process each line:
   - Detect type (header, list, paragraph)
   - Calculate indent level
   - Apply inline formatting (bold/italic)
   - Create DOCX element with proper style
4. Save to .docx file

Scripts

docx_generator.py

Main conversion script with:

  • DOCXGenerator class for document creation
  • process_inline_formatting() for bold and italic
  • get_indent_level() for nested list calculation
  • create_docx_from_markdown() entry point

Tips for Best Results

  1. Clean Frontmatter: The converter skips YAML frontmatter automatically
  2. Consistent Spacing: Use 2 spaces for each indentation level
  3. List Markers: Use - for bullets, 1. for numbers
  4. Korean Text: No special handling needed - just write normally
  5. File Size: Works well with documents up to ~500 lines

Limitations

  • Does not support tables (requires complex DOCX table API)
  • Images are not embedded (wiki links are preserved as text)
  • Internal links ([[wikilinks]]) rendered as plain text
  • Code blocks rendered as regular paragraphs

Output Format

Generated DOCX files include:

  • Professional document styling
  • Proper heading hierarchy
  • Consistent font throughout (Malgun Gothic)
  • Preserved formatting and structure
  • Ready for Microsoft Word, Google Docs, LibreOffice

Example Output Structure

Document Properties:
├── Default Font: Malgun Gothic 11pt
├── Page Size: Letter (8.5" × 11")
└── Margins: Normal (1" all sides)

Content Hierarchy:
├── Heading 1 (Title level)
├── Heading 2 (Section)
│   ├── Paragraph with bold/italic
│   ├── Bullet List
│   │   └── Nested Bullet (indented)
│   └── Numbered List
└── Heading 2 (Next section)

Dependencies

Requires python-docx library:

pip install python-docx>=1.1.0

Related Skills

  • csv-analysis: Analyze CSV files and export to Excel
  • pdf-skill: Work with PDF documents
  • claude-epub-skill: Convert markdown to EPUB format

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

96/100Analyzed 2/12/2026

An exceptionally well-documented skill for converting Markdown to DOCX, featuring specific support for Korean typography, nested lists, and clear technical implementation details.

100
100
95
98
92

Metadata

Licenseunknown
Version-
Updated12/4/2025
Publisherjykim

Tags

apigithub-actionsllm