/mullans-skills:mark2wordfrom mullans-skills
Use when converting styled Markdown, YAML-frontmatter documents, or .md files into Microsoft Word .docx with mark2word, including selecting or creating project-local themes.
Ships in mullans-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Mark2Word converts styled Markdown into a Word .docx. Styling lives in YAML frontmatter, external theme files, and named regions — the Markdown body stays readable in any viewer.
# … ######) with Word bookmarks for internal links- / *) and ordered (1.) lists with nested levels (2 spaces per indent)> quoted text, multi-line)code, and hyperlinks (emphasis inside links works)[text](#heading-slug)Left || Right (ignored inside backticks)```lang … ```) (paths relative to the markdown file)---, ***, or ___ on their own line (body only; frontmatter stripped first)<!-- region: name --> … <!-- /region --> (nested supported)<!-- pagebreak --> (HTML comment, invisible in MD viewers)border_bottom, border_left, border_right), indent_left / indent_rightbody, text, blockquote, code, code_block, code_inline, image, hr, heading, h1–h6, list, ol, ul, table, th, tddefaults.yaml) merged under every theme — code fills, blockquote bar styling, list indentsfill: none to disablelist / ol / ul → levels (including zero-padded 01.)code_block.langs.{lang} or code.langs.{lang} matched to fence language tagswidth, max_width, align, alt_mode (doc writes Word accessibility metadata; caption/both add visible text)border, cell padding, space_before / space_after$name) with top-level props plus nested element overrides (body, h2, table, …)letter, a4), margins, header/footer with {page}, {pages}, {title} and || dual-alignextends in frontmatter and in theme YAML filesWord-only features (frontmatter, HTML comments) do not appear in normal Markdown preview.
scripts/mark2word.py — bundled converter (python-docx, PyYAML)scripts/requirements.txt — runtime dependency ranges for the bundled converterassets/base-theme.yaml — starter theme; pass as --theme-dir when documents use extends: base-theme.yaml (built-in defaults apply even without this file)references/theme-design.md — theme authoring reference (read when creating, editing, or substantially customizing themes)Prefer the user's project environment when one exists.
The bundled converter requires Python 3.10 or newer, python-docx, and PyYAML. If the project environment does not already provide them, install the pinned-compatible ranges into that environment:
python -m pip install -r /path/to/mark2word/scripts/requirements.txt
Bundled skill script (absolute paths):
python /path/to/mark2word/scripts/mark2word.py \
--theme-dir /path/to/mark2word/assets \
/path/to/project/document.md \
-o /path/to/project/document.docx
Omit output path to write <basename>.docx beside the input.
Batch: repeat -i; -o must be a directory:
uv run mark2word -i a.md -i b.md -o ./out/
Validate document (frontmatter, theme chain, markdown parse):
uv run mark2word --check document.md
Validate theme YAML (extends chain, page size, list formats, keys):
uv run mark2word --check-theme .mark2word/themes/my-theme.yaml --theme-dir .mark2word/themes
| Flag | Purpose |
|---|---|
-i / --input | Markdown input (repeat for batch) |
-o / --output | Output .docx file or directory |
--theme-dir | Folder for relative extends paths (repeatable; first match wins) |
--no-auto-theme-dir | Skip auto-discovery of .mark2word/themes near the input |
--check | Validate document without writing .docx |
--check-theme | Validate theme YAML (including extends chain) |
--verbose | Warn on ordered-list number mismatches |
-V / --version | Print version |
Exit codes: 0 success, 1 error, 2 usage error.
Inputs, theme chains, and output paths are checked before conversion.
---
extends: base-theme.yaml
title: My Report
font: Calibri
$header: { align: center }
---
Search order for relative extends:
--theme-dir, in orderAuto-discovery: .mark2word/themes near the input and in parent dirs (unless --no-auto-theme-dir).
Chained inheritance in theme files:
showcase.md → extends: showcase-theme.yaml
showcase-theme.yaml → extends: showcase-base.yaml
Style priority: built-in defaults → theme chain → frontmatter globals → region path (outer → inner). Within each layer: top-level props, then category chains (code → code_block, heading → h2, text → body). Region top-level font/size/color apply to body text inside that region. Details: references/theme-design.md.
/path/to/project/.mark2word/themes/my-theme.yaml
---
extends: my-theme.yaml
---
Copy or chain from assets/base-theme.yaml. Include --theme-dir for skill assets/ when the chain references base-theme.yaml.
---
extends: my-theme.yaml
title: My Doc
page:
footer: "Confidential || Page {page} of {pages}"
---
<!-- region: header -->
# Title
Subtitle || [email protected]
<!-- /region -->
## Section
See [Overview](#section) for details.
Body with **bold**, *italic*, `code`, and [link](https://example.com).
> Blockquote line one
> line two
Left side || Right side
- Bullet
- Nested
1. Ordered
1. Nested
2. Continues
| Col A | Col B |
| - | - |
| one | two |

---
```python
print("hello")
**Lists:** a body paragraph between items starts a new list run (ordered numbering restarts). `--verbose` warns when markdown numbers skip (e.g. `1.` then `3.`).
**Internal links:** slug from heading text (`## My Section` → `#my-section`).
## Verification
1. Confirm `.docx` exists and is non-empty.
2. Re-run with `--check` or `--check-theme` if validation is needed.
3. For a user-facing deliverable, visually inspect the rendered document when a Word or DOCX renderer is available. If it is not available, verify the document structure programmatically and state that visual QA was not performed.
**Common fixes**
- Missing theme — add `--theme-dir` for skill `assets/` and project theme folder.
- Missing images — paths relative to the markdown file, or absolute.
- Unknown `#anchor` — slug must match an existing heading.
agents/openai.yaml (opens in a new tab)assets/base-theme.yaml (opens in a new tab)assets/icon.svg (opens in a new tab)references/theme-design.md (opens in a new tab)scripts/mark2word.py (opens in a new tab)scripts/mark2word/__init__.py (opens in a new tab)scripts/mark2word/ast.py (opens in a new tab)scripts/mark2word/cli.py (opens in a new tab)scripts/mark2word/defaults.yaml (opens in a new tab)scripts/mark2word/emit.py (opens in a new tab)scripts/mark2word/errors.py (opens in a new tab)scripts/mark2word/list_format.py (opens in a new tab)scripts/mark2word/lists.py (opens in a new tab)scripts/mark2word/oxml_helpers.py (opens in a new tab)scripts/mark2word/parser.py (opens in a new tab)scripts/mark2word/paths.py (opens in a new tab)scripts/mark2word/plugins.py (opens in a new tab)scripts/mark2word/sections.py (opens in a new tab)scripts/mark2word/slug.py (opens in a new tab)scripts/mark2word/theme.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mullans/skills --plugin mullans-skills3 skills in this plugin
/brainstormCapture a free-form idea dump and structure it into a standard brainstorm doc in the ideas/ folder. Use when the user wants to brainstorm, ramble about an idea, dump thoughts, think through a new project, or says "let's brainstorm X" / "I have an idea". Reorganizes their ramble losslessly into a fixed format — never invents content./session-learningUse when explicitly invoked to preserve evidence-backed project or machine-local lessons, reflect on accumulated guidance, inspect learning activity or configuration, or mine Codex history for verified recovery patterns without retaining transcripts.