Edit Word (.docx) documents without breaking any formatting
npx claudepluginhub fengerwoo/docx-editorEdit Word (.docx) documents without breaking any formatting. Run-level text replacement, table cell filling, and batch field mapping.
Edit Word (.docx) documents without breaking any formatting.
Add the marketplace registry in Claude Code:
/plugin marketplace add fengerwoo/docx-editor
Then install the plugin:
/plugin install docx-editor
Restart Claude Code to load the skills (verify with /skills).
git clone https://github.com/fengerwoo/docx-editor.git
cc --plugin-dir ./docx-editor
pip install python-docx
/docx path/to/file.docx fill the form with data from source.docx
/docx contract.docx replace all {{name}} with Alice
The skill also auto-triggers when you say things like "edit a Word document", "fill a docx form", "replace text in Word", etc.
Using python-docx the usual way (paragraph.text = ...) silently destroys run-level formatting — bold, font size, color, and other styles are lost. This plugin operates at the XML run level, preserving all styling even when text spans multiple runs.
# View document info
python3 docx_utils.py info file.docx
# View table structure (cell coordinates + merged cells)
python3 docx_utils.py structure file.docx [table_index]
# Replace text (format-preserving)
python3 docx_utils.py replace in.docx out.docx "old text" "new text"
# Batch replace multiple fields
python3 docx_utils.py batch_replace in.docx out.docx '{"{{name}}":"Alice","{{date}}":"2026-01-01"}'
# Fill a single table cell
python3 docx_utils.py fill_cell in.docx out.docx <table_idx> <row> <col> "value"
# Batch fill table cells
python3 docx_utils.py batch_fill in.docx out.docx '[{"row":3,"col":4,"text":"value"}]' [table_idx]
# Read a table cell
python3 docx_utils.py read_cell file.docx <table_idx> <row> <col>
MIT