Skip to content
Development
Skill

/md-to-docx

Convert a Markdown file to DOCX (Word). Use when the user asks to convert .md to .docx, generate a Word document from Markdown, or export Markdown notes to Word.

From plugin
ai-rules-1c
55032 skills13 agents45 commands

Claude Code

$ npx -y skills add comol/ai_rules_1c --skill md-to-docx --agent claude-code

SKILL.md

md-to-docx.SKILL.md
name: md-to-docx
description: "Convert a Markdown file to DOCX (Word). Use when the user asks to convert .md to .docx, generate a Word document from Markdown, or export Markdown notes to Word."

md-to-docx — Markdown to DOCX conversion

Converts a Markdown file to a Word document (`.docx`) preserving headings, tables, lists, code blocks, links and inline images.

Usage

/md-to-docx <input.md> [output.docx] [--author "Name"] [--title "Title"] [--no-shading] [--justify]

| Parameter | Required | Description | |-----------|:--------:|-------------| | `input.md` | yes | Path to the source Markdown file | | `output.docx` | no | Path to the output file (default: alongside source, `.md` → `.docx`) | | `--author` | no | Document author. Written to core properties (`dc:creator` + `cp:lastModifiedBy`). Also accepts the `--author=Name` form | | `--title` | no | Document title in core properties and in the header. Default: input file name without extension | | `--no-shading` | no | Disables the grey background for inline `code` and fenced ``` code blocks. Alias: `--shading=off`. On by default. Does not affect the table header (it keeps its structural fill) | | `--justify` | no | Justifies body paragraphs and list items, including block quotes. Alias: `--align=justify` (also `--align justify`). Off by default; headings, code blocks, table cells and image captions keep their alignment |

If the path is not provided — ask the user. The `--author`, `--title`, `--no-shading`, `--justify` flags are optional — pass them only when the user explicitly asks for an author, a custom title, removal of code shading, or justified text.

Dependencies

  • **Node.js** — to run the script
  • **npm package `docx`** — pinned by this skill's `package-lock.json`; install locally with `npm ci --prefix "<skill-dir>"`

Command

`<skill-dir>` below is the directory of this skill: `content/skills/md-to-docx/` in the `1c-rules` source repo, or `<tool>/skills/md-to-docx/` after installation (e.g. `.cursor/skills/md-to-docx/`, `.claude/skills/md-to-docx/`).

PowerShell (Windows, default for this project):

npm ci --prefix "<skill-dir>"
node "<skill-dir>/scripts/md_to_docx.js" "<input.md>" "[output.docx]"

# With author and title
node "<skill-dir>/scripts/md_to_docx.js" "<input.md>" "[output.docx]" --author "I. Ivanov" --title "Analytical note"

# Without the grey code background
node "<skill-dir>/scripts/md_to_docx.js" "<input.md>" "[output.docx]" --no-shading

# With justified body text
node "<skill-dir>/scripts/md_to_docx.js" "<input.md>" "[output.docx]" --justify

Bash (macOS / Linux):

npm ci --prefix "<skill-dir>"
node "<skill-dir>/scripts/md_to_docx.js" "<input.md>" "[output.docx]"

Supported Markdown features

  • Headings (H1–H6) with styles and colors; a heading stays with the following paragraph (`keepNext`)
  • Tables with header row
  • Code blocks (monospace font, gray background)
  • Lists: bulleted and numbered (with nesting); wrapped continuation lines join the same item. Each numbered list, including nested lists and lists inside quotes, starts at its first source ordinal (`4.` starts at 4); subsequent markers such as repeated `1.` continue that list. Blank lines between items keep a list together; a separate paragraph or another block ends it
  • Block quotes (`>`): marker stripped, wrapped lines joined, nested lists kept; left bar + indent
  • Paragraphs: hard-wrapped lines join until a blank line or the next block (heading, list, table, quote, fence, hr, image)
  • Inline formatting: **bold**, *italic*, `code`, [links](url)
  • Internal anchor links: `<a id="name"></a>` before a heading becomes a bookmark; `[text](#name)` links resolve to it (external `http(s)` / `mailto:` links stay external)
  • Images (`![alt](path)`) — resolved relative to the source MD folder; scaled down proportionally to fit the section's printable width and height, with room for paragraph spacing and one caption line (longer captions may continue on the next page)
  • Horizontal rules (`---`)
  • Headers/footers: title in the top, page number in the bottom
  • Core properties: author and title (via `--author` / `--title`)

If an image is not found — a red text placeholder is inserted.

Output example

Created: output.docx (45231 bytes, 42 blocks)
Read more
@comol
Ships withai-rules-1c

Rules\skills\subagens for vibecoding in 1C(bsl)

55032 skills13 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
550
Star history of comol/ai_rules_1c on GitHub, a chart by star-history.com

Other skills on ai-rules-1c.

openspec-apply-change

openspec-apply-change

Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through…

@comol@comolInstall Skill
openspec-archive-change

openspec-archive-chang…

Archive a completed OpenSpec change in the experimental workflow. Use when the user wants to finalize and archive a change after…

@comol@comolInstall Skill
openspec-explore

openspec-explore

Enter OpenSpec explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements in a…

@comol@comolInstall Skill
openspec-propose

openspec-propose

Propose a new OpenSpec change with all artifacts generated in one step. Use when the user wants to quickly describe what they…

@comol@comolInstall Skill
openspec-sync-specs

openspec-sync-specs

Sync delta specs from an OpenSpec change to main specs. Use when the user wants to update main specs with changes from a delta…

@comol@comolInstall Skill
openspec-update-change

openspec-update-change

Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the…

@comol@comolInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills3w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react12d252k
@facebook@facebookInstall Skill

Questions about md-to-docx.

Which coding agents can use md-to-docx?
md-to-docx installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.