docx
Skill247 starsChanged 10 days agoMITView on GitHub
Unified DOCX skill — create, template-apply, edit/fill, read, repair, and compare Word documents. Use for formal Word deliverables and DOCX diagnosis. Not for PDF/PPT or casual plain-text drafting.
- Pipes a download into a shell
We split this skill into the rules it gives an agent
7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 189 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 79
If the read gate fails, the skill cannot load at all.
- Very specific: line 83
Run before READ_RENDERED routes.
- Distinctive: line 92
If the render gate fails, stop and report.
- Very specific: line 96
Run before CREATE_DOCX, APPLY_TEMPLATE, EDIT_FILL_DOCX, REPAIR_LAYOUT routes.
- Distinctive: line 106
If the full gate fails, stop and report.
- Very specific: line 141
Never invoke a .sh script through git-bash on Windows — setup.sh will refuse to install anything on MINGW*/MSYS*/CYGWIN* and tell you to …
- Very specific: line 232
Use these after CREATE_DOCX / APPLY_TEMPLATE is selected:
“Common” is measured: kept by at least 6 in 10 of the 189 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
Copied from MiniMaxAI/minimax-code (packages/local-runtime/assets/skills/docx)
at revision 564e9166d81f87b0b767b005e4779d4697b512be.
Copyright (c) 2026 MiniMax Code. Licensed under MIT.
Modified by ZCode: added the provenance notice; added a ZCodium capability-matrix section (read / render / full and what each level needs), and documented that setup.sh is report-only unless --install-dotnet is passed. Skill instructions are otherwise unchanged.
See THIRD-PARTY-NOTICES.md in the repository root for license and provenance.
-->docx
Replace <skill_dir> with the actual skill path shown by the loader.
Unified DOCX skill. SKILL.md is the dispatch layer. Pick the route that matches the user’s intent,
read that route guide, then go straight into execution. Do not front-load every task with the full
evidence/backend/acceptance waterfall.
Environment gates
The env gate ships in two equivalent dialects so the skill works on macOS, Linux/WSL, and Windows without any cygwin/git-bash hack:
| Platform | Setup | Env check |
| macOS / Linux / WSL | bash <skill_dir>/scripts/setup.sh | bash <skill_dir>/scripts/env_check.sh --level <lvl> |
| Windows (PowerShell 5.1+) | powershell -ExecutionPolicy Bypass -File <skill_dir>\scripts\setup.ps1 | powershell -ExecutionPolicy Bypass -File <skill_dir>\scripts\env_check.ps1 -Level <lvl> |
Both dialects accept the same three levels (read | render | full, default full) and produce
the same [OK] / [FAIL] / Status: READY|NOT READY lines, so a route may be gated on either one.
The skill loader runs only the read gate at load time, so missing dotnet/soffice does not block read-only routes.
Read gate
Checked at skill load time (automatic). Applies to: READ_CONTENT, READ_STRUCTURE, COMPARE_TWO_DOCX.
# macOS / Linux / WSL
bash <skill_dir>/scripts/env_check.sh --level read
# Windows
powershell -ExecutionPolicy Bypass -File <skill_dir>\scripts\env_check.ps1 -Level ReadRequires: python3 (or python launcher on Windows), unzip (or tar.exe on Windows 10+), UTF-8 console.
If the read gate fails, the skill cannot load at all.
Render gate
Run before READ_RENDERED routes. Includes all read-level checks plus:
bash <skill_dir>/scripts/env_check.sh --level render # *nix
powershell -ExecutionPolicy Bypass -File <skill_dir>\scripts\env_check.ps1 -Level Render # WindowsRequires (in addition to read): soffice / soffice.exe, pdftoppm (or pdftocairo).
If the render gate fails, stop and report. Do not silently fall back to structure-only reads.
Full gate
Run before CREATE_DOCX, APPLY_TEMPLATE, EDIT_FILL_DOCX, REPAIR_LAYOUT routes.
bash <skill_dir>/scripts/env_check.sh --level full # *nix
powershell -ExecutionPolicy Bypass -File <skill_dir>\scripts\env_check.ps1 -Level Full # WindowsRequires (in addition to render): dotnet >= 9, pandoc, zip (or Compress-Archive on Windows),
dotnet project built.
If the full gate fails, stop and report. Do not attempt generation with missing dependencies.
Capability matrix in ZCodium
The levels above assume a machine where the skill may install its own toolchain. In ZCodium the
repo skills must not silently change the host, so scripts/setup.sh is report-only unless you
opt in. Check the level you actually need before promising a deliverable:
| Level | Needs | Without it |
read | python3 (+ pdftoppm for page images) | — |
render | read + soffice / pandoc | no PDF/PNG preview of the result |
full | render + dotnet >= 9 + zip | creation, template application, validation and track-changes editing are unavailable — say so instead of guessing |
.NET is a global SDK and the upstream installer fetched it with curl | sh, so this fork makes it
opt-in: run bash scripts/setup.sh --install-dotnet (writes ~/.dotnet, no sudo) only after the
user agrees. The setup script never edits ~/.zprofile / ~/.zshrc and never installs global npm
packages; it prints the lines the user may want to add themselves.
On an air-gapped or intranet host the curl | sh and package-manager paths cannot work at all.
Plan for read / render and use the full gate only where a pre-provisioned SDK exists.
Cross-platform path & temp-dir convention
Examples in docs/ and references/ are written for *nix shells. When you execute on Windows,
do these substitutions consistently:
| In the example | Windows substitute |
<skill_dir>/scripts/foo.sh | <skill_dir>\scripts\foo.ps1 (every .sh has a .ps1 peer) |
python3 <skill_dir>/scripts/foo.py | python <skill_dir>\scripts\foo.py (the .py files are cross-platform) |
/tmp/docx-<thing> | $env:TEMP\docx-<thing> |
bash <skill_dir>/scripts/setup.sh | powershell -ExecutionPolicy Bypass -File <skill_dir>\scripts\setup.ps1 |
forward slashes in paths | backslashes; quote any path containing spaces |
Never invoke a .sh script through git-bash on Windows — setup.sh will refuse to install
anything on MINGW*/MSYS*/CYGWIN* and tell you to switch to powershell.exe / pwsh.exe.
Operational rules — read before doing anything
1. Dispatch by user intent, not by backend.
Start with the shortest route choice:
- creating a new formal Word deliverable ->
CREATE_DOCX- preserving content but changing template / institutional style ->
APPLY_TEMPLATE- editing an existing DOCX in place ->
EDIT_FILL_DOCX- reading text / structure / rendered pages -> matching read route
- fixing visible defects ->
REPAIR_LAYOUT- comparing two DOCX files ->
COMPARE_TWO_DOCXRead
docs/router.mdonly to settle the route. Do not readdocs/evidence.md,docs/backends.md, anddocs/acceptance.mdbefore route selection.
2. For generation routes, choose style family / recipe before backend.
The old benchmarked generation core stays in this skill. For
CREATE_DOCXandAPPLY_TEMPLATE, the first substantive decision is the visual system, not the backend. Reuse these files as the generation core:
references/typography_guide.mdreferences/design_principles.mdreferences/cjk_typography.mdscripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples*.csThese are not optional decoration. They are the quality-preserving recipe layer.
3. Backend comes after route + recipe.
Dis the default write backend for formal DOCX creation, template application, and most edits.Sis only for OpenXML graph work beyond the builtin CLI surface.Xis only for deterministic local XML patch / inspection work.- Formal
CREATE_DOCXis never routed to pandoc as a generation backend.- If a chosen backend gate fails, stop and report it. Do not silently switch.
4. Rendered acceptance is a post-write gate, not a pre-dispatch hop.
For template, layout, TOC, multi-section, header/footer, and page-number work, finish the write first, then run rendered acceptance from
docs/acceptance.md/docs/rendered-delivery.md.
5. Keep DOCX execution inside this skill.
Do not bounce rendered diagnosis to another skill. Do not treat raw XML string replace as a valid editing strategy. Do not use
readlink,$0, or shell path tricks in skill docs; use<skill_dir>only.
6. DOCX→PDF is native to this skill. If the user asks to convert an existing Word/DOCX document to PDF while preserving layout, do it here via
python3 <skill_dir>/scripts/docx_to_pdf.py(orsoffice --headless --convert-to pdfas fallback), then verify the PDF. Do not route DOCX→Markdown/HTML→PDF for a preservation task: DOCX already carries page geometry, sections, headers/footers, fields, numbering, and table layout. HTML/PDF belongs to redesign/recomposition after native render fails or when explicitly requested.
Routes — pick one, then read that guide
WRITE / GENERATE a DOCX
| Intent | Guide | What happens next |
| CREATE_DOCX — author a new report / proposal / contract / memo / thesis / 公文 | docs/task-create.md | normalize source -> choose recipe family -> choose D/S -> write -> acceptance |
| APPLY_TEMPLATE — preserve content but move into a template / institutional visual system | docs/task-apply-template.md | choose template mode -> align recipe family -> read only the needed structure -> choose D/S -> write -> strict rendered acceptance |
| EDIT_FILL_DOCX — mutate content in an existing DOCX while keeping it the same document | docs/task-edit-fill.md | choose edit mode -> choose X/D/S -> mutate -> acceptance |
READ / DIAGNOSE / REPAIR a DOCX
| Intent | Guide | Primary truth |
| READ_CONTENT — summarize / quote / retrieve text | docs/task-read-content.md | content |
| READ_STRUCTURE — inspect styles / sections / numbering / TOC / comments / revisions | docs/task-read-structure.md | structure |
| READ_RENDERED — inspect what the pages actually look like | docs/task-read-rendered.md | rendered + structure |
| REPAIR_LAYOUT — fix page-level defects | docs/task-repair-layout.md | rendered -> structure -> rendered |
| COMPARE_TWO_DOCX — explain before/after or source/template differences | docs/task-compare-two-docx.md | content + structure + rendered |
Deep docs — only after the route is clear
| File | Use when |
docs/router.md | settle route choice |
docs/evidence.md | the selected route needs truth-source clarification |
docs/backends.md | the selected route needs backend arbitration |
docs/acceptance.md | you are ready to validate deliverables |
docs/rendered-delivery.md | rendered issue report shape is required |
Generation core references
Use these after CREATE_DOCX / APPLY_TEMPLATE is selected:
| File | Role |
references/scenario_a_create.md | create-from-scratch mechanics |
references/scenario_c_apply_template.md | template transfer and multi-section rules |
references/typography_guide.md | font pairings, sizes, spacing, page layout, table rules |
references/design_principles.md | visual judgment rules when exact specs are missing |
references/cjk_typography.md | CJK fonts, 字号, mixed-script rules, 公文 defaults |
scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples*.cs | benchmarked recipe families; choose one instead of inventing values |
Runtime shorthands
# macOS / Linux / WSL
CLI="dotnet run --project <skill_dir>/scripts/dotnet/MiniMaxAIDocx.Cli --"
TMPDIR_DOCX="${TMPDIR:-/tmp}"# Windows PowerShell
$CLI = "dotnet run --project <skill_dir>\scripts\dotnet\MiniMaxAIDocx.Cli --"
$TmpDocx = $env:TEMPCommon commands (substitute $TMPDIR_DOCX / $TmpDocx for the literal /tmp examples elsewhere
in docs/):
$CLI analyze --input in.docx --json
$CLI diff --before before.docx --after after.docx
$CLI merge-runs --input out.docx
$CLI validate --input out.docx --xsd <skill_dir>/assets/xsd/wml-subset.xsd
$CLI validate --input out.docx --business
$CLI validate --input out.docx --gate-check <skill_dir>/assets/xsd/business-rules.xsd
python3 <skill_dir>/scripts/docx_to_pdf.py --input in.docx --output "$TMPDIR_DOCX/docx-render.pdf"
python3 <skill_dir>/scripts/render_docx_pages.py in.docx --output-dir "$TMPDIR_DOCX/docx-pages"On Windows substitute python3 -> python, / -> \, and $TMPDIR_DOCX -> $env:TEMP. The
underlying .py scripts use tempfile.TemporaryDirectory and Path(...).expanduser().resolve()
so they do not care which slash style you pass in.
Structural non-negotiables
w:p=pPr-> runsw:r=rPr-> text-like childrenw:tbl=tblPr->tblGrid-> rowsw:bodyends withsectPr- heading styles need
OutlineLevel - direct formatting contamination must be stripped unless explicitly preserved
- template and multi-section work must preserve section graph,
titlePg, and per-section headers/footers
Out of scope
- PDF / PPT deliverables -> use
pdf/pptx - casual plain-text drafting with no DOCX output
- pretending a Word-authored DOCX can be safely round-tripped through pandoc for formal output
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- anthropics/skills★ 186ksame name
- spinabot/brigade★ 11ksame name
- netease-youdao/LobsterAI★ 6.2ksame name
- OpenBMB/PilotDeck★ 4.9ksame name
- nextlevelbuilder/goclaw★ 3.7ksame name
- jjyaoao/HelloAgents★ 3.2ksame name
- anthropics/claude-agent-sdk-demos★ 2.8ksame name
- K-Dense-AI/claude-scientific-writer★ 2.4ksame name
- OpenCoworkAI/open-cowork★ 2.2ksame name
- ChenglinPoly/infiAgent★ 1.2ksame name
184 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use gift-evaluator, Podcast Generate and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dav-niu474Skillgift-evaluator
The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.
Also in 5 projects that use this
dav-niu474SkillPodcast Generate
Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).
Also in 5 projects that use this
huang-x-hSkillVideo Generation
Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.
Also in 6 projects that use this
huang-x-hSkillVLM
Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.
Also in 6 projects that use this
SeifBenayedSkillfile-reading
Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.
Also in 5 projects that use this
SeifBenayedSkillpdf-reading
Use this skill when you need to read, inspect, or extract content from PDF files — especially when file content is NOT in your context and you need to read it from disk. Covers content inventory, text extraction, page rasterization for visual inspection, embedded image/attachment/table/form-field extraction, and choosing the right reading strategy for different document types (text-heavy, scanned, slide-decks, forms, data-heavy). Do NOT use this skill for PDF creation, form filling, merging, splitting, watermarking, or encryption — use the pdf skill instead.
Also in 6 projects that use this
- +1 more from huang-x-h
- +5 more from dav-niu474
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/react-best-practices/AGENTS.mdAGENTS.md
- agent-browserSkill
- ai-elementsSkill
- architecture-governanceSkill
- dep-refsSkill
- dogfoodSkill
- e2e-case-lifecycleSkill
- electronSkill
- feature-boundary-plannerSkill
- vercel-react-best-practicesSkill
- session-managementSkill
- xlsxSkill
- zcode-large-task-fixtureSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

