docx

Unpack, edit, and repack Word DOCX files with validated OOXML structure.

19|4|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/ZanebonoAlter/Syntopica --skill docx-zanebonoalter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/ZanebonoAlter/Syntopica/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/ZanebonoAlter/Syntopica --skill docx-zanebonoalter

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill automates complex DOCX workflows by enabling programmatic reading, editing, and repacking of Word documents, ensuring consistent formatting and tracked-change handling across edits.

Core Features & Use Cases

  • Unpack, modify, and repack Word documents (.docx) by manipulating underlying OOXML XML content.
  • Validate document structure and content types, enforce namespace and ID constraints, and manage tracked changes for collaborative editing.
  • Handle images, tables, headings, and formatting programmatically, making it suitable for template-driven document generation and automated report production.

Quick Start

Unpack a Word document, apply edits such as text replacements or formatting changes, and repack into a new DOCX.

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 creation and editing from templates?

Automating Word document creation involves unpacking DOCX files to manipulate OOXML XML content, applying edits like text replacements or formatting, and repacking into a new validated document.

What is the best way to programmatically handle tracked changes in a DOCX file?

Handling tracked changes programmatically requires unpacking the DOCX file and modifying its OOXML structure to manage collaborative editing constraints while maintaining relationship integrity.

How does OOXML manipulation work for formatting images and tables in Word?

OOXML manipulation works by directly editing the XML content defining images and tables within the unpacked DOCX structure, using validators to ensure XML validity and content type integrity during repacking.

Do I need lxml and defusedxml to validate OOXML structure when editing DOCX files?

You need lxml and defusedxml to validate OOXML structure, as they enforce namespace and ID constraints while ensuring XML validity and relationship integrity during the repacking process.

Why does my DOCX file break after modifying the underlying XML content?

Your DOCX file breaks after modifying XML content likely due to invalid OOXML structure or compromised relationship integrity. Using lxml-based validators during packing ensures the document remains structurally sound and openable.