docx
Skill by mudler
Teaches an AI assistant to read, edit and build Microsoft Word .docx files with the paper-docx library, which extends python-docx. It is for users who work with Word files in the sandbox add-on.
Install docx
Built from the published package, never by AI.
git clone --depth 1 https://github.com/mudler/LocalAI /tmp/LocalAI && mkdir -p ~/.claude/skills && cp -r /tmp/LocalAI/addons/sandbox/skills/docx ~/.claude/skills/docxRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/mudler/LocalAI /tmp/LocalAI && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/LocalAI/addons/sandbox/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 gives an AI assistant the paper-docx distribution, which imports as docx and extends python-docx. It adds public APIs for finding text across fragmented runs and document stories, editing revisions and review structures, targeting bookmarks, fields and content controls, composing documents, inspecting package changes, and refusing operations it cannot perform safely. Unchanged package parts can be kept byte for byte with patch_save.
Documents are built in the office sandbox profile, which includes LibreOffice Writer and fonts. The skill includes a render.sh script that converts a document to PDF and writes a PNG for each page, so the assistant can look at every page before reporting that a file is finished. It is aimed at people who want an assistant to create or edit Word files inside the sandbox add-on.
Written from the project's SKILL.md and checked against it.
What it can do
- InspectionFinds text across fragmented runs and document stories.
- Guarded editsRefuses operations the library cannot perform safely, with a stated reason.
- Review structuresEdits revisions and review structures such as comments.
- TargetingTargets bookmarks, fields and content controls.
- CompositionComposes new documents from the library's public APIs.
- DiffsInspects package changes made to a document.
- Byte-preserving savespatch_save keeps original bytes of unchanged package parts and returns change evidence.
- Page renderingrender.sh converts a document to PDF and writes a PNG per page with LibreOffice.
- Package diagnosisdocx.package.diagnose(path) reports on a file before it is opened.
What you need
- Sandbox add-on (gVisor or a virtual machine)
- Python 3 in the guest image
- The office sandbox profile for building and rendering
Try asking
- Find and replace a phrase across a Word file without breaking its formatting
- Build a new .docx report from this outline and render each page to check it
- Diagnose this .docx file and tell me why it will not open
Good to know
- The host backend does not have these tools; the sandbox add-on guest image does.
- Render stops after 180 seconds unless RENDER_TIMEOUT is changed.
- Renders come from LibreOffice, so fonts and page breaks can differ from Word.
- Switching to the office profile restarts the sandbox and loses installed packages and running processes.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: addons/sandbox/skills/docx/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB -
notice.txt5 KB -
references/api-001.md95 KB -
references/api-002.md142 KB -
references/api-003.md122 KB
Show all 7 files
-
references/api-004.md34 KB -
references/paper-api.md13 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
Does this skill work on the host without a sandbox?
No. The source says the tools are installed in the guest image of the sandbox add-on and the host backend does not have them.
What happens if a .docx file is refused when opened?
paper-docx validates the package on intake and rejects archives with more than one reading, raising MalformedPackageError. The skill says to report the refusal and its message rather than work around it.
Can the assistant check how a document looks?
Yes. The render.sh script converts the document to PDF with LibreOffice and writes a PNG per page, which the assistant is told to open and inspect.
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 MIT 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.
