DOCX Creation and Editing
anthropics/skills
Creates, edits and reviews Word documents: new files with docx-js, edits through the underlying XML, plus tracked changes, comments and conversions.
Produces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task.
$ npx skills add XiaomiMiMo/MiMo-Code --skill docx-official -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code docx-official --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/docx-official .claude/skills/docx-official && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "docx-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/docx-official into .claude/skills/docx-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx-official", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/docx-officialType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add XiaomiMiMo/MiMo-Code --skill docx-official -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code docx-official --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/docx-official .agents/skills/docx-official && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "docx-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/docx-official into .agents/skills/docx-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx-official", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add XiaomiMiMo/MiMo-Code --skill docx-official -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code docx-official --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/docx-official .cursor/skills/docx-official && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "docx-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/docx-official into .cursor/skills/docx-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx-official", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/XiaomiMiMo/MiMo-Code.git --path packages/cli/src/skill/builtin/.bundle/docx-official--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add XiaomiMiMo/MiMo-Code --skill docx-official -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code docx-official --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/docx-official .gemini/skills/docx-official && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "docx-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/docx-official into .gemini/skills/docx-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx-official", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install XiaomiMiMo/MiMo-Code docx-officialInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add XiaomiMiMo/MiMo-Code --skill docx-official -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .github/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/docx-official .github/skills/docx-official && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "docx-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/docx-official into .github/skills/docx-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx-official", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add XiaomiMiMo/MiMo-Code --skill docx-official -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code docx-official --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/docx-official .opencode/skills/docx-official && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "docx-official" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/docx-official into .opencode/skills/docx-official/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx-official", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
docx-officialProduces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task.
Built from scratch against the ECMA-376 / ISO/IEC 29500 specification rather than a proprietary library, the skill picks one of several paths depending on the job: authoring from scratch with python-docx when there is no source file, in-place placeholder replacement when a template just needs filling, an explode-edit-XML-reassemble workflow for deep structural changes, or a dedicated extraction pipeline when only text or metadata is needed. A LibreOffice-based script can render a PDF preview for QA.
Every script carries inline PEP 723 dependency metadata so uv run resolves python-docx and lxml automatically, and a bundled runtime variable lets the skill skip package installation entirely when one is preconfigured. Mixed tasks are expected to follow read, then plan, then edit or create, then validate, in that order.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 6babeb0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 8 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
uvpython3sofficeFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
ecma-international.orgpeps.python.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
DOCX Toolkit loads about 2.4k tokens when it runs. Until then it costs about 156 tokens; SKILL.md has 910 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from XiaomiMiMo/MiMo-Code at commit 6babeb0, republished under its Apache-2.0 licence (© XiaomiMiMo). 910 words, ~2,355 tokens.
.claude/skills/docx-official/SKILL.md (or your agent's skills folder). This skill also uses 13 other files; get the full folder from GitHub.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.
| 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.
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.docxIf 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 popplerAlternatively, 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.
# 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.
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:
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.python-docx supports field codes via low-level XML (see edit.md).| Element | Font | Size | Weight | Notes |
|---|---|---|---|---|
| Title | Calibri Light | 28pt | Bold | Centered or left, one line |
| Heading 1 | Calibri Light | 18pt | Bold | Space before 12pt |
| Heading 2 | Calibri Light | 14pt | Bold | Space before 10pt |
| Heading 3 | Calibri | 12pt | Bold | Space before 6pt |
| Body | Calibri | 11pt | Regular | Line spacing 1.15, space after 6pt |
| Caption | Calibri | 9pt | Italic | Muted gray #595959 |
| Code / mono | Consolas | 10pt | Regular | Left-aligned, no first-line indent |
Change the palette for the topic — muted navy #1F3A5F for legal/finance, warm charcoal #2E2A26 for editorial. Avoid pure #000000 for body text; #1F1F1F reads softer on print.
Ask the user which one to use. If you cannot ask, default to the region implied by the language (Chinese/European → A4, US English → Letter). Margins:
| Size | Width × Height | Standard margins (T/B/L/R) |
|---|---|---|
| A4 | 21.0 × 29.7 cm | 2.54 / 2.54 / 3.18 / 3.18 cm |
| Letter | 8.5 × 11.0 in | 1.00 / 1.00 / 1.25 / 1.25 in |
Assume something is wrong. Word files fail silently: a broken relationship, an unclosed <w:p>, a missing style — Word will still open the file but strip content or throw a "content had problems" warning. Verify explicitly.
uv run python -c "import docx; docx.Document('output.docx')" # loads without exceptionsuv run scripts/extract_text.py output.docx | grep -Ei "TODO|TBD|\{\{|lorem|xxxx"uv run scripts/render_pdf.py output.docxuv run python -c "
import docx; d = docx.Document('output.docx')
for p in d.paragraphs:
if p.text and p.style.name == 'Normal' and p.runs and p.runs[0].bold:
print('possible fake heading:', p.text[:80])"If any of these fail, fix and re-run — don't paper over.
.doc (legacy Word 97-2003) — this skill only targets .docx (Office Open XML). Convert .doc to .docx with LibreOffice first: soffice --headless --convert-to docx old.doc..docm files. If the user asks for automation, offer a Python script that regenerates the doc instead.create.md — headings, paragraphs, styles, tables, images, page setup, headers/footers, tables of contents.edit.md — placeholder replacement, section swap, raw XML surgery, tracked changes, comments.read.md — plain-text export, structural walk, metadata, table extraction.scripts/ — self-contained CLI utilities used by all of the above.© XiaomiMiMo, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 13 other files (scripts) in packages/cli/src/skill/builtin/.bundle/docx-official of XiaomiMiMo/MiMo-Code.
Open the folder on GitHubat commit 6babeb0
DOCX Toolkit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| DOCX Toolkit this skillXiaomiMiMo/MiMo-Code | 14k | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| DOCX Creation and Editinganthropics/skills | 180k | 6 repos | ~1.7k | Automated safety check: Pass | Proprietary | |
| Office File Processxstongxue/best-skills | 2.9k | — | ~1.8k | Automated safety check: Pass | Proprietary | |
| Huashu Markdown Publishing Pipelinealchaincyf/huashu-md-html | 908 | — | ~4.8k | Automated safety check: Pass | MIT | |
| Word DOCX ToolkitNousResearch/hermes-agent | 252k | — | ~2.6k | Automated safety check: Pass | MIT | |
| Industry Bid Document WriterGet00/BiaoShu-SKILL | 167 | — | ~4.6k | Automated safety check: Pass | Apache-2.0 |
anthropics/skills
Creates, edits and reviews Word documents: new files with docx-js, edits through the underlying XML, plus tracked changes, comments and conversions.
xstongxue/best-skills
处理 Office 文档的一站式 skill:Word(.doc/.docx/.dotx)、Excel(.xls/.xlsx/.xlsm/.csv)、PowerPoint(.ppt/.pptx/.potx) 的创建、读取、编辑、提取、转换、校验。触发:『读取 word 文档』『提取 excel 内容』『看 ppt 讲了什么』、.doc 老格式打不开、生成/编辑 Word…
alchaincyf/huashu-md-html
Converts files and web pages into clean Markdown, then turns Markdown into polished HTML, Word, PDF and EPUB using four templates.
NousResearch/hermes-agent
Creates, reads, edits and templates Word .docx files with python-docx scripts, including tracked changes, comments, tables of contents and health checks.
Get00/BiaoShu-SKILL
Converts a tender document into Markdown, extracts scoring criteria and requirements, then drafts an industry-formatted technical bid as a Word file.
daymade/claude-code-skills
Converts DOCX/PDF/PPTX and saved HTML/HTM to high-quality Markdown with automatic post-processing.
XiaomiMiMo/MiMo-Code
Searches arXiv, fetches metadata, generates BibTeX, downloads PDFs and finds citations and related papers using a bundled Python script.
XiaomiMiMo/MiMo-Code
Interactive guide for creating, reviewing and fixing agent skills (SKILL.md folders), covering structure, frontmatter rules, trigger phrases and validation before sharing.
XiaomiMiMo/MiMo-Code
Lets one MiMoCode process drive another, headless with JSON events or interactively through tmux, to test behavior and visual regressions with parseable evidence.
XiaomiMiMo/MiMo-Code
Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.
XiaomiMiMo/MiMo-Code
Builds, edits, cleans, recalculates and reads Excel workbooks and CSV files with openpyxl and pandas, plus LibreOffice for recalculation and PDF export.
XiaomiMiMo/MiMo-Code
Hands coding work to the Claude Code CLI from the terminal in print, interactive tmux or background mode, only when you explicitly ask for Claude Code.
Categories
Produces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task. Built from scratch against the ECMA-376 / ISO/IEC 29500 specification rather than a proprietary library, the skill picks one of several paths depending on the job: authoring from scratch with python-docx when there is no source file, in-place placeholder replacement when a template just needs filling, an explode-edit-XML-reassemble workflow for deep structural changes, or a dedicated extraction pipeline when only text or metadata is needed. A LibreOffice-based script can render a PDF preview for QA.
DOCX Toolkit fits situations like: drafting a report, contract or letter as a new Word document; filling an existing Word template while keeping its styling; making a deep structural edit to a .docx that in-place editing cannot reach; extracting text, structure or metadata from a Word file.
Run `npx skills add XiaomiMiMo/MiMo-Code --skill docx-official -a claude-code`. Or copy the skill folder (packages/cli/src/skill/builtin/.bundle/docx-official in XiaomiMiMo/MiMo-Code) into .claude/skills/docx-official in your project. Claude Code loads it when a task matches its description.
Run `npx skills add XiaomiMiMo/MiMo-Code --skill docx-official -a codex`. Or copy the skill folder (packages/cli/src/skill/builtin/.bundle/docx-official in XiaomiMiMo/MiMo-Code) into .agents/skills/docx-official in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add XiaomiMiMo/MiMo-Code --skill docx-official -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docx-official, .gemini/skills/docx-official, .github/skills/docx-official and .opencode/skills/docx-official in your project.
Going by SKILL.md and its folder, DOCX Toolkit needs Python for the scripts in its folder and the command-line tools its instructions call (uv, python3 and soffice). Our summary lists: Python with python-docx and lxml (resolved automatically by uv run); LibreOffice, optional, for PDF previews.
SKILL.md names 2 domains. As links in the text: ecma-international.org and peps.python.org. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
DOCX Toolkit is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with DOCX Toolkit: DOCX Creation and Editing (anthropics/skills, 180k stars), Office File Process (xstongxue/best-skills, 2.9k stars), Huashu Markdown Publishing Pipeline (alchaincyf/huashu-md-html, 908 stars) and Word DOCX Toolkit (NousResearch/hermes-agent, 252k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
XiaomiMiMo (a GitHub organization) maintains it in XiaomiMiMo/MiMo-Code, which has 13,601 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 3, 2026.
Source: XiaomiMiMo/MiMo-Code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.