Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 85
  • 8.1k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-resilient

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install docx-parse-resilient in Claude Code

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

A

No 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 →

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.

docx-parse-resilient Install

Add to stack

Loading.