docx

Create and manipulate Word .docx documents using Python and docx-js.

1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/yige666s/claude-codex --skill docx-yige666s
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/yige666s/claude-codex/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/yige666s/claude-codex --skill docx-yige666s

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill eliminates the tedious manual work of creating, formatting, and editing Word documents by automating the entire DOCX generation and manipulation pipeline. Instead of wrestling with complex XML or desktop software, users can request professional documents in plain language and receive polished, ready-to-use files.

Core Features & Use Cases

  • Document Generation: Create new .docx files from plain text with proper formatting, headings, tables, and page layouts.
  • Content Extraction & Editing: Unpack existing documents, edit XML directly, and repack them while preserving tracked changes, comments, and formatting.
  • Professional Formatting: Add tables of contents, headers, footers, page numbers, images, and apply consistent styles across multi-page reports.
  • Use Case: Imagine you need to turn a meeting transcript into a formatted Word report with a table of contents, headers, and page numbers. This Skill handles the entire conversion and styling automatically.

Quick Start

Use the docx skill to turn the attached meeting notes into a professionally formatted Word document with a title, headings, and page numbers.

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 generation from plain text?

Automating Word document generation from plain text is handled by using Python and docx-js to create .docx files with proper formatting, headings, tables, and page layouts, eliminating manual desktop software effort.

Can I edit existing DOCX files and preserve tracked changes and comments?

Editing existing DOCX files while preserving tracked changes and comments is supported by unpacking the document, directly editing the XML, and repacking it to maintain original formatting and review annotations.

Do I need pandoc and LibreOffice to convert DOCX files to PDF?

Converting DOCX files to PDF requires LibreOffice, while extracting text content requires pandoc. These external tools are necessary dependencies for the document processing pipeline to function correctly.

What is the best way to ensure generated Word documents are compatible with Microsoft Word and Google Docs?

Ensuring generated Word documents are compatible with Microsoft Word and Google Docs is achieved by validating the output against OOXML schemas, which guarantees the generated files meet standard formatting specifications.

How do I add tables of contents, headers, and page numbers to a report automatically?

Adding tables of contents, headers, footers, and page numbers to a report automatically is accomplished by applying consistent styles across multi-page reports through the docx generation pipeline using Python and docx-js.

Does this approach support batch processing of office files for content migration?

Batch processing of office files is supported for administrative workflows involving content migration from legacy formats, allowing multiple documents to be unpacked, manipulated, and repacked programmatically.