rajivmehtaflex/docx-generator-skill/generate-docx

Claude Code and agent skill by rajivmehtaflex/docx-generator-skill

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Generates professional Word (.docx) documents from Markdown or HTML content with support for headers, footers, page numbers, tables, lists, code blocks, blockquotes, and table of contents. Use when creating Word documents, converting markdown to docx, generating reports, building document templates, or exporting content to Microsoft Word format — even if the user doesn't explicitly say "docx" or "Word".

Install

npx vskill@latest install rajivmehtaflex/docx-generator-skill/generate-docx

SKILL.md

The same SKILL.md was published earlier as rajivmehtaflex/docx-generator-skill/generate-docx.

generate-docx

Converts Markdown or HTML into professionally formatted .docx Word documents via a Node.js CLI script.

Setup

Before first use, install dependencies:

bash
cd skills/generate-docx
npm install

Quick Reference

From a Markdown string
bash
node generate-docx.js \
-i "# Project Report\n\nThis is **bold** and *italic*." \
--title "Project Report" \
--author "AI Agent" \
-o report.docx
From a file
bash
node generate-docx.js \
-f input.md \
--title "Documentation" \
--header "Confidential" \
--footer "Internal Use Only" \
--page-numbers total \
--toc \
-o documentation.docx
Via stdin (pipe from another command)
bash
cat README.md | node generate-docx.js --stdin --title "README" -o readme.docx
HTML input (skip markdown conversion)
bash
node generate-docx.js \
-f page.html \
--format html \
--author "Generator" \
-o output.docx
Base64 output (for programmatic use without file I/O)
bash
node generate-docx.js -i "# Hello" --title "Test"
# → outputs base64-encoded docx to stdout

CLI Options

FlagTypeDefaultDescription
-i, --input<text>—Markdown or HTML content as a string
-f, --file<path>—Read content from a file
--stdinflag—Read content from stdin
--title<text>Untitled DocumentDocument title metadata
--author<text>UnknownDocument author metadata
--header<text>—Header text on every page
--footer<text>—Footer text on every page
--page-numbers`none\simple\total`nonePage numbering style
--tocflagoffAdd a Table of Contents page
--no-page-breaksflagoffDisable page breaks for <hr>
--format`markdown\html`markdownInput format
-o, --output<path>stdout base64Save .docx to file

Supported Markdown/HTML Elements

ElementMarkdownHTMLDOCX Result
Heading 1-4# H1 ... #### H4<h1> ... <h4>Heading styles (mapped to TOC)
Paragraphplain text<p>Paragraph with spacing
Bold**text**—Bold TextRun
Italic*text*—Italic TextRun
Inline code` code `—Monospace + shaded
Bullet list- item<ul><li>Bulleted paragraphs
Numbered list1. item<ol><li>Numbered paragraphs
TableGFM table syntax<table>Styled table with header row
Code block `code` <pre>Monospace lines with shading
Blockquote> quote<blockquote>Indented italic paragraph
Page break--- (hr)<hr>PageBreak
Table of Contents--toc flag—TOC field + page break

Files

skills/generate-docx/
├── SKILL.md ← This file (agent skill definition)
├── generate-docx.js ← Node.js CLI script (main entry point)
├── package.json ← Dependencies and metadata
├── README.md ← Human-readable documentation
└── node_modules/ ← Installed dependencies (after npm install)

How It Works

Input (Markdown/HTML)
│
├── marked ──────► HTML (if markdown input)
│
├── cheerio ─────► Parse HTML elements
│
├── docx (npm) ──► Build OOXML document
│ ├── Headers / Footers
│ ├── Page numbers
│ ├── Headings / Paragraphs
│ ├── Tables / Lists
│ ├── Code blocks / Blockquotes
│ └── Table of Contents
│
└── Output ──────► .docx file OR base64 string

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/rajivmehtaflex/docx-generator-skill/generate-docx/badge)](https://verified-skill.com/skills/rajivmehtaflex/docx-generator-skill/generate-docx)

Something wrong with this skill or its page? Tell us.