docx-dual-parse
Skill by HKUDS
Extracts plain text from DOCX files using shell commands (unzip and sed) or Python's zipfile module. It is aimed at containers, sandboxes and minimal images where tools may be missing or restricted.
Install docx-dual-parse
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-4bba79 ~/.claude/skills/docx-dual-parseRun 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-4bba79 ~/.gemini/antigravity-cli/skills/docx-dual-parseAntigravity 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
This skill extracts plain text from Microsoft Word (.docx) files. A DOCX file is a ZIP archive of XML, so the skill reads word/document.xml and strips the XML tags. It offers two methods. Method A uses unzip and sed in the shell. Method B uses Python's zipfile module with a regular expression. It also includes environment checks and a unified parse_docx function that tries the shell method first and falls back to Python.
It is intended for users working in containers, sandboxes or minimal images where python-docx may be missing or shell utilities may be restricted. The output contains text only. It does not preserve formatting, images or table structure, so it suits simple text extraction.
Written from the project's SKILL.md and checked against it.
What it can do
- Shell extractionReads word/document.xml with unzip and strips tags with sed, optionally trimming whitespace.
- Python zipfile extractionReads the DOCX archive with Python's zipfile module and strips XML tags with a regular expression.
- Environment detectionChecks whether unzip or python3 is available before choosing an extraction method.
- Unified parse_docx functionTries the shell method first and falls back to the Python method if the shell result is empty.
- Temporary directory extractionExtracts the whole DOCX archive to a temporary directory for more complex parsing or debugging.
- Output verificationShows how to check that extraction produced content and that an output file was created.
What you need
- unzip and sed for the shell method
- python3 for the Python method
Try asking
- Extract the text from report.docx so I can read it.
- Save the plain text of contract.docx to output.txt.
- Pull the text from this DOCX, using Python if unzip is missing.
Good to know
- Does not preserve formatting, images or table structure.
- May include residual XML entity references such as .
- DOCX must be valid Office Open XML. Protected or encrypted files need extra handling.
- Works best for simple text extraction needs.
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-4bba79/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to docx-dual-parse
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-dual-parse: common questions
Does it keep formatting or tables from a Word file?
No. The source says it does not preserve formatting, images or table structure, and only extracts text.
Does it need python-docx installed?
No. The Python method uses the standard library zipfile module, which the source says is useful when python-docx may be missing.
Can it read password-protected DOCX files?
The source says protected or encrypted DOCX files require additional handling and does not describe how to read them.
How do I install docx-dual-parse?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is docx-dual-parse free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is docx-dual-parse safe to use?
It scores 86 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-dual-parse?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
