docx-parse-resilient
Skill by HKUDS
Extracts plain text from Microsoft Word (.docx) files using a shell method with a Python zipfile fallback. It suits constrained environments like containers, minimal images and CI/CD where python-docx may be missing.
Install docx-parse-resilient
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HKUDS/OpenSpace /tmp/OpenSpace && mkdir -p ~/.claude/skills && cp -r /tmp/OpenSpace/benchmarks/gdpval/skills/docx-shell-parse-enhanced ~/.claude/skills/docx-parse-resilientRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/OpenSpace /tmp/OpenSpace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/OpenSpace/benchmarks/gdpval/skills/docx-shell-parse-enhanced ~/.gemini/antigravity-cli/skills/docx-parse-resilientAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install docx-parse-resilient in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill extracts plain text from Microsoft Word (.docx) files. It treats a DOCX file as a ZIP archive and reads the word/document.xml file. The primary method uses unzip -p with sed to strip XML tags. If the shell method returns no output, it falls back to Python's standard zipfile module.
The skill includes step-by-step commands, a reusable shell function that writes to stdout or a file, and a standalone Python script that reports which method was used. It is aimed at environments where python-docx may be unavailable, such as containers, minimal images and CI/CD pipelines. It does not preserve formatting, images or table structure.
Written from the project's SKILL.md and checked against it.
What it can do
- Shell text extractionReads word/document.xml with unzip -p and strips XML tags with sed.
- Python zipfile fallbackUses Python's standard zipfile module when the shell method returns empty output.
- Resilient shell functionProvides parse_docx_resilient, which writes extracted text to stdout or a given file.
- Empty output checkTests whether the shell extraction produced content before switching to Python.
- Standalone Python scriptOffers a script that tries shell first and prints which method succeeded.
- Output verificationShows commands to check extracted output with head, wc and grep.
- Troubleshooting checksLists commands to verify file type, corruption and tool availability.
What you need
- unzip command for the primary shell method
- Python 3 for the fallback method
- Python standard library only, no external packages
Try asking
- Extract the text from report.docx into report.txt
- Pull the plain text out of contract.docx, falling back to Python if unzip fails
- Check whether unzip and python3 are available for extracting DOCX files
Good to know
- Does not preserve formatting, images or table structure
- May include some residual XML entity references
- DOCX must be a valid Office Open XML file
- Python fallback uses only the standard library
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: benchmarks/gdpval/skills/docx-shell-parse-enhanced/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to docx-parse-resilient
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-parse-resilient: common questions
How does the DOCX text extraction fallback work?
The shell method runs first using unzip and sed. If it returns no output, the skill runs a Python script that reads word/document.xml with the zipfile module.
Does it need python-docx?
No. The source says the Python fallback uses only the standard library and no external packages.
Does it keep formatting or tables from the document?
No. The source states it does not preserve formatting, images or table structure, and works best for simple text extraction.
How do I install docx-parse-resilient?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is docx-parse-resilient free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is docx-parse-resilient safe to use?
It scores 85 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-parse-resilient?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
