docx

Automate Word document creation, editing, and review workflows for .docx files.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/dr-code/beacon --skill docx-dr-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/dr-code/beacon/tree/main/plugins/all-skills/skills/docx
Command: npx skills add https://github.com/dr-code/beacon --skill docx-dr-code

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires defusedxml, lxml, and includes scripts (resource) components.

What problem does it solve?

Streamlines end-to-end Word document workflows by enabling automated creation, editing, redlining, and analysis of .docx files while preserving formatting.

Core Features & Use Cases

  • End-to-end document editing with tracked changes: Use w:del/w:ins wrappers to capture edits while preserving formatting and run-level styles.
  • Commenting and collaboration: Add inline comments anchored to specific ranges or paragraphs and support threaded replies.
  • Formatting preservation: Preserve fonts, paragraph styles, margins, and OOXML structure during creation and edits.
  • OOXML access and manipulation: Read and modify document.xml and related OOXML parts to implement precise redlines and content updates.

Quick Start

Provide a DOCX document and a set of edits, and the system will apply tracked changes, add comments, and preserve formatting.

Frequently Asked Questions about docx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate tracked changes in Word documents?

Automating tracked changes in Word documents involves injecting w:del and w:ins wrappers into the OOXML structure to capture edits while preserving run-level formatting and styles. This process ensures redlines are accurately recorded for review workflows.

Can I add inline comments to specific paragraphs in a .docx file programmatically?

Adding inline comments to .docx files programmatically anchors annotations to specific ranges or paragraphs within the WordprocessingML XML. This mechanism supports threaded replies, enabling automated commenting and collaboration directly within the document structure.

Does this approach preserve OOXML formatting during document edits?

Preserving OOXML formatting during document edits is achieved by reading and modifying document.xml while maintaining original fonts, paragraph styles, margins, and structural integrity. This ensures professional formatting remains intact across automated redlines and content updates.

How do I programmatically redline Word files using Python?

Redlining Word files programmatically with Python utilizes a DocxXMLEditor to manipulate WordprocessingML XML, injecting RSIDs, authors, and dates directly into the document. This approach applies precise redlines and content updates while preserving the original OOXML structure.

What are the limitations of using lxml for OOXML manipulation?

Using lxml for OOXML manipulation requires handling complex XML schemas directly, meaning developers must understand WordprocessingML structure to avoid corrupting document parts. This approach demands precise XML injection to maintain formatting and document validity during automated redlining.

Do I need defusedxml to manage Word document creation safely?

Managing Word document creation safely requires defusedxml to mitigate XML external entity attacks when parsing OOXML files. This dependency ensures secure processing of document.xml and related parts during automated creation, editing, and redlining workflows.