minimax-docx
Create and Edit DOCX Documents with OpenXML
Creating professional Word documents programmatically is error-prone and time-consuming. This skill provides three pipelines for DOCX creation, editing, and template application using the OpenXML SDK with built-in validation.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "minimax-docx". Create a memo with title 'Team Update', author 'Manager', plain text content with two sections
Expected outcome:
- Pipeline A (CREATE) executed successfully
- Document created: output.docx with memo style
- XSD validation: PASSED
- Business rules: PASSED
- Result: Professional memo document with proper heading styles and section formatting
Using "minimax-docx". Apply corporate template to existing draft document
Expected outcome:
- Pipeline C (FORMAT-APPLY) executed successfully
- Template styles merged with source content
- Direct formatting stripped from 24 paragraphs
- Gate-check validation: PASSED
- Result: Draft document now styled with corporate branding, headers, and footers
Security Audit
Low RiskStatic analyzer flagged 2894 patterns across 75 files, but all findings are false positives. 'Hardcoded URLs' are OpenXML namespace URIs (schemas.openxmlformats.org) in XML stylesheets and XSD schemas. 'Weak cryptographic algorithm' matches on unrelated documentation text in comments and markdown files. 'C2 keywords' trigger on style IDs like 'TOC2'. 'Ruby/shell backtick execution' matches on code snippets in markdown reference documentation. 'System reconnaissance' and 'Network reconnaissance' patterns appear in instructional text within guides. The shell scripts (setup.sh, env_check.sh, setup.ps1) use sudo, /proc, and command substitution legitimately for environment detection and .NET SDK installation. No actual security vulnerabilities, credential exfiltration, or malicious behavior detected.
Low Risk Issues (3)
Risk Factors
🌐 Network access (160)
⚙️ External commands (1759)
📁 Filesystem access (75)
Quality Score
What You Can Build
Automated Report Generation
Generate formatted business reports, academic papers, or conference submissions with consistent styling from structured data.
Document Template Application
Apply corporate or institutional templates to existing documents, ensuring brand compliance and style consistency across teams.
CJK Thesis and Official Document Creation
Create Chinese government documents (公文), university theses, and CJK-formatted documents with proper typography and compliance.
Try These Prompts
Create a business report titled 'Q4 Sales Analysis' with the author name 'John Smith'. Use A4 page size with standard margins. Include a table of contents, three sections (Executive Summary, Data Analysis, Conclusions), and a footer with page numbers. Use a professional corporate style.
I have a contract template at contract_template.docx. Fill in the placeholders: {{client_name}} with 'Acme Corp', {{date}} with '2025-03-15', and {{amount}} with '$50,000'. Save the result as acme_contract.docx.I have a draft document at draft.docx and a corporate template at corporate_template.docx. Apply the template styling to my draft while preserving all the content. Validate against the business rules XSD and run the gate-check.
Create a Chinese government document (公文) following GB/T 9704 standards. The document should use the correct fonts (FZXiaoBiaoSong for title, FangSong_GB2312 for body), proper heading hierarchy, and standard government layout with red header line.
Best Practices
- Always run the validation pipeline (merge-runs, XSD validate, business rules validate) after every write operation to prevent document corruption
- Read the relevant Samples/*.cs file before writing C# code to use proven, SDK-version-verified OpenXML patterns
- Use Pipeline C (Base-Replace) for templates with complex multi-section headers and footers to preserve section structure intact
Avoid
- Do not recreate headers and footers from scratch when applying templates, copy template header and footer XML to preserve section settings
- Do not insert empty paragraphs as section separators, use section break properties and style spacing for visual separation instead
- Do not skip the gate-check validation for Scenario C operations, it catches structural issues that cause document corruption in Word
Frequently Asked Questions
Do I need to install .NET SDK to use this skill?
Can this skill edit legacy .doc files?
What types of documents can this skill create?
How do I apply a corporate template to an existing document?
Does this skill support Chinese, Japanese, and Korean text?
What happens if XSD validation fails?
Developer Details
File structure