docx
Skill4 starsChanged 6 months agoApache-2.0View on GitHub
Use when creating, reading, editing, or producing Word documents (.docx) — including reports, memos, letters, templates with TOCs, headings, page numbers, or letterheads; extracting or reorganizing .docx content; find-and-replace; inserting/replacing images; accepting, rejecting, or authoring tracked changes and redlines; adding comments; validating docx structure; fixing 'invalid docx' or content-type / schema errors; converting .doc→.docx. Do NOT use for PDFs, spreadsheets, Google Docs, or coding tasks unrelated to Word documents.
- Installs packages
194 other projects use a version of this, 71 of them edited.
Adopted by
Most recently taken up by
- CloudChef/atlasclaw-providersedited, first seen Nov 8, 2026
- holon-run/holontheir own version, first seen Nov 8, 2026
- rvdbreemen/OTGW-firmwareedited, first seen Nov 8, 2026
- BrightGold70/skillsedited, first seen Nov 8, 2026
- ashleysbrain/skillstheir own version, first seen Nov 8, 2026
- EvanLee2004/finance-skillsedited, first seen Nov 8, 2026
Used with
Projects with it also use Video Generation, VLM 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.
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
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
Liang-MHSkillstock_analysis
获取 A 股、基金和港股的实时行情和技术分析数据
Also in 5 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
- +1 more from huang-x-h
- +5 more from dav-niu474
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 71
- nextlevelbuilder/goclaw★ 3.7k15% same
- OpenCoworkAI/open-cowork★ 2.2k17% same
- ChenglinPoly/infiAgent★ 1.2k17% same
- polyuiislab/infiAgent★ 1.2k17% same
- melandlabs/openloomi★ 1k17% same
- LeonChaoX/qinyan-academic-skills★ 91015% same
- loongclaw-ai/loongclaw★ 64015% same
- CoolNamesAllTaken/adsbee★ 34515% same
- rvdbreemen/OTGW-firmware★ 21317% same
- kid0317/crewai_mas_demo★ 16415% same
61 more not listed
Wrote their own version · 123
- anthropics/skills★ 189ksame name
- spinabot/brigade★ 11ksame name
- netease-youdao/LobsterAI★ 6.2ksame name
- OpenBMB/PilotDeck★ 5ksame name
- jjyaoao/HelloAgents★ 3.2ksame name
- anthropics/claude-agent-sdk-demos★ 2.8ksame name
- K-Dense-AI/claude-scientific-writer★ 2.6ksame name
- freestylefly/wesight★ 969same name
- Chen-zexi/open-ptc-agent★ 729same name
- tomascupr/sandstorm★ 447same name
113 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.
In this repository57 other files it gives its agents.
- autopilotSkill
- build-python-librarySkill
- build-temporalSkill
- canon-design-reviewSkill
- canon-pr-reviewSkill
- canon-reviewSkill
- ccr-modelsSkill
- ccr-runSkill
- chartSkill
- ci-health-reportSkill
- code-quality-trendsSkill
- competitive-matrixSkill
- councilSkill
- create-skillSkill
- deep-debug-ensemble-v1Skill
- deep-debugSkill
- deep-designSkill
- deep-ideaSkill
- deep-planSkill
- deep-qa-ensemble-v1Skill
- deep-qaSkill
- deep-researchSkill
- dependency-auditSkill
- deploy-status-reportSkill
- develop-board-gameSkill
- diagramSkill
- dora-lite-reportSkill
- find-skillSkill
- flaky-test-diagnoserSkill
- gap-finderSkill
- gen-crash-testSkill
- gen-smokeSkill
- goal-managerSkill
- init-github-repoSkill
- loop-until-doneSkill
- magic-fetchSkill
- ml-pipeline-reportSkill
- monitorSkill
- napSkill
- pipeline-health-reportSkill
- platform-friction-detectorSkill
- pptxSkill
- prod-readinessSkill
- prompt-clash-ensembleSkill
- prompt-clashSkill
- retrospectSkill
- slack-digestSkill
- slidesSkill
- specSkill
- sprint-retroSkill
- tableSkill
- team-temporalSkill
- timelineSkill
- update-stop-gateSkill
- user-activity-reportSkill
- vc-gauntletSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 189 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 70
CRITICAL: Use smart quotes for new content: When adding text with apostrophes or quotes, use XML entities to produce smart quotes:
- Very specific: line 82
Adding comments: Use comment.py to handle boilerplate across multiple XML files (text must be pre-escaped XML):
- Very specific: line 105
Replace entire
<w:r>elements: When adding tracked changes, replace the whole <w:r>...</w:r> block with <w:del>...<w:ins>...
“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
DOCX creation, editing, and analysis
Where to look
| Task | Go to |
Create a new .docx (reports, memos, letters, formatted output) | references/docx-js.md |
Edit an existing .docx (find-replace, tweak XML, add tracked changes) | ## Editing Existing Documents below |
| Raw OOXML / schema (tracked changes, comments, images at XML level) | references/ooxml.md |
| Accept all tracked changes | scripts/accept_changes.py |
| Add a comment | scripts/comment.py |
| Unpack / repack / validate | scripts/office/{unpack,pack,validate}.py |
Overview
A .docx file is a ZIP archive containing XML. Read it with pandoc, edit it
by unpacking the XML and repacking, or create a new one with the docx npm
package.
Common Operations
# Extract text as markdown (accepts tracked changes by default)
pandoc document.docx -o out.md
# Extract preserving tracked changes as markup
pandoc --track-changes=all document.docx -o out.md
# Convert legacy .doc → .docx (required before editing)
python scripts/office/soffice.py --headless --convert-to docx document.doc
# Convert to images (via PDF)
python scripts/office/soffice.py --headless --convert-to pdf document.docx
pdftoppm -jpeg -r 150 document.pdf page
# Accept all tracked changes
python scripts/accept_changes.py input.docx output.docx
# Unpack for raw XML editing
python scripts/office/unpack.py document.docx unpacked/Editing Existing Documents
Follow all 3 steps in order.
Step 1: Unpack
python scripts/office/unpack.py document.docx unpacked/Extracts XML, pretty-prints, merges adjacent runs, and converts smart quotes to XML entities (“ etc.) so they survive editing. Use --merge-runs false to skip run merging.
Step 2: Edit XML
Edit files in unpacked/word/. See references/ooxml.md for element patterns
(tracked changes, comments, images, schema rules).
Use "Claude" as the author for tracked changes and comments, unless the user explicitly requests use of a different name.
Use the Edit tool directly for string replacement. Do not write Python scripts. Scripts introduce unnecessary complexity. The Edit tool shows exactly what is being replaced.
CRITICAL: Use smart quotes for new content. When adding text with apostrophes or quotes, use XML entities to produce smart quotes:
<!-- Use these entities for professional typography -->
<w:t>Here’s a quote: “Hello”</w:t>| Entity | Character |
‘ | ' (left single) |
’ | ' (right single / apostrophe) |
“ | " (left double) |
” | " (right double) |
Adding comments: Use comment.py to handle boilerplate across multiple XML files (text must be pre-escaped XML):
python scripts/comment.py unpacked/ 0 "Comment text with & and ’"
python scripts/comment.py unpacked/ 1 "Reply text" --parent 0 # reply to comment 0
python scripts/comment.py unpacked/ 0 "Text" --author "Custom Author" # custom author nameThen add markers to document.xml (see the Comments section in references/ooxml.md).
Step 3: Pack
python scripts/office/pack.py unpacked/ output.docx --original document.docxValidates with auto-repair, condenses XML, and creates DOCX. Use --validate false to skip.
Auto-repair will fix:
durableId>= 0x7FFFFFFF (regenerates valid ID)- Missing
xml:space="preserve"on<w:t>with whitespace
Auto-repair won't fix:
- Malformed XML, invalid element nesting, missing relationships, schema violations
Common Pitfalls
- Replace entire
<w:r>elements: When adding tracked changes, replace the whole<w:r>...</w:r>block with<w:del>...<w:ins>...as siblings. Don't inject tracked change tags inside a run. - Preserve
<w:rPr>formatting: Copy the original run's<w:rPr>block into your tracked change runs to maintain bold, font size, etc.
Dependencies
- pandoc — text extraction (
brew install pandoc) - docx npm package — creating new documents (
bun install -g docx) - LibreOffice — PDF conversion and accepting tracked changes;
scripts/office/soffice.pyauto-configures it for sandboxed environments (brew install --cask libreoffice) - Poppler —
pdftoppmfor image conversion (brew install poppler) - defusedxml — used by
unpack.py,pack.py,comment.py, and the run/redline helpers. Declared inline viauvscript metadata —uv run scripts/...installs on first run.
Scripts & Templates
The helpers referenced throughout this skill live under scripts/ next to
SKILL.md — not embedded in this document.
Python scripts (scripts/):
| Path | Purpose |
accept_changes.py | Accept all tracked changes via LibreOffice |
comment.py | Add comments to a DOCX |
office/unpack.py | Unpack DOCX/PPTX/XLSX for XML editing |
office/pack.py | Repack an unpacked directory into a valid DOCX/PPTX/XLSX |
office/soffice.py | LibreOffice wrapper with sandbox-friendly env setup |
office/validate.py | Validate DOCX structure and content |
office/helpers/merge_runs.py | Merge adjacent runs with identical formatting |
office/helpers/simplify_redlines.py | Collapse adjacent w:ins / w:del |
office/validators/base.py | Shared BaseSchemaValidator (XML, namespace, ID-uniqueness, XSD, relationship checks) |
office/validators/docx.py | DOCXSchemaValidator — full WordprocessingML schema + tracked-change + relationship validation |
office/validators/pptx.py | PPTXSchemaValidator — PresentationML schema validation (shared code used by the pptx/xlsx skills too) |
office/validators/redlining.py | RedliningValidator — tracked-change integrity (accept-all round-trip test) |
XML templates (scripts/templates/): comments.xml, commentsExtended.xml,
commentsExtensible.xml, commentsIds.xml, people.xml — minimal valid root
documents used when bootstrapping a new comments payload.
Invoke scripts with uv run scripts/<path> (deps auto-install from each
script's inline metadata) or python scripts/<path> if you've pre-installed
defusedxml. Scripts add their parent dir to sys.path at import time, so
running from the skill root, the scripts/ dir, or any other cwd all work.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

