docx
Skill by asgeirtj
Creates, reads and edits Word (.docx) and .dotx files for AI assistants. It builds new documents with docx-js, edits existing files through their XML, and supports tracked changes and comments.
Install docx
Built from the published package, never by AI.
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks /tmp/system_prompts_leaks && mkdir -p ~/.claude/skills && cp -r /tmp/system_prompts_leaks/Anthropic/claude-code/skills/docx ~/.claude/skills/docxRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks /tmp/system_prompts_leaks && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/system_prompts_leaks/Anthropic/claude-code/skills/docx ~/.gemini/antigravity-cli/skills/docxAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The docx skill lets an AI assistant create, read, edit and check Word documents (.docx) and Word templates (.dotx). New documents are written as scripts using the docx npm library. Existing files are unpacked, their word/document.xml is edited, and they are zipped back up. Content is read with pandoc.
The skill also includes helpers for merging text runs, accepting tracked changes, validating edits against the original file, and adding comments. Finished files can be rendered to PDF and page images to check the layout. The skill is aimed at users who need Word output, redlines, comments or templates. It says not to use it for PDFs, spreadsheets or Google Docs.
Written from the project's SKILL.md and checked against it.
What it can do
- Create new documentsWrites new .docx files with the docx npm library, with notes on page size, tables, lists and headings.
- Edit existing documentsUnpacks a .docx, edits word/document.xml directly, and rezips it into a new file.
- Read contentExtracts the text of a Word file as Markdown using pandoc.
- Tracked changesWraps edits in w:ins and w:del markup and validates that changes are tracked.
- CommentsAdds comments through a helper script that writes the required comment files and links.
- Accept changesProduces a clean copy with all tracked changes accepted using a script.
- Render for reviewConverts a document to PDF and page images so the layout can be checked visually.
- Convert legacy filesConverts .doc files to .docx with LibreOffice before editing.
What you need
- Node.js with the docx npm package (preinstalled, per the source)
- Python
- pandoc
- LibreOffice (soffice)
- pdftoppm (Poppler)
Try asking
- Turn these meeting notes into a polished Word document with headings and a table.
- Edit contract.docx and show my changes as tracked changes under my name.
- Add a comment to the fees section of this Word file saying the cap is too low.
Good to know
- Legacy .doc files must be converted to .docx before they can be edited.
- docx-js cannot open existing files, so edits are made to the unpacked XML.
- Comments are not visible until their range markers are placed in document.xml.
- Some accept-changes views can show an empty bullet where a paragraph was deleted, which is a display artifact.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: Anthropic/claude-code/skills/docx/SKILL.md, Anthropic/claude-code/skills/docx/scripts/__init__.py, Anthropic/claude-code/skills/docx/scripts/accept_changes.py, Anthropic/claude-code/skills/docx/scripts/comment.py, Anthropic/claude-code/skills/docx/scripts/merge_runs.py, Anthropic/claude-code/skills/docx/scripts/office/helpers/__init__.py, Anthropic/claude-code/skills/docx/scripts/office/helpers/pptx_chart.py, Anthropic/claude-code/skills/docx/scripts/office/helpers/pptx_slide.py, Anthropic/claude-code/skills/docx/scripts/office/helpers/pptx_theme.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
LICENSE.txt11 KB -
SKILL.md9 KB -
scripts/__init__.py1 B -
scripts/accept_changes.py4 KB -
scripts/comment.py14 KB
Show all 62 files
-
scripts/merge_runs.py9 KB -
scripts/office/helpers/__init__.py4 KB -
scripts/office/helpers/pptx_chart.py10 KB -
scripts/office/helpers/pptx_slide.py3 KB -
scripts/office/helpers/pptx_theme.py3 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd73 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd7 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd50 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd624 B -
scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd148 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd1 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd9 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd14 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd82 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd1 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd7 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd6 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd1 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd880 B -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd3 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd3 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd7 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd23 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd1 KB -
scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd237 KB
And 32 more files on GitHub.
Alternatives to docx
All alternatives →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr
docx: common questions
Can this skill edit PDFs or Google Docs?
No. The description says not to use it for PDFs, spreadsheets, Google Docs, or coding unrelated to document generation.
Can it work with old .doc files?
Yes, but only after conversion. The source says legacy .doc files must be converted to .docx first using LibreOffice.
Does it support tracked changes and comments?
Yes. The skill describes wrapping edits in w:ins and w:del, validating that edits are tracked, and adding comments with a helper script.
How do I install docx?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is docx free?
The code is published under the CC0-1.0 licence. The service it connects to may have its own pricing.
Is docx safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to docx?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
