
Docx Reader
- 299 installs
- Updated January 23, 2026
- childbamboo/claude-code-marketplace-sample
docx-reader is an Office & Documents skill that helps coding agents read and extract text from Microsoft Word .docx files for use in AI and agent-building document workflows.
About
Reads .docx files and extracts their text content, converting to Markdown on request via a python-docx script. Used when a developer needs to read or convert Word documents.
- Extracts .docx text via python-docx
- WSL path conversion and Markdown export
Docx Reader by the numbers
- 299 all-time installs (skills.sh)
- Ranked #186 of 688 Office & Documents skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/childbamboo/claude-code-marketplace-sample --skill docx-readerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 299 |
|---|---|
| Last updated | January 23, 2026 |
| Repository | childbamboo/claude-code-marketplace-sample ↗ |
How do coding agents read Word docx files?
Extract text from Microsoft Word (.docx) files and optionally save it as Markdown, using a python-docx script in WSL.
Who is it for?
Developers running Claude Code agents that must ingest stakeholder specs, briefs, or requirements delivered as .docx attachments.
Skip if: Teams whose documentation pipeline is already entirely Markdown, PDF, or API-based with no Word document inputs.
When should I use this skill?
A .docx file path is provided and the agent needs document text extracted before coding, summarizing, or analysis.
What you get
Extracted .docx text content, parsed document sections, and agent-ready plain-text context from Word files.
- extracted document text
- parsed section content
Files
DOCX Reader
Microsoft Word (.docx) ファイルをテキスト形式で読み込むスキルです。
クイックスタート
基本的な使い方
# WSL環境でPythonスクリプトを実行
wsl python3 scripts/read_docx.py "/mnt/c/path/to/file.docx"Markdown形式で保存
1. スクリプトでテキスト抽出 2. Write ツールで .md ファイルに保存
前提条件
python-docx パッケージが必要です:
wsl pip3 install python-docx使用例
例1: .docx ファイルを読み込んで内容を表示
User: "C:\Users\keita\repos\file.docx を読み込んで"
Assistant:
1. Windowsパスを WSL パスに変換: /mnt/c/Users/keita/repos/file.docx
2. wsl python3 scripts/read_docx.py を実行
3. 抽出されたテキストを表示例2: .docx を Markdown に変換して保存
User: "申請書.docx を Markdown に変換して保存"
Assistant:
1. scripts/read_docx.py でテキスト抽出
2. Markdown形式で整形
3. Write ツールで 申請書.md に保存
4. 保存完了を報告ワークフロー
単一ファイルの読み込み
1. ユーザーが .docx ファイルパスを指定 2. Windows パスを WSL パス形式に変換 (C:\ → /mnt/c/) 3. wsl python3 scripts/read_docx.py を実行 4. 抽出されたテキストを表示または保存
複数ファイルの一括処理
1. Glob で .docx ファイルを検索 2. 各ファイルに対してスクリプトを実行 3. 結果をまとめて報告
スクリプト詳細
Python スクリプトは scripts/read_docx.py に配置されています。
主な機能:
- 段落テキストの抽出
- テーブルデータの抽出
- エラーハンドリング
使い方:
python scripts/read_docx.py <file_path>制限事項
- 画像は抽出されません
- 複雑なレイアウトは簡略化されます
- フォント情報、色などのスタイルは失われます
- 埋め込みオブジェクトは抽出されません
トラブルシューティング
python-docx がインストールされていない
wsl pip3 install python-docx"No module named 'docx'" エラー
wsl pip3 uninstall docx
wsl pip3 install python-docxファイルが開けない
- ファイルパスが正しいか確認(Windows → WSL パス変換)
- ファイルが他のプログラムで開かれていないか確認
- ファイルのアクセス権限を確認
パス変換
Windows パスから WSL パスへの変換:
C:\Users\...→/mnt/c/Users/...D:\Projects\...→/mnt/d/Projects/...- バックスラッシュ
\をスラッシュ/に変換
関連ツール
- pandoc: より高度な変換が必要な場合
- python-docx2txt: 軽量な代替ライブラリ
- mammoth: HTML形式での変換
バージョン履歴
- v1.0.0 (2026-01-06): 初期リリース
- 基本的なテキスト抽出機能
- テーブル抽出対応
- WSL環境での動作
DOCX Reader Skill
Microsoft Word (.docx) ファイルをテキスト形式で読み込むためのスキルです。
ファイル構成
docx-reader/
├── SKILL.md # メインスキル定義(Claude が読む)
├── README.md # このファイル(人間向けドキュメント)
└── scripts/
└── read_docx.py # テキスト抽出用 Python スクリプトインストール
前提条件
- WSL (Windows Subsystem for Linux)
- Python 3.x
- python-docx パッケージ
セットアップ
# python-docx のインストール
wsl pip3 install python-docx使い方
Claude に以下のように依頼します:
「C:\Users\keita\repos\file.docx を読み込んで」Claude が自動的に: 1. Windows パスを WSL パスに変換 2. スクリプトを実行してテキスト抽出 3. 結果を表示または Markdown ファイルとして保存
スクリプトの直接実行
# 基本的な使い方
wsl python3 scripts/read_docx.py "/mnt/c/path/to/file.docx"
# 出力をファイルに保存
wsl python3 scripts/read_docx.py "/mnt/c/path/to/file.docx" > output.txt機能
- ✅ 段落テキストの抽出
- ✅ テーブルデータの抽出
- ✅ エラーハンドリング
- ❌ 画像の抽出(未対応)
- ❌ スタイル情報の保持(未対応)
トラブルシューティング
python-docx が見つからない
wsl pip3 install python-docx"No module named 'docx'" エラー
間違ったパッケージがインストールされている可能性があります:
wsl pip3 uninstall docx
wsl pip3 install python-docx開発
スクリプトの修正
scripts/read_docx.py を編集して機能を追加・修正できます。
テスト
# テスト用の .docx ファイルで動作確認
wsl python3 scripts/read_docx.py "/mnt/c/path/to/test.docx"ライセンス
このスキルは個人プロジェクト用です。
バージョン
- v1.0.0 (2026-01-06)
- 初期リリース
- 基本的なテキスト抽出機能
- WSL環境での動作確認済み
#!/usr/bin/env python3
"""
DOCX Reader Script
Extracts text content from Microsoft Word (.docx) files.
"""
from docx import Document
import sys
import os
def read_docx(file_path):
"""
Read .docx file and extract text content.
Args:
file_path (str): Path to the .docx file
Returns:
str: Extracted text content
"""
try:
doc = Document(file_path)
# Extract all paragraphs
text_content = []
for para in doc.paragraphs:
if para.text.strip(): # Skip empty paragraphs
text_content.append(para.text)
# Extract tables if any
for table in doc.tables:
table_content = []
for row in table.rows:
row_text = ' | '.join(cell.text.strip() for cell in row.cells)
if row_text.strip():
table_content.append(row_text)
if table_content:
text_content.append('\n'.join(table_content))
return '\n\n'.join(text_content)
except FileNotFoundError:
return f"Error: File not found: {file_path}"
except Exception as e:
return f"Error reading file: {str(e)}"
def main():
"""Main entry point for the script."""
if len(sys.argv) < 2:
print("Usage: python read_docx.py <file_path>")
sys.exit(1)
file_path = sys.argv[1]
if not os.path.exists(file_path):
print(f"Error: File not found: {file_path}")
sys.exit(1)
if not file_path.lower().endswith('.docx'):
print("Warning: File does not have .docx extension")
content = read_docx(file_path)
print(content)
if __name__ == "__main__":
main()
Related skills
FAQ
What file type does docx-reader handle?
docx-reader handles Microsoft Word .docx files, extracting readable text so coding agents in the Claude Code marketplace sample can use document content during AI and agent-building tasks.
When should developers invoke docx-reader?
Developers should invoke docx-reader when a stakeholder spec, brief, or requirements document arrives as a .docx file and the agent needs extracted text before continuing coding or analysis.