docx
Skill by TokenRhythm
Reads, edits and creates Microsoft Word .docx files for AI assistants. It extracts structure, replaces text in place to keep styles, and builds new documents from JSON, Markdown or python-docx code.
Install docx
Built from the published package, never by AI.
git clone --depth 1 https://github.com/TokenRhythm/opensquilla /tmp/opensquilla && mkdir -p ~/.claude/skills && cp -r /tmp/opensquilla/src/opensquilla/skills/bundled/docx ~/.claude/skills/docxRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/TokenRhythm/opensquilla /tmp/opensquilla && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/opensquilla/src/opensquilla/skills/bundled/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 works with Microsoft Word .docx files, which are OOXML zip containers holding XML parts. It picks one of three paths: inspect an existing file to dump its paragraphs, styles and tables as JSON; edit it in place by replacing text at the run level so styles stay intact; or create a new document from a JSON spec, a Markdown draft, or python-docx code.
For page layout, numbering, or other changes that python-docx cannot handle, the skill unzips the file, patches the XML directly, and validates the result in LibreOffice headless. It is aimed at people who read, revise or generate Word documents with an AI assistant. It does not handle legacy .doc files, Google Docs, or macro-enabled .docm files.
Written from the project's SKILL.md and checked against it.
What it can do
- Inspect a documentDumps paragraphs, styles, tables and section count as JSON without changing the file.
- Replace text in placeEdits text at the run level so fonts, styles and theme settings are preserved.
- Structural XML editsPatches word/document.xml and related parts for layout and numbering changes python-docx lacks.
- Create from MarkdownExports a Markdown draft to a new .docx file through a script.
- Create from a JSON specBuilds a document from declared metadata, headings, paragraphs and tables.
- Create with python-docxUses python-docx calls directly to add headings, paragraphs and tables.
- Detect tracked changesFlags documents that contain w:ins or w:del revision elements.
What you need
- Python (python or python3 on the path)
- python-docx package, installable with uv
- LibreOffice, used for headless validation of patched files
Try asking
- Extract all headings and tables from this .docx file
- Replace the {{CLIENT}} placeholder with Acme Corp in this Word file
- Create a Word memo from this Markdown draft
Good to know
- Handles .docx only, not legacy .doc files or Google Docs.
- Does not run or handle macro-enabled .docm or VBA content.
- Documents with tracked changes should be treated as read-only until revisions are resolved.
- python-docx has limited support for page layout, numbering and tracked changes.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: src/opensquilla/skills/bundled/docx/SKILL.md, src/opensquilla/skills/bundled/docx/scripts/create_docx.py, src/opensquilla/skills/bundled/docx/scripts/edit_docx.py, src/opensquilla/skills/bundled/docx/scripts/export_markdown_docx.py, src/opensquilla/skills/bundled/docx/scripts/inspect_docx.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB -
THIRD_PARTY_NOTICES.md476 B -
references/python_docx.md3 KB -
scripts/create_docx.py2 KB -
scripts/edit_docx.py3 KB
Show all 7 files
-
scripts/export_markdown_docx.py3 KB -
scripts/inspect_docx.py2 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 this skill edit .doc or Google Docs files?
No. The source says it handles only .docx (OOXML WordprocessingML). Legacy .doc files and Google Docs must be converted first through LibreOffice or Word export.
How does it handle tracked changes?
The inspect helper reports has_tracked_changes when it finds w:ins or w:del elements. The source says these must be resolved by patching the XML directly, and such documents should be treated as read-only until reviewers accept or reject the revisions.
Can it produce PDF files?
Not directly. The source says PDF generation from a .docx should be handed off to LibreOffice headless or a separate PDF skill.
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 89 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.
