docx-processing-anthropic

Create and edit Word documents with tracked changes and OOXML validation.

630|79|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/lawvable/awesome-legal-skills --skill docx-processing-anthropic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx-processing-anthropic
Source: https://github.com/lawvable/awesome-legal-skills/tree/main/%F0%9F%9B%A0%EF%B8%8F/docx-processing-anthropic
Command: npx skills add https://github.com/lawvable/awesome-legal-skills --skill docx-processing-anthropic

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a self-contained toolkit for creating, editing, and analyzing Word documents (.docx) with tracked changes, comments, and formatting preservation, streamlining enterprise document workflows.

Core Features & Use Cases

  • Document creation: generate new Word documents from templates using code-driven workflows and RSID/author metadata.
  • Editing with tracking: modify content while preserving authorship, dates, and revision history, including redlining scenarios.
  • Redlining and comments: implement tracked changes and attach comments to specific ranges or paragraphs for collaboration and review.
  • Validation and tooling: validates OOXML structure against schemas and ensures relationships, content types, and formatting rules are respected.
  • Real-world scenario: legal teams prepare draft agreements with multiple tracked edits and comments, then publish a reviewed document.

Quick Start

Initialize the docx processing skill and run the workflow to create or modify a Word document with tracked changes.

Frequently Asked Questions about docx-processing-anthropic

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

FAQPage Schema
How do I automate Word document redlining and tracked changes programmatically?

You can automate Word document redlining by applying tracked changes programmatically using Python tooling and docx-js, enforcing RSID, author, and date metadata for auditable edits. This preserves revision history and formatting throughout the review workflow.

What is OOXML validation and why is it needed for .docx processing?

OOXML validation checks the internal XML structure of .docx files against schemas to ensure relationships, content types, and formatting rules are respected. This prevents file corruption when programmatically editing Word documents with tracked changes.

How do I add comments to specific paragraphs in a .docx file using Python?

You can attach comments to specific ranges or paragraphs in a .docx file by manipulating the OOXML structure directly with lxml. The skill enforces author and date metadata, enabling enterprise collaboration and document review workflows.

Can I generate new Word documents from templates with tracked changes enabled?

Yes, you can generate new Word documents from templates using code-driven workflows. The process automatically applies RSID and author metadata, enabling tracked changes and redlining from the moment of document creation.

Does this approach to docx editing preserve authorship metadata for legal compliance?

Yes, modifying content with this OOXML approach preserves authorship, dates, and revision history metadata. It enforces RSID tracking and validates document structure, making it suitable for legal and enterprise workflows requiring auditable edits.

What are the limitations of using lxml for OOXML document processing?

Using lxml for OOXML processing requires strict adherence to Word document schemas and content type relationships. Complex formatting or malformed XML can cause validation failures, so defusedxml is used to mitigate XML attack vectors during parsing.