docx-read-fallback

docx-read-fallback is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 25 tokens per session (581 once invoked), scanned A, original, MIT.

A fallback method for extracting text from Microsoft Word DOCX files with the Python `python-docx` library. It uses a shell command when normal file-reading or sandbox execution tools fail.

In plain words
What is it for?
Use it to print document paragraphs, include paragraph indexes, extract headings by style, and read tables from DOCX files through a shell-run Python command.
Why use it?
It gives you another way to read Word documents after standard methods return errors, time out, or cannot handle the file. It can also expose paragraph headings and table contents.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to print document paragraphs, include paragraph indexes, extract headings by style, and read tables from DOCX files through a shell-run Python command.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/openspace/docx-read-fallback
About the project

OpenSpace is a skill-management layer for AI agents that stores, retrieves, evaluates, shares, and improves reusable workflows. It is intended for people using multiple coding agents who want skills to be reused and refined based on task outcomes. The catalogue provides 200 skills for use with OpenSpace and the agents it supports.

HKUDS/OpenSpace · 8,146 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HKUDS/OpenSpace --skill docx-read-fallback
Clone the repo
git clone --depth 1 https://github.com/HKUDS/OpenSpace

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docx-read-fallback

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/docx-read-fallback/github.svg)](https://agentmods.dev/skills/hkuds/openspace/docx-read-fallback)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/docx-read-fallback"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/docx-read-fallback/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docx-read-fallback

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/openspace/docx-read-fallback"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/docx-read-fallback.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 581 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00581
Opus 5.5 $0.00010 $0.00232
Sonnet 5.5 $0.00005 $0.00116
Haiku 4.5 $0.00003 $0.00058

Measured 3mo ago against content hash 238a7ac92c89, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

docx-read-fallback scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

benchmarks/gdpval/skills/docx-read-fallback/SKILL.md · 77 lines

What it actually says

DOCX Read Fallback

When read_file or execute_code_sandbox fails to read .docx files, use run_shell with python-docx as a reliable workaround.

When to Use

  • read_file fails, times out, or returns errors on .docx files
  • execute_code_sandbox attempts to read the docx fail
  • You need to extract text content from a Word document
  • Multiple standard approaches have been exhausted

How to Use

Basic Text Extraction

python -c "import docx; doc = docx.Document('path/to/file.docx'); print('\n'.join([p.text for p in doc.paragraphs]))"

Using run_shell Tool

run_shell command="python -c \"import docx; doc = docx.Document('path/to/file.docx'); print('\n'.join([p.text for p in doc.paragraphs]))\"" timeout=60

Extract Paragraphs with Indices

python -c "import docx; doc = docx.Document('file.docx'); [print(f'P{i}: {p.text}') for i, p in enumerate(doc.paragraphs) if p.text.strip()]"

Extract Tables

python -c "import docx; doc = docx.Document('file.docx'); [[print([[cell.text for cell in row.cells] for row in table.rows]) for table in doc.tables]]"

Extract Headings (by style)

python -c "import docx; doc = docx.Document('file.docx'); [print(p.text) for p in doc.paragraphs if p.style.name.startswith('Heading')]"

Prerequisites

Ensure python-docx is available:

python -c "import docx; print('docx available')"

If not installed:

pip install python-docx

Tips

  • Use absolute paths to avoid working directory issues
  • Set appropriate timeout (30-60 seconds for large documents)
  • Escape quotes properly when embedding in shell commands
  • For large documents, extract content in chunks or filter by paragraph index
  • This approach bypasses file type detection issues in read_file

Example Workflow

  1. Try read_file on the .docx file
  2. If it fails, verify python-docx availability
  3. Use run_shell with the python-docx extraction command
  4. Parse the stdout to get document content
  5. Proceed with your analysis using the extracted text
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 77 lines · 25 tokens per session scan A 238a7ac92c89

Subscribe to this mod's changes

docx-read-fallback is a skill published in the GitHub repository HKUDS/OpenSpace (8,146 stars, last pushed 18d ago), licensed MIT. It adds 25 tokens to every session and 581 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

docx-read-fallback compared with skills from other repositories

docx-read-fallback next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
docx-read-fallbackHKUDS/OpenSpaceSkill8.1k18d agoMITA25Claude Code, Codex
orbit-notionnexu-io/open-designSkill110ktodayApache-2.0A117Claude Code, Codex
instrument-data-to-allotropeanthropics/knowledge-work-pluginsSkill37k4d agoApache-2.0A123Claude Code
report-to-pdfasgeirtj/system_prompts_leaksSkill74kyesterdayCC0-1.0A17Claude Code, Codex
legal-holdanthropics/claude-for-legalSkill10k6d agoApache-2.0A68Claude Code
artifact-template-minimal-letterheadasgeirtj/system_prompts_leaksSkill74kyesterdayCC0-1.0A54Claude Code, Codex
feishuHmbown/CodeWhaleSkill41kyesterdayMITA33Claude Code, Codex