Docx

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

186|24|Updated Jan 1, 2026
One-click install
npx skills add https://github.com/Steffen025/pai-opencode --skill docx-steffen025
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Docx
Source: https://github.com/Steffen025/pai-opencode/tree/main/.opencode/skills/Documents/Docx
Command: npx skills add https://github.com/Steffen025/pai-opencode --skill docx-steffen025

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires defusedxml.

What problem does it solve?

This skill enables programmatic creation, editing, and analysis of Word documents (.docx) using OOXML tooling. It helps automate document workflows, maintain track changes, and apply structured edits without manual editing.

Core Features & Use Cases

  • OOXML-based editing: Unpack, modify, and repack Word documents while preserving formatting and tracked changes.
  • Redlining & comments: Create and reply to comments, track insertions and deletions with RSIDs, dates, and author metadata.
  • Verification & tooling: Validate against OOXML patterns and schemas, inspect raw document XML, and repack into a valid DOCX.
  • Quick-start integration: Use provided scripts to accelerate document automation in pipelines.

Quick Start

Use the ooxml-based utilities to unpack a DOCX file, edit with the Document API, and re-pack back into a DOCX.

Frequently Asked Questions about Docx

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

FAQPage Schema
How do I programmatically edit a Word document while preserving tracked changes and comments?

You can programmatically edit a Word document by unpacking the DOCX file, modifying the raw OOXML structure, and repacking it into a valid file. This skill uses a Document API to manage redlining, RSIDs, and author metadata.

What is OOXML and how does it handle redlining in DOCX files?

OOXML is the XML-based schema used by Word documents. It handles redlining by structuring tracked changes as XML elements with RSIDs, dates, and author metadata, enabling programmatic insertion and deletion tracking without manual editing.

Can I use Python to unpack and repack DOCX files for document automation?

Yes, you can use Python to unpack and repack DOCX files. This skill provides Python-based utilities, including the defusedxml library, to inspect raw document XML, apply structured edits, and validate against OOXML schemas.

Does this approach require installing dependencies to process Word documents?

Yes, processing Word documents requires installing the defusedxml Python dependency. This library safely parses and manipulates the raw OOXML content extracted from DOCX files during document automation workflows.

What is the best way to validate OOXML when modifying Word documents?

The best way to validate OOXML when modifying Word documents is to use validation tooling that checks the edited XML against standard OOXML patterns and schemas before repacking, ensuring document integrity and a valid DOCX output.