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

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

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

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

Step-by-step: install docx-dual-parse 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. 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

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

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.

docx-dual-parse Install

Add to stack

Loading.