docx

Create and edit Word DOCX documents with tracked changes and comments.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/chancoute/sgin --skill docx-chancoute
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/chancoute/sgin/tree/main/skills/docx
Command: npx skills add https://github.com/chancoute/sgin --skill docx-chancoute

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the creation, editing, and analysis of Word documents (.docx) with built-in support for tracked changes, comments, and formatting preservation, reducing manual editing time and ensuring auditability.

Core Features & Use Cases

  • Create new Word documents programmatically and apply formatting and content blocks.
  • Edit existing documents with deterministic changes while preserving styling and tracked revisions.
  • Review and manage comments and redlines across multi-user collaboration workflows.

Quick Start

Use the docx skill to automate a sample workflow: create a new Word document and apply a tracked change that inserts a sentence and a comment.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I automate Word document editing with tracked changes?

Automating Word document editing with tracked changes is handled by programmatically modifying DOCX files using Python XML processing libraries. The Skill targets professional document workflows, allowing deterministic edits while preserving styling and generating audit-ready revisions.

Can I add comments to a DOCX file programmatically without breaking the formatting?

Adding comments to a DOCX file programmatically without breaking formatting is achieved through robust OOXML handling. The solution uses defusedxml and lxml to validate XML modifications, ensuring document styling and structural integrity are preserved during automation.

What is the best way to redline a Word document in an automated workflow?

The best way to redline a Word document in an automated workflow is using a solution that targets multi-user collaboration and revision tracking. This Skill applies tracked insertions and deletions directly to the OOXML structure, ensuring consistent redlining output.

Do I need Python XML libraries to create Word documents with tracked revisions?

Python XML libraries are required to create Word documents with tracked revisions because the process involves heavy OOXML manipulation. The Skill specifically relies on defusedxml for secure parsing and lxml for robust XML processing and validation.

How does OOXML processing handle multi-user comments in DOCX files?

OOXML processing handles multi-user comments in DOCX files by directly manipulating the underlying XML structure to insert and manage review annotations. This approach enables automated analysis and management of comments across complex collaboration workflows.

Why does modifying a DOCX file directly sometimes corrupt the document?

Modifying a DOCX file directly can corrupt the document because Word files are complex OOXML zip archives requiring strict schema validation. This Skill mitigates corruption risks by using lxml for structured XML processing and defusedxml for secure parsing.