docx

Create and edit Word documents with tracked changes via Python OOXML.

15|2|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/rubensliv/k-dense-ai --skill docx-rubensliv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/rubensliv/k-dense-ai/tree/main/scientific-skills/document-skills/docx
Command: npx skills add https://github.com/rubensliv/k-dense-ai --skill docx-rubensliv

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Enables programmatic creation, editing, and analysis of Word documents (.docx) with tracked changes and comments, ensuring formatting preservation and streamlined collaboration for researchers, editors, and admins.

Core Features & Use Cases

  • DOCX creation, editing, and analysis with robust tracked changes support and inline comments
  • Redlining workflows for professional document review and audit trails
  • XML-level manipulation of Word content via a Python API that operates on word/document.xml and related parts

Quick Start

Create a new Word document with initial content and enable tracked changes for a collaborative review.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I programmatically add tracked changes to a Word document?

Adding tracked changes to a Word document programmatically requires modifying the underlying OOXML structure. This Skill injects RSIDs, authors, and timestamps into word/document.xml to enable compliant redlining and collaborative review across multiple authors.

How do I insert inline comments into a .docx file using Python?

Inserting inline comments into a .docx file using Python involves manipulating the document's XML parts. This Skill injects comment ranges and author metadata directly into the OOXML files to support professional document workflows and auditing.

Does this tool require external libraries to process OOXML files?

Yes, processing OOXML files requires the defusedxml Python library. This dependency is used to safely parse and manipulate the XML structures within Word documents during creation, editing, and analysis.

Can I automate document redlining workflows for multiple authors?

Automating document redlining workflows for multiple authors is supported by injecting RSIDs and author timestamps into the OOXML structure. This enables reproducible formatting preservation and compliant tracking for professional document review.

What is the best way to preserve formatting when editing Word documents programmatically?

The best way to preserve formatting when editing Word documents programmatically is through XML-level manipulation of the OOXML structure. This Skill operates directly on word/document.xml to ensure reproducible formatting preservation during automated edits.

Are there limitations when manipulating word/document.xml for tracked changes?

Manipulating word/document.xml for tracked changes requires strict OOXML compliance to avoid corruption. This Python-based toolkit handles XML injection precisely, but complex formatting interactions may require validation within professional document workflows.