docx

Creates and edits .docx files with tracked changes and comments via OOXML structures.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/jpolog/nix-os --skill docx-jpolog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/jpolog/nix-os/tree/main/pi-agent-data/agent/skills/docx
Command: npx skills add https://github.com/jpolog/nix-os --skill docx-jpolog

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables end-to-end creation, editing, and analysis of professional Word documents (.docx) with support for tracked changes, comments, formatting preservation, and reliable text extraction.

Core Features & Use Cases

  • Create new Word documents from templates or programmatically with structured sections and formatting.
  • Edit existing documents, apply tracked changes, and add/read comments while preserving formatting and OOXML structure.
  • Use cases include legal, business, and academic tasks that require auditable redlines, collaboration notes, and accurate text extraction.

Quick Start

Create a new Word document with a title and summary, applying basic formatting and enabling tracked changes.

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

Automating Word document editing with tracked changes and comments is achieved through deterministic OOXML manipulation using Python-based workflows, directly modifying document.xml and relationship structures to preserve formatting integrity while applying auditable redlines.

What is the best way to programmatically extract text from a .docx file while preserving its OOXML structure?

Programmatically extracting text from a .docx file while preserving OOXML structure requires parsing the underlying XML directly via Python libraries like lxml and defusedxml to ensure reliable text extraction without corrupting formatting relationships.

Can I use Python to add comments to existing Word documents for legal and academic collaboration?

Yes, you can use Python to add comments to existing Word documents for legal and academic collaboration by managing the OOXML comments structure, enabling auditable collaboration notes within the .docx format.

Does Python-based OOXML document manipulation support creating Word documents from custom templates?

Python-based OOXML document manipulation supports creating new Word documents from custom templates or programmatically generating structured sections with applied formatting, ensuring reliable document generation for business tasks.

What are the limitations of using lxml and defusedxml for direct OOXML document manipulation?

Using lxml and defusedxml for OOXML document manipulation requires precise handling of document.xml relationships and XML structures, as incorrect modifications can corrupt formatting or break tracked changes, demanding careful preservation of the original .docx structure.