minimax-docx

Create, edit, and format DOCX documents using OpenXML SDK with XSD validation.

1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/HalseyYang/Skills-HY --skill minimax-docx-halseyyang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: minimax-docx
Source: https://github.com/HalseyYang/Skills-HY/tree/main/minimax-docx
Command: npx skills add https://github.com/HalseyYang/Skills-HY --skill minimax-docx-halseyyang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires DocumentFormat.OpenXml, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Producing professional Word documents programmatically is error-prone: OpenXML has strict element ordering rules, CJK typography requirements, and template structures that easily corrupt files when handled incorrectly. This Skill provides tested pipelines and verified code patterns to generate, edit, and reformat .docx files without corruption. ## Core Features & Use Cases - Three document pipelines: create new documents from scratch, fill or edit content in existing .docx files, and apply template formatting with a mandatory XSD gate-check validation. - CLI plus direct C# scripting: use the MiniMaxAIDocx.Cli for simple tasks (text replacement, placeholder filling, table filling) or write C# against DocumentFormat.OpenXml for structural work like multi-section layouts, TOC, headers/footers, and images. - CJK and standards support: built-in guidance for Chinese typography, GB/T 9704 government document format, Chinese university thesis templates, and 13 aesthetic recipes from IEEE, ACM, APA, Springer LNCS, Nature, and HBR style guides. - Use Case: A user asks to draft a formal report, fill in a contract template, or reformat a thesis to match a university template — the Skill routes to the right pipeline, executes edits, and validates the output before delivery. ## Quick Start Ask the assistant to create a Word report on your chosen topic, or provide an existing .docx file and request edits or template formatting.

Frequently Asked Questions about minimax-docx

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

FAQPage Schema
How do I create a Word document programmatically with OpenXML?

Use the OpenXML SDK's WordprocessingDocument.Create method to build the document structure, or run the CLI create command with a content JSON file. For complex layouts with styles, tables, and TOC, write C# directly using the provided compilable sample patterns.

How do I fill placeholders in an existing Word template?

Use the CLI edit fill-placeholders subcommand with a JSON data object mapping placeholder keys to values. For structural edits like adding sections or modifying tables, analyze the document first and write C# against the OpenXML SDK.

Does OpenXML support Chinese fonts and CJK typography?

Yes. Set the w:eastAsia attribute on w:rFonts to control CJK fonts such as SimSun or Microsoft YaHei, and use w:firstLineChars for two-character indentation. The Skill includes full guidance for GB/T 9704 government documents and Chinese thesis templates.

Why does my generated DOCX file get corrupted or fail to open?

OpenXML requires strict element ordering, such as pPr before runs and sectPr as the last child of body. Run the XSD validation and fix-order commands after every write operation, and strip direct formatting when copying content between documents.

Can I apply one Word template's styles to another document?

Yes. Use the apply-template CLI command for simple style overlays, or the base-replace approach for templates with structure like covers and multi-section headers. A mandatory XSD gate-check validation must pass before the output is delivered.