docx

Create, edit, comment, and redline .docx files at the OOXML level.

1|Updated Aug 3, 2025
One-click install
npx skills add https://github.com/eesha000009-dev/Exam-Prep100 --skill docx-eesha000009-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/eesha000009-dev/Exam-Prep100/tree/main/skills/docx
Command: npx skills add https://github.com/eesha000009-dev/Exam-Prep100 --skill docx-eesha000009-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Provide reliable, production-grade workflows for creating, analyzing, and editing .docx documents while preserving formatting, supporting tracked changes (redlining), and adding reviewer comments so that professional documents can be generated and reviewed programmatically.

Core Features & Use Cases

  • Document creation: Generate studio-quality Word files using docx-js (bun) with mandatory formatting rules (1.3x line spacing, centered charts, headers/footers, TOC behavior).
  • Editing & redlining: Precise tracked-change workflows using an OOXML Document library that supports minimal, targeted edits, RSID-managed revisions, batching, and validation.
  • Comments & review: Simple, recommended python-docx workflow for adding comments with author set to Z.ai, plus advanced OOXML methods for low-level control.
  • Utilities & validation: Tools to unpack/pack Office files, add TOC placeholders, validate relationships and schemas, and safely insert images and media.
  • Use case: Apply redline edits and reviewer comments to a legal contract, produce a TOC with placeholders for first-open display, and pack a validated .docx ready for distribution.

Quick Start

Add comments to document.docx for every paragraph that contains the phrase "needs review", set the comment author to Z.ai, and save the result as reviewed.docx.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I add tracked changes and redlining to a .docx file programmatically?

Tracked changes and redlining in a .docx file are applied through precise OOXML-level edits using RSID-managed revisions. This approach supports minimal, targeted edits, batching, and local validation to ensure professional document review workflows.

Can I insert reviewer comments into a Word document using python-docx?

Yes, you can insert reviewer comments into a Word document using a recommended python-docx workflow. It allows you to add comments to specific paragraphs and set the comment author, plus offers advanced OOXML methods for low-level control.

What is the best way to generate studio-quality Word files with formatting like TOC placeholders and line spacing?

Studio-quality Word files are best generated using docx-js (bun). This method enforces mandatory formatting rules including 1.3x line spacing, centered charts, headers/footers, and proper TOC behavior for professional document creation.

Does this OOXML document editing approach support unpacking and packing Office files for validation?

Yes, the OOXML document editing approach includes utilities to unpack and pack Office files. It validates relationships and schemas, safely inserts images and media, and uses soffice/pack utilities for local validation before distribution.

How do I perform validated redline edits on legal contracts without breaking formatting?

Validated redline edits on legal contracts are performed using an OOXML Document library. It ensures formatting is preserved by supporting minimal, targeted edits, RSID-managed revisions, and batching, followed by local validation using soffice/pack utilities.

What are the limitations of using python-docx for adding comments versus low-level OOXML methods?

The python-docx workflow for adding comments is simple and recommended for standard review tasks, but it has limitations compared to advanced OOXML methods. The OOXML approach provides low-level control necessary for complex, validated redline edits and schema validation.