Markdown To Docx
[Document Processing] Use when you need to convert markdown files to Microsoft Word ( DOCX) format with GFM support and math rendering.
- Skill ID
- duc01226/easyplatform/markdown-to-docx
- Publisher
- duc01226
- Repository
- easyplatform
- Installs
- 0
- Files
- 12
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
duc01226/easyplatform/markdown-to-docxInstalls these files- SKILL.md
- assets/default-theme.json
- package-lock.json
- package.json
- scripts/convert.cjs
- scripts/lib/config-loader.cjs
- scripts/lib/converter.cjs
- scripts/lib/output-handler.cjs
- tests/converter.test.cjs
- tests/fixtures/sample.md
- tests/run-tests.cjs
- tests/test-framework.cjs
What this skill tells the agent
Codex compatibility note: - Invoke repository skills with$skill-namein Codex; this mirrored copy rewrites legacy Claude/skill-namereferences. - Task tracker mandate: BEFORE executing any workflow or skill step, create/update task tracking for all steps and keep it synchronized as progress changes. - User-question prompts mean to ask the user directly in Codex. - Ignore Claude-specific mode-switch instructions when they appear. - Strict execution contract: when a user explicitly invokes a skill, execute that skill protocol as written. - Subagent authorization: when a skill is user-invoked or AI-detected and its protocol requires subagents, that skill activation authorizes use of the requiredspawn_agentsubagent(s) for that task. - Do not skip, reorder, or merge protocol steps unless the user explicitly approves the deviation first. - For workflow skills, execute each listed child-skill step explicitly and report step-by-step evidence. - If a required step/tool cannot run in this environment, stop and ask the user before adapting.
<!-- CODEX:PROJECT-REFERENCE-LOADING:START -->
Codex Project-Reference Loading (No Hooks)
Codex uses static project-reference loading instead of runtime-injected project docs. When coding, planning, debugging, testing, or reviewing, open project docs explicitly using this routing.
Always read:
docs/project-config.json(project-specific paths, commands, modules, and workflow/test settings)docs/project-reference/docs-index-reference.md(routes to the fulldocs/project-reference/*catalog)docs/project-reference/lessons.md(always-on guardrails and anti-patterns)
Missing/stale context route: If docs/project-config.json, the docs index, lessons.md, CLAUDE.md, AGENTS.md, or any task-required reference doc is missing or stale, auto-run $project-init or the narrow setup route ($project-config, $docs-init, $scan-all, $scan --target=<key>, $claude-md-init) before ordinary project-specific work. If Codex mirrors or AGENTS.md are missing/stale, ask the user to run $sync-codex; do not auto-run it.
Situation-based docs:
- Project structure/architecture/tech-stack/deployment/setup (any layer — backend, frontend, or infra):
project-structure-reference.md - Backend/CQRS/API/domain/entity changes:
backend-patterns-reference.md,domain-entities-reference.md - Frontend/UI/styling/design-system:
frontend-patterns-reference.md,scss-styling-guide.md,design-system/README.md - Spec authoring,
docs/specs/pathing, or TC format:feature-spec-reference.md,spec-system-reference.md,spec-principles.md - Behavior/public-contract changes or spec-test-code sync:
workflow-spec-test-code-cycle-reference.mdplus the spec docs above - Derived spec indexes/ERDs/reimplementation guides:
spec-system-reference.mdand source Feature Specs underdocs/specs/ - Integration test implementation/review:
integration-test-reference.md - E2E test implementation/review:
e2e-test-reference.md - Code review/audit work:
code-review-rules.mdplus domain docs above based on changed files
Do not read all docs blindly. Start from docs-index-reference.md, then open only relevant files for the task.
<!-- CODEX:PROJECT-REFERENCE-LOADING:END -->
Quick Summary
Goal: Convert Markdown files to Microsoft Word (.docx) format with GFM support and proper formatting.
Workflow:
- Install -- Ensure pandoc is available (required dependency)
- Convert -- Run pandoc with docx output, apply reference template if provided
- Verify -- Check output file for formatting fidelity
Key Rules:
- Requires pandoc installed on the system
- Supports GFM tables, code blocks, and images
- Optional reference.docx template for custom styling
Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
markdown-to-docx
Convert markdown files to editable Microsoft Word documents with support for tables, code blocks, images, and LaTeX math equations.
Installation Required
This skill requires npm dependencies. Run one of:
# Option 1: ClaudeKit CLI (recommended)
ck init
# Option 2: Manual
cd .claude/skills/markdown-to-docx
npm installDependencies: markdown-docx, gray-matter
Quick Start
# Basic conversion
node .claude/skills/markdown-to-docx/scripts/convert.cjs --input ./README.md
# Specify output path
node .claude/skills/markdown-to-docx/scripts/convert.cjs -i ./doc.md -o ./output.docx
# With custom theme
node .claude/skills/markdown-to-docx/scripts/convert.cjs -i ./doc.md --theme ./theme.jsonCLI Options
| Option | Short | Description | Default |
|---|---|---|---|
--input | -i | Input markdown file | (required) |
--output | -o | Output DOCX path | {input}.docx |
--theme | -t | Custom theme JSON | built-in |
--title | Document title | filename | |
--help | -h | Show help |
Features
- GFM Support: Tables, strikethrough, task lists
- Code Blocks: Syntax preserved with monospace font
- Images: Local and URL images embedded
- Math: LaTeX equations rendered by default (
$...$,$$...$$) - Frontmatter: YAML metadata extracted for title
- No System Dependencies: Pure JavaScript, no Chrome needed
Output
Returns JSON on success:
{
"success": true,
"input": "/path/to/input.md",
"output": "/path/to/output.docx"
}Compatibility
Generated DOCX files work with:
- Microsoft Word (2007+)
- Google Docs (upload to Drive)
- LibreOffice Writer
- Apple Pages
[IMPORTANT] Use task tracking to break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ATTENTION ask user whether to skip.
<!-- SYNC:ai-mistake-prevention -->
AI Mistake Prevention — Failure modes to avoid on every task: Re-read files after context changes. Context compaction, resume, or long-running work can make memory stale; verify current files before acting. Verify generated content against source evidence. AI hallucinates APIs, names, claims, and document facts. Check the relevant source before documenting or referencing. Check downstream references before deleting or renaming. Removing an artifact can stale docs, generated mirrors, configs, and callers; map references first. Trace the full impact chain after edits. Changing a definition can miss derived outputs and consumers. Follow the affected chain before declaring done. Verify ALL affected outputs, not just the first. One green check is not all green checks; validate every output surface the change can affect. Assume existing values are intentional — ask WHY before changing OR flagging one as a defect. Before changing or reporting a constant, limit, flag, cutoff, wording, or pattern, read nearby context and history, the CALLER's ordering, and 2+ sibling call sites of the same convention. A doc stating WHAT without WHY is missing rationale, not proof of a missing guard. Surface ambiguity before acting — don't pick silently. Multiple valid interpretations require an explicit question or stated assumption with risk. Assert the outcome your system owns, not the intermediate state your infrastructure owns. When verifying async work, assert the final business state — never the delivery/retry bookkeeping held in shared infrastructure that any co-running process can write. Such a check passes when run alone and flakes the moment anything else shares that infrastructure.
More from duc01226
Use this skill in a project
Open any RiverX project, search the Skills panel for duc01226/easyplatform/markdown-to-docx, and install it in one click.
