docx-official
What it does
This skill handles Microsoft Word files, from drafting new documents to reading or changing existing ones. It is for people who work with reports, contracts, letters, and templates.
When to use it
- βWhen you want a new Word document such as a report, letter, or proposal.
- βWhen you need to fill a Word template with values.
- βWhen you need the text or structure pulled out of a Word file.
Skill link
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/docx-official/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 formal letter in Word format, filled in from this template with my client's name and today's date.β
5 new skills a week. 1 minute to read.
How it works
The agent picks a path: building from scratch, filling a template, editing the file structure, or reading the text. It then checks the document and can render a PDF preview for review.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
DOCX Skill
An Apache-2.0 toolkit for producing, editing, and reading Microsoft Word (.docx) files. Written from scratch against the public ECMA-376 / ISO/IEC 29500 specification and built on permissively-licensed tooling (python-docx MIT, lxml BSD-3-Clause, optional external binaries pandoc and soffice) so it can be reused in commercial projects without restriction.
Decision matrix
| Situation | Path | Read first |
|---|---|---|
| No source file β build a document from a prompt / data | Author from scratch with python-docx |
create.md |
You have a .docx template to fill in or lightly modify |
Placeholder replacement via python-docx, keeps styles |
edit.md β Workflow A β python-docx in-place edit |
| Deep structural edits, new sections, custom XML, unusual layouts | Explode β edit XML β assemble | edit.md β Workflow B β Explode β edit XML β assemble |
You only need the text / structure / metadata out of a .docx |
Extraction pipeline | read.md |
| Need a PDF preview for QA | scripts/render_pdf.py via LibreOffice |
see QA below |
If the task mixes several of these, do them in this order: read β plan β edit/create β validate.
One-time environment setup
Bundled runtime: when the
MIMO_PYTHONenvironment variable is set, skipuv/python3and pip installs entirely β run every command below withuv runreplaced by"$MIMO_PYTHON"(e.g."$MIMO_PYTHON" scripts/extract_text.py input.docx). This skill's Python dependencies are preinstalled in that interpreter; pip console scripts are unavailable, so always go through"$MIMO_PYTHON" -m <module>. A bundled LibreOffice is exposed asMIMO_SOFFICEand picked up automatically by the scripts here.
All scripts include PEP 723 inline metadata, so uv run resolves dependencies automatically β no manual install step needed. Just run:
uv run scripts/extract_text.py input.docx
If you don't use uv, install dependencies once:
python3 -m pip install --upgrade python-docx lxml
# Optional but recommended:
# LibreOffice (for docx β pdf preview): brew install --cask libreoffice (macOS)
# apt-get install -y libreoffice (Debian/Ubuntu)
# Poppler (for pdf β image, QA loop): brew install poppler
Alternatively, if this skill lives in a persistent workspace you can uv init a project, uv add python-docx lxml, and run scripts with uv run scripts/... from the project root β this gives you a lockfile and reproducible environment.
All scripts here use the standard library plus python-docx. No proprietary dependencies.
Common commands
# 1. Extract plain text (best for "what does this file say?" questions)
uv run scripts/extract_text.py input.docx > input.txt
# 2. Explode a .docx into readable XML for structural surgery
uv run scripts/explode.py input.docx exploded/
# 3. Assemble an exploded directory into a fresh .docx
uv run scripts/assemble.py exploded/ output.docx
# 4. Render a .docx as PDF (used for visual QA)
uv run scripts/render_pdf.py output.docx # writes output.pdf next to it
# 5. Well-formedness check (ZIP integrity + parseable XML + python-docx open)
uv run scripts/audit.py output.docx
# 6. Accept every tracked change without needing Word/LibreOffice
uv run scripts/resolve_revisions.py reviewed.docx clean.docx
# 7. Add a comment to an exploded directory
uv run scripts/annotate.py exploded/ "Please check" --author "Reviewer" --anchor "text"
Every script is a small, self-contained Python file. Read the top of the file for full CLI options.
Authoring principles
Word is a flowing document format, not a slide surface. Users expect it to look like something a human wrote in Word β not a design tool trying to reinvent typography. Keep that in mind:
- Rely on named styles. Use
Heading 1,Heading 2,Normal,Title,Quote,List Bullet,List Number,Caption. They are what makes Word's ToC, navigation pane, and cross-references work. - One idea per paragraph. Long paragraphs are fine; run-on paragraphs are not. Break at logical boundaries.
- Structure first, prose second. Draft the heading tree, then write inside it. Reviewers scan headings before words.
- **Tables for tabular data
FAQ
Can it convert Word files to PDF?
Yes. The skill covers converting a Word file to PDF or plain text.
Does it keep my template styles?
For template filling, the skill keeps the styles by replacing placeholders in place.
Does it need extra tools?
Some features use optional external tools, such as pandoc or LibreOffice, when they are installed.
Details
Original description by the author
Use this skill whenever a Microsoft Word (.docx) file is being produced, opened, transformed, or read. That includes: drafting reports, letters, contracts, RFPs, technical documents, or any long-form written deliverable; extracting text or structure from an existing Word file; filling a Word template with values; converting Word to PDF or plain text; splitting or merging documents; inspecting styles, headings, sections, tables, images, comments, or tracked changes. Trigger on mentions of 'Word doc', 'DOCX', 'Office document', a filename ending in .docx, or requests like 'turn this into a Word
repo: XiaomiMiMo/MiMo-Code
Popularity
- GitHub stars
- 14k
- Ranking position
- #11326
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
effect
14kHelps your agent answer questions about the Effect TypeScript framework by checking its source code and docs instead of relying on memory.
arxiv
14kHelps your agent search, read, cite, and track academic papers on arXiv, including abstracts, BibTeX citations, PDF downloads, and citation links.
claude-code
14kHelps your agent hand a coding task to the Claude Code command line tool, as a one-shot run, an interactive session, or a background job.
codex
14kHelps your agent run the OpenAI Codex command line tool without a chat window, for coding tasks, scripts, and automated pipelines.
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.