docx

Create, edit, and analyze Word documents using OOXML tooling.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/mattismyname3011/school-council-election --skill docx-mattismyname3011
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/mattismyname3011/school-council-election/tree/main/skills/document-skills/docx
Command: npx skills add https://github.com/mattismyname3011/school-council-election --skill docx-mattismyname3011

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables streamlined creation, modification, and review of Word documents (.docx), reducing manual formatting and repetitive edits.

Core Features & Use Cases

  • Create and format new Word documents with consistent styles and headings.
  • Apply tracked changes and manage comments to support collaborative editing.
  • Preserve formatting and extract text for auditing, archiving, or data processing.
  • Use case: generate a project brief, apply designer-approved edits, and capture reviewer notes in a single document.

Quick Start

Create a new Word document named "Project Brief" with a title and introductory paragraph, then run the skill to apply tracked changes and add a comment about the draft.

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 and apply tracked changes programmatically?

To automate Word document editing and apply tracked changes, you can use Python-based OOXML tooling to manipulate WordprocessingML directly. This enables programmatic modification of .docx files, allowing you to apply redlining, insert comments, and preserve formatting across edits without manual intervention.

Can I create new .docx files and preserve formatting using Python?

Yes, you can create new .docx files and preserve formatting using Python libraries like lxml and defusedxml to manipulate OOXML. This approach ensures consistent styles, headings, and document structure are maintained while generating reports or project briefs programmatically.

What's the best way to extract text from Word documents for data processing?

The best way to extract text from Word documents for data processing is by parsing the underlying WordprocessingML structure with OOXML tooling. This method captures document content while preserving formatting metadata, making it suitable for auditing, archiving, or downstream data processing workflows.

Does defusedxml work with lxml for manipulating OOXML in .docx files?

Yes, defusedxml works with lxml for manipulating OOXML in .docx files. The skill relies on both libraries to efficiently parse and modify WordprocessingML, with defusedxml providing secure XML parsing and lxml handling the document tree manipulation needed for tracked changes and formatting preservation.

How do I add comments to a Word document for collaborative editing?

To add comments to a Word document for collaborative editing, you programmatically insert comment elements into the WordprocessingML structure using OOXML tooling. This allows you to capture reviewer notes and manage collaborative feedback directly within the .docx file alongside tracked changes.

Why does my formatting break when I edit Word documents programmatically?

Formatting breaks when editing Word documents programmatically if the OOXML structure is not properly preserved during manipulation. Using Python-based libraries like lxml to carefully manage WordprocessingML ensures that styles, headings, and formatting are maintained across all document edits.