# Word2md

> Convert Word (.docx) files with Office Math formulas to clean Markdown with LaTeX. Handles OMML to LaTeX conversion, Greek letters, subscripts, superscripts, fractions, and display/inline math.

- **Type:** Skill
- **Install:** `agentstack add skill-phanghonghao-thu-awesome-skills-word2md`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [phanghonghao](https://agentstack.voostack.com/s/phanghonghao)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [phanghonghao](https://github.com/phanghonghao)
- **Source:** https://github.com/phanghonghao/THU-Awesome-Skills/tree/main/skills/word2md

## Install

```sh
agentstack add skill-phanghonghao-thu-awesome-skills-word2md
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Word to Markdown Converter

Convert Word (.docx) files containing Office Math (OMML) formulas to clean Markdown with LaTeX math.

## When to Use

- User says "convert docx to md", "word to markdown", "word2md"
- User provides a `.docx` file and wants it in Markdown format
- User needs to extract math formulas from Word documents

## How to Use

```bash
PYTHONIOENCODING=utf-8 python ~/.claude/skills/word2md/word2md.py "" [""]
```

- **input.docx** (required): Path to the Word file
- **output.md** (optional): Output file path. If omitted, prints to stdout

### Examples

```bash
# Convert and print to stdout
PYTHONIOENCODING=utf-8 python ~/.claude/skills/word2md/word2md.py "document.docx"

# Convert and save to file
PYTHONIOENCODING=utf-8 python ~/.claude/skills/word2md/word2md.py "document.docx" "output.md"
```

## Features

- **OMML to LaTeX**: Converts Office Math XML elements (subscripts, superscripts, fractions, square roots, delimiters, sums/integrals, accents, limits, functions)
- **Unicode to LaTeX**: Greek letters (alpha, beta, sigma...) and math symbols (geq, times, circ...)
- **Display vs inline math**: `oMathPara` produces `$$...$$`, `oMath` produces `$...$`
- **Post-processing**: Cleans up delimiter issues, fixes command spacing, bold headers

## Dependencies

- `python-docx` must be installed: `python -m pip install python-docx`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [phanghonghao](https://github.com/phanghonghao)
- **Source:** [phanghonghao/THU-Awesome-Skills](https://github.com/phanghonghao/THU-Awesome-Skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-phanghonghao-thu-awesome-skills-word2md
- Seller: https://agentstack.voostack.com/s/phanghonghao
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
