docx

Create, edit, and validate .docx files with XML-level precision.

3|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/Zhangyinglun/resume-tailor-skill --skill docx-zhangyinglun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/Zhangyinglun/resume-tailor-skill/tree/main/vendor/skills/docx
Command: npx skills add https://github.com/Zhangyinglun/resume-tailor-skill --skill docx-zhangyinglun

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Many automation and authoring workflows need reliable programmatic control over Microsoft Word documents but run into fragile OOXML, broken relationships, and inconsistent tracked-change handling; this skill provides robust tools to read, generate, edit, and repair .docx files so documents render correctly across platforms.

Core Features & Use Cases

  • Read & analyze: Extract text, handle tracked changes, and inspect raw XML by unpacking .docx files for deterministic edits.
  • Create & generate: Produce new .docx programmatically (docx-js guidance) with correct page sizes, styles, lists, tables, images, headers/footers, and TOC support.
  • Edit & repair: Unpack → edit XML → repack workflow with helpers to merge runs, simplify redlines, add comments, accept tracked changes, and repair paraId/durableId and content-type issues.
  • Validate & pack: Schema validation against OOXML, relationship and content-type checks, auto-repair of common issues, and safe packing into valid .docx/.pptx/.xlsx files.
  • Use Case: Automate converting legacy .doc files, programmatically inserting images and tables, or preparing author-reviewed documents with tracked-change audits before PDF conversion.

Quick Start

Use the docx skill to unpack a Word file, apply edits or comments at the XML level, validate the document, and pack it back into a compliant .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 and accept tracked changes?

To edit a Word document and accept tracked changes, you unpack the .docx file, manipulate the raw XML to merge runs and simplify redlines, then repack it into a compliant file.

What is the best way to validate OOXML schema and repair broken relationships in a docx file?

Validating OOXML schema involves checking the document XML against standards using lxml, auto-repairing common content-type issues, and safely packing the validated structure back into a .docx file.

Can I use lxml to unpack and edit Word documents at the XML level?

Yes, you can use lxml for XML-level validation and editing of Word documents by unpacking the .docx archive, directly modifying the underlying XML parts, and repacking the file.

How do I generate a new .docx file with custom headers, footers, and tables?

Generating a new .docx file with custom headers, footers, and tables uses docx-js guidance to programmatically produce documents with correct page sizes, styles, lists, and TOC support.

Why does my automated docx workflow produce files with broken paraId or durableId errors?

Broken paraId or durableId errors in automated docx workflows occur from inconsistent XML generation; repairing these identifiers and content-type issues ensures documents render correctly across platforms.

Does docx automation support converting legacy .doc files and extracting text via pandoc?

Docx automation supports converting legacy .doc files and extracting text via pandoc by unpacking the Word document structure and processing it through automated document workflows.