OpenParable
Skip to content
← Back to skills

Md To Docx

Documents
md-to-docx

Md To Docx is an Agent Skill for documents published in the comol/ai_rules_1c repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

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.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/comol/ai_rules_1c/blob/HEAD/content/skills/md-to-docx/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/md-to-docx, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

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]
ParameterRequiredDescription
input.mdyesPath to the source Markdown file
output.docxnoPath to the output file (default: alongside source, .md → .docx)

If the path is not provided — ask the user.

Dependencies

  • Node.js — to run the script
  • npm package docx — install globally: npm install -g docx

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):

$env:NODE_PATH = (npm root -g)
node <skill-dir>/scripts/md_to_docx.js "<input.md>" "[output.docx]"

Bash (macOS / Linux):

NODE_MODULES=$(npm root -g)
NODE_PATH="$NODE_MODULES" node <skill-dir>/scripts/md_to_docx.js "<input.md>" "[output.docx]"

Supported Markdown features

  • Headings (H1–H6) with styles and colors
  • Tables with header row
  • Code blocks (monospace font, gray background)
  • Lists: bulleted and numbered (with nesting)
  • Inline formatting: bold, italic, code, links
  • Images (![alt](path)) — resolved relative to the source MD folder
  • Horizontal rules (---)
  • Headers/footers: filename in the top, page number in the bottom

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

Output example

Created: output.docx (45231 bytes, 42 blocks)