minimax-docx
What it does
This skill creates and edits Word documents using OpenXML tools. It is for people who need a professional document, such as a report, proposal, or formatted template.
When to use it
- βWhen you ask for a written report, proposal, or letter as a Word file.
- βWhen you want to fill in or change content in an existing Word document.
- βWhen you want a template's formatting applied to a document.
Skill link
https://github.com/MiniMax-AI/skills/blob/main/skills/minimax-docx/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want a Word report about our quarterly results, with headings, a table, and a clean layout.β
5 new skills a week. 1 minute to read.
How it works
The agent sets up the tools, then writes or edits the document through the command line tools or a custom C# script. It checks the file against the Word format rules before finishing.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
minimax-docx
Create, edit, and format DOCX documents via CLI tools or direct C# scripts built on OpenXML SDK (.NET).
Setup
First time: bash scripts/setup.sh (or powershell scripts/setup.ps1 on Windows, --minimal to skip optional deps).
First operation in session: scripts/env_check.sh β do not proceed if NOT READY. (Skip on subsequent operations within the same session.)
Quick Start: Direct C# Path
When the task requires structural document manipulation (custom styles, complex tables, multi-section layouts, headers/footers, TOC, images), write C# directly instead of wrestling with CLI limitations. Use this scaffold:
// File: scripts/dotnet/task.csx (or a new .cs in a Console project)
// dotnet run --project scripts/dotnet/MiniMaxAIDocx.Cli -- run-script task.csx
#r "nuget: DocumentFormat.OpenXml, 3.2.0"
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
using var doc = WordprocessingDocument.Create("output.docx", WordprocessingDocumentType.Document);
var mainPart = doc.AddMainDocumentPart();
mainPart.Document = new Document(new Body());
// --- Your logic here ---
// Read the relevant Samples/*.cs file FIRST for tested patterns.
// See Samples/ table in References section below.
Before writing any C#, read the relevant Samples/*.cs file β they contain compilable, SDK-version-verified patterns. The Samples table in the References section below maps topics to files.
CLI shorthand
All CLI commands below use $CLI as shorthand for:
dotnet run --project scripts/dotnet/MiniMaxAIDocx.Cli --
Pipeline routing
Route by checking: does the user have an input .docx file?
User task
ββ No input file β Pipeline A: CREATE
β signals: "write", "create", "draft", "generate", "new", "make a report/proposal/memo"
β β Read references/scenario_a_create.md
β
ββ Has input .docx
ββ Replace/fill/modify content β Pipeline B: FILL-EDIT
β signals: "fill in", "replace", "update", "change text", "add section", "edit"
β β Read references/scenario_b_edit_content.md
β
ββ Reformat/apply style/template β Pipeline C: FORMAT-APPLY
signals: "reformat", "apply template", "restyle", "match this format", "ε₯樑ζΏ", "ζη"
ββ Template is pure style (no content) β C-1: OVERLAY (apply styles to source)
ββ Template has structure (cover/TOC/example sections) β C-2: BASE-REPLACE
(use template as base, replace example content with user content)
β Read references/scenario_c_apply_template.md
If the request spans multiple pipelines, run them sequentially (e.g., Create then Format-Apply).
Pre-processing
Convert .doc β .docx if needed: scripts/doc_to_docx.sh input.doc output_dir/
Preview before editing (avoids reading raw XML): scripts/docx_preview.sh document.docx
Analyze structure for editing scenarios: $CLI analyze --input document.docx
Scenario A: Create
Read references/scenario_a_create.md, references/typography_guide.md, and references/design_principles.md first. Pick an aesthetic recipe from Samples/AestheticRecipeSamples.cs that matches the document type β do not invent formatting values. For CJK, also read references/cjk_typography.md.
Choose your path:
- Simple (plain text, minimal formatting): use CLI β
$CLI create --type report --output out.docx --config content.json - Structural (custom styles, multi-section, TOC, images, complex tables): write C# directly. Read the relevant
Samples/*.csfirst.
CLI options: --type (report|letter|memo|academic), --title, --author, --page-size (letter|a4|legal|a3), --margins (standard|narrow|wide), --header, --footer, --page-numbers, --toc, --content-json.
Then run the validation pipeline (below).
Scenario B: Edit / Fill
Read references/scenario_b_edit_content.md first. Preview β analyze β edit β validate.
Choose your path:
- Simple (text replacement, placeholder fill): use CLI subcommands.
- Structural (add/reorganize sections, modify styles, manipulate tables, insert images): write C# directly. Read
references/openxml_element_order.mdand the relevantSamples/*.cs.
Available CLI edit subcommands:
replace-text --find "X" --replace "Y"fill-placeholders --data '{"key":"value"}'fill-table --data table.jsoninsert-section,remove-section,update-header-footer
$CLI edit replace-text --in
FAQ
Does it need special software?
The skill has a setup step for its tools, including .NET for the OpenXML scripts.
Can it edit a document I already have?
Yes. It has a pipeline for filling and editing content in existing Word files.
How does it make sure the file is valid?
It runs a validation step against the Word file format rules before reporting success.
Details
Original description by the author
Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET). Three pipelines: (A) create new documents from scratch, (B) fill/edit content in existing documents, (C) apply template formatting with XSD validation gate-check. MUST use this skill whenever the user wants to produce, modify, or format a Word document β including when they say "write a report", "draft a proposal", "make a contract", "fill in this form", "reformat to match this template", or any task whose final output is a .docx file. Even if the user doesn't mention "docx" explicitly, if the task implies a
repo: MiniMax-AI/skills
Popularity
- GitHub stars
- 14k
- Ranking position
- #11293
- License
- MIT
- Updated
- 4/18/2026
Comments
- β¦
More skills from this repository
design-style-skill
14kHelps your agent pick one consistent visual style for slides, from sharp and compact to soft, rounded or airy, with matching corners and spacing.
ppt-editing-skill
14kHelps your agent edit an existing PowerPoint file or template safely, by changing text, reordering or removing slides, and repacking a valid deck.
ppt-orchestra-skill
14kHelps your agent plan a full PowerPoint deck before building it, sorting each slide into a standard page type and checking variety and text quality.
slide-making-skill
14kHelps your agent write single PowerPoint slides in JavaScript with PptxGenJS, covering layout, text, images, charts, and fonts for native .pptx files.
Similar skills
feishu-doc
394kHelps your agent read, create, and edit Feishu cloud documents, including text, images, and tables, using the document tool.
feishu-drive
394kLets your agent browse, organize, and comment on files in a Feishu cloud folder that has been shared with the bot.
feishu-perm
394kHelps your agent check and change who can access a Feishu file, choosing the smallest permission that meets your request.