docx
Skill by HKUDS
Read, create, and edit Microsoft Word .docx files for an AI assistant. It handles text and table extraction, report and letter generation, find-and-replace, tracked changes, and comments.
Install docx
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HKUDS/DeepTutor /tmp/DeepTutor && mkdir -p ~/.claude/skills && cp -r /tmp/DeepTutor/deeptutor/skills/builtin/docx ~/.claude/skills/docxRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/DeepTutor /tmp/DeepTutor && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/DeepTutor/deeptutor/skills/builtin/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 read, create, and edit Microsoft Word .docx files. It covers extracting text and tables, and generating reports, letters, and memos with headings, tables, images, a table of contents, and page numbers. It can also run find-and-replace and apply tracked changes and comments.
It uses python-docx by default for creating, reading, and simple edits. For tracked changes, comments, and exact-fidelity edits, it works with raw OOXML through Python's zipfile module. The assistant runs Python code in a shell sandbox and checks that the output file reopens cleanly. It is aimed at users who have a .docx file or need a Word deliverable. It does not cover PDF, .xlsx, .pptx, or Google Docs.
Written from the project's SKILL.md and checked against it.
What it can do
- Read and extractExtracts body paragraphs, tables, headers, and footers from an existing .docx file.
- Create documentsBuilds Word files with headings, styled lists, tables, images, and page breaks.
- Page setup and fieldsSets page size and margins, adds headers and footers, and inserts page numbers and a table of contents.
- Find and replaceReplaces placeholder text in an existing document while keeping run formatting.
- Tracked changesAdds insertions and deletions as tracked changes (redlines) using raw OOXML.
- CommentsAdds comments anchored to document text using a separate comments part.
- ValidationReopens the saved file and checks the ZIP package to confirm it is not corrupt.
What you need
- Python with python-docx (preinstalled, per the source)
- A shell sandbox to run exec with Python source
- LibreOffice (optional, only for .doc conversion and PDF export)
Try asking
- Summarize the text and tables in this .docx file.
- Create a memo in Word with headings, a table, and page numbers.
- Replace {{CLIENT}} with Acme Co throughout this contract and save a new copy.
Good to know
- python-docx ignores tracked changes and skips tables, headers, and footers when reading doc.paragraphs.
- Legacy .doc files cannot be read by python-docx and need LibreOffice to convert.
- There is no built-in PDF export, and LibreOffice is often absent.
- Comments and tracked changes are fiddly, so the source advises checking that the output opens in Word.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: deeptutor/skills/builtin/docx/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB
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 the docx skill edit tracked changes in a Word file?
Yes. The source says tracked changes (redlines) and comments are handled with raw OOXML, which python-docx cannot express. It uses a consistent author name, defaulting to "Claude" unless the user names one.
Does the docx skill export Word files to PDF?
Not by itself. The source says there is no built-in PDF export, and PDF export needs LibreOffice, which is optional and often absent.
Does the docx skill work with Google Docs or .xlsx files?
No. The description says it is not for PDF, .xlsx, .pptx, or Google Docs.
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 Apache-2.0 licence. The service it connects to may have its own pricing.
Is docx safe to use?
It scores 91 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.
