docx

Create, edit, and analyze DOCX documents with tracked changes and OOXML.

72|47|Updated Sep 15, 2025
One-click install
npx skills add https://github.com/rysweet/MicrosoftHackathon2025-AgenticCoding --skill docx-rysweet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/rysweet/MicrosoftHackathon2025-AgenticCoding/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/rysweet/MicrosoftHackathon2025-AgenticCoding --skill docx-rysweet

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solves? This Skill automates complex Microsoft Word document editing, including legal redlining, collaborative feedback, and content generation. It eliminates the tedious manual process of applying tracked changes, managing comments, and ensuring document consistency, saving significant time in document-heavy workflows.

Core Features & Use Cases

  • Tracked Changes & Redlining: Programmatically add insertions, deletions, and formatting changes with full change tracking, ideal for legal or editorial reviews.
  • Comment Management: Add, reply to, resolve, and extract comments from documents, streamlining collaborative feedback loops.
  • Content Generation & Editing: Create new Word documents from scratch, modify existing content, and apply complex formatting using OOXML manipulation.
  • Use Case: Review a legal contract, automatically highlight all changes made by a counterparty, and add comments requesting clarification on specific clauses, all without manual intervention.

Quick Start

In the attached document 'contract_draft.docx', find the paragraph starting with "Section 3.1" and add a comment that says "Please verify this date with the legal team."

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 and redlines to a Word document?

Tracked changes enable you to insert, delete, or format content while preserving a complete audit trail. This Skill applies tracked changes programmatically to DOCX files, marking each modification with change metadata so reviewers see exactly what was altered and by whom, ideal for legal redlining and editorial workflows.

Can I automate comment management in Word documents?

Yes. This Skill adds, replies to, resolves, and extracts comments from DOCX files programmatically. You can streamline collaborative feedback loops by automatically inserting comments at specific locations, extracting all existing feedback, and managing reply chains without manual intervention.

What's the best way to safely manipulate OOXML in Word documents?

Safe OOXML manipulation requires defense against malicious XML payloads. This Skill uses defusedxml to parse and modify raw Office Open XML structures securely, enabling complex formatting, metadata access, and structure extraction while protecting against XXE attacks and billion-laughs vulnerabilities.

How do I create and edit Word documents programmatically with complex formatting?

This Skill automates DOCX creation and editing using python-docx, supporting content generation from scratch, modification of existing documents, and application of complex formatting through direct OOXML access. You can build entire documents programmatically with tracked changes, comments, and custom metadata.

Can I validate edited Word documents after programmatic changes?

Yes. This Skill validates modified DOCX files using LibreOffice or soffice to ensure edited documents remain compliant with Office standards. Validation confirms that programmatic changes—tracked edits, comments, formatting—render correctly and preserve document integrity across different Office applications.

Do I need additional tools to handle batch document processing with tracked changes?

This Skill supports batch processing workflows for handling multiple DOCX files simultaneously. While python-docx and defusedxml form the core processing layer, optional integration with docx-js and RSID preservation tools enables advanced batch scenarios, dependency-aware processing, and cross-platform document compatibility.