docx

Create, edit, and analyze DOCX files with tracked changes and comments.

3|Updated Dec 28, 2025
One-click install
npx skills add https://github.com/hongbietcode/synthetic-claude --skill docx-hongbietcode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/hongbietcode/synthetic-claude/tree/main/plugins/document-suite/skills/docx
Command: npx skills add https://github.com/hongbietcode/synthetic-claude --skill docx-hongbietcode

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the end-to-end process of working with Word documents (.docx): creation, editing, redlining, and analysis, reducing manual overhead and errors in professional document workflows.

Core Features & Use Cases

  • Document creation and editing: Generate new .docx files, apply edits, and preserve formatting during transformations.
  • Tracked changes and comments: Automate redlining workflows with insertions, deletions, and inline comments for review cycles.
  • Text extraction and analysis: Extract and analyze content from Word documents for reporting or archival tasks.
  • Use Case: Suppose you have a contract draft and multiple reviewers. Use this Skill to produce a final redlined version, collect comments, and export the tracked changes for legal review.

Quick Start

Use the docx skill to create a new Word document from a template and apply a redline to a sample paragraph.

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 and comments in Word documents?

Automating tracked changes and comments in Word documents involves using Python to programmatically insert revisions and inline notes. This approach manipulates OOXML directly to generate redlines, enabling automated review cycles for contracts and reports without manual editing.

Can I extract text from a docx file while preserving formatting?

Yes, you can extract text from a docx file while preserving formatting by parsing the underlying OOXML structure. Using lxml-based validation, the process accurately retrieves content and structural styling for reporting or archival tasks without losing document fidelity.

What is the best way to generate Word documents from templates programmatically?

The best way to generate Word documents from templates programmatically is by using a dedicated Document class to apply edits and transformations. This method ensures formatting preservation while creating new docx files for proposals or reports through automated OOXML manipulation.

Does Python lxml validation work with OOXML for Word file processing?

Yes, Python lxml validation works with OOXML for Word file processing. It provides secure XML parsing using defusedxml to safely validate and manipulate document structures, ensuring reliable automation of docx creation and editing workflows without corruption.

How do I automate redlining workflows for legal contract review?

Automating redlining workflows for legal contract review requires applying programmatic insertions, deletions, and comments to the document. This approach targets professional Word workflows to produce final redlined versions and export tracked changes for legal teams efficiently.

What are the limitations of manipulating OOXML directly for Word document automation?

Manipulating OOXML directly for Word document automation requires strict XML schema compliance to avoid file corruption. You must rely on lxml-based validation and secure parsing libraries like defusedxml to handle complex formatting and prevent structural errors during tracked changes.