xyliu-cs/openspace-gdpval/docx-shell-extract
Claude Code and agent skill by xyliu-cs/openspace-gdpval
- community
Checking that the SKILL.md file is still in the repository.
Extract text from DOCX files using shell commands when python-docx is unavailable
Install
npx vskill@latest install xyliu-cs/openspace-gdpval/docx-shell-extractSKILL.md
The same SKILL.md was published earlier as zhanghong3721/kimiclaw/docx-shell-extract.
DOCX Shell Extraction
When to Use This Skill
Use this pattern when you need to read or extract text from Microsoft Word (.docx) files in constrained environments where:
- The
python-docxlibrary is not available - You cannot install additional Python packages
- You need a quick, reliable shell-based solution
Core Technique
DOCX files are ZIP archives containing XML files. The main document content is stored in word/document.xml. You can extract and parse this using standard shell tools.
Step-by-Step Instructions
Step 1: Extract the document.xml content
The -p flag pipes the content to stdout without extracting to disk.
Step 2: Strip XML tags to get plain text
This removes all XML tags, leaving the text content.
Step 3: Clean up whitespace (optional)
For cleaner output, add additional sed processing:
This removes:
- XML tags
- XML entities (like
&,<) - Leading/trailing whitespace
- Empty lines
Step 4: Save to a text file (optional)
Complete Example
Verification
After extraction, verify the content was captured:
Limitations
- This method extracts raw text without formatting
- Complex layouts, tables, and images are not preserved
- Some special characters may need additional handling
- Works best for text-heavy documents
Alternatives to Explore
If this approach fails or the DOCX structure differs:
- Check for
word/document.xmlexistence:unzip -l filename.docx | grep document.xml - Some documents may use
word/*.xmlwith different naming - Consider
pandocif available:pandoc filename.docx -t plain
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggdpval_bench/skills/docx-shell-extract/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xyliu-cs/openspace-gdpval/docx-shell-extract)