docx

Generate and edit .docx files with OpenXML and revision tracking.

12|2|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/haomingz/kimi-skills --skill docx-haomingz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/haomingz/kimi-skills/tree/main/skills/docx
Command: npx skills add https://github.com/haomingz/kimi-skills --skill docx-haomingz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, lxml, python-docx, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Word document workflows are often manual and error-prone, requiring repetitive formatting, referencing, and conversion steps. This Skill provides a programmatic path to create, edit, and format .docx files using C# with OpenXML, WIR for revision-aware editing, and a Markdown-to-Word conversion pipeline that post-processes the output for professional standards.

Core Features & Use Cases

  • Create new Word documents from templates and content blocks using the OpenXML SDK.
  • Edit existing documents with WIR to preserve structure, revisions, comments, and footnotes, while updating content safely.
  • Convert Markdown into Word with automated citation handling, footnotes/endnotes, and cross-references, ready for professional delivery.
  • Ensure Word documents meet layout rules (TOC, headers/footers, sectioning, and consistent styling) and embed charts, images, and references as needed.

Quick Start

Use the docx skill to generate a Word document from a Markdown source via the built-in conversion pipeline described in the skill.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I convert Markdown to a Word document with footnotes and citations?

You can convert Markdown to a Word document using a pipeline that post-processes the output to handle footnotes, endnotes, and cross-references automatically. This ensures the final .docx file meets professional formatting standards without manual cleanup.

Can I edit existing Word documents while preserving tracked changes and comments?

Yes, you can edit existing Word documents while preserving revisions, comments, and footnotes using WIR-based revision-aware editing. This approach updates content safely without breaking the original document structure or tracked changes.

What is the best way to programmatically generate a Word document with a TOC and charts?

The best way to generate a Word document with a TOC and charts is using the OpenXML SDK. It enforces layout rules for headers, footers, and sectioning while embedding charts and images directly into the .docx structure.

Does python-docx support OpenXML features like cross-references and automated citation handling?

python-docx handles basic document generation, but this Skill extends OpenXML capabilities to support automated citation handling, cross-references, and footnotes. It combines python-docx with lxml to enforce professional layout rules.

How do I automate Word document formatting to ensure consistent styling across templates?

You can automate Word document formatting by creating new documents from templates and content blocks using OpenXML. The pipeline enforces consistent styling, sectioning, and layout rules to reduce repetitive manual formatting errors.

What are the limitations of using OpenXML for Word document generation compared to manual formatting?

OpenXML document generation requires understanding the underlying XML structure and dependencies like lxml and playwright. While it automates formatting and TOC generation, complex manual layout adjustments may still require post-processing within Word.