docx-export

Convert Markdown drafts to .docx files with predefined formatting.

91|12|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/zhaohui-yang/official-document-drafting --skill docx-export
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx-export
Source: https://github.com/zhaohui-yang/official-document-drafting/tree/main/skills/docx-export
Command: npx skills add https://github.com/zhaohui-yang/official-document-drafting --skill docx-export

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python, and includes scripts (resource) components.

What problem does it solve?

This Skill streamlines the process of converting Markdown drafts of official documents into well-formatted .docx files, ensuring adherence to government standards without the need for manual formatting.

Core Features & Use Cases

  • Markdown to .docx Conversion: Transform Markdown content into .docx files that meet official formatting requirements.
  • Customization Options: Adjust font, size, margins, line spacing, and page numbering to match specific document styles.
  • Image Embedding: Insert local images as attachments or figures within the document.
  • Preview Features: Preview font and layout plans before final export.
  • Use Case: A user can use this Skill to convert a Markdown draft of a report into a professional-looking .docx file, complete with custom fonts and page layouts.

Quick Start

Convert the Markdown draft of your report to .docx format by running the command: python3 src/scripts/generate_docx.py draft.md -o report.docx --doc-type report

Frequently Asked Questions about docx-export

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Markdown to docx for official government documents?

The Skill transforms Markdown drafts into formatted .docx files by applying predefined layout schemes. It automatically adjusts fonts, margins, and page numbering to meet official government standards.

How do I customize fonts and margins when converting Markdown to docx?

You can customize fonts, sizes, margins, line spacing, and page numbering to match specific document styles. The tool also provides preview features to check font and layout plans before final export.

Can I embed local images into a docx file generated from Markdown?

Yes, you can insert local images as attachments or figures within the generated docx document. This allows you to include visual content directly from your Markdown drafts.

Do I need Python to convert Markdown drafts to formatted docx files?

Yes, Python and specific libraries for document processing are required to run the conversion script. The tool relies on a Python environment to process Markdown and generate the final docx output.

What is the best way to format a Markdown report into a professional docx file?

Using a dedicated Markdown to docx conversion tool with predefined formatting schemes is the best approach. It automatically applies custom fonts and page layouts to produce a professional-looking docx file.

Are there limitations when using Python to convert Markdown to docx for official documents?

The conversion focuses on applying predefined formatting schemes to Markdown content. Complex manual layout adjustments outside of the supported customization options like fonts, margins, and image embedding may not be supported.