docx

Create, edit, and convert DOCX files via JavaScript and Python scripts.

28|2|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/labs21-dev/agents-stack --skill docx-labs21-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/labs21-dev/agents-stack/tree/main/skills-optional/using-documents/docx
Command: npx skills add https://github.com/labs21-dev/agents-stack --skill docx-labs21-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word document automation and manipulation—creating, editing, converting, and extracting content from DOCX files—by exposing a structured workflow and supporting scripts/templates.

Core Features & Use Cases

  • End-to-end document generation, formatting, and validation workflows using JavaScript and Python tooling.
  • Unpacking, editing XML, and repacking DOCX files to apply tracked changes, fix structure, and convert to PDF or other formats.
  • Guidance for typography, layout, and accessibility to maintain WCAG-compliant document outputs.

Quick Start

Create a new document from scratch using the docx npm module.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I programmatically create and edit Word documents?

You can programmatically create and edit Word documents by manipulating DOCX XML via JavaScript and Python scripts. This approach unpacks files to edit XML directly, then repacks them to apply tracked changes, fix structure, and convert formats.

Can I preserve tracked changes when editing DOCX files?

Yes, preserving tracked changes is supported when editing DOCX files. The workflow unpacks the document, manipulates the underlying XML to maintain tracked changes and typography standards, and repacks the file to ensure document validation.

What is the best way to convert Word documents to PDF?

The best way to convert Word documents to PDF or legacy formats is through an end-to-end document generation pipeline. It unpacks the DOCX file, applies necessary structural XML edits, and repacks the content into the desired output format.

Does the docx automation workflow require Python or JavaScript?

The DOCX automation workflow supports both JavaScript and Python. It relies on a curated set of scripts in both languages alongside the lxml dependency to handle document creation, editing, packing, and unpacking processes.

How do I extract text from a DOCX file?

You extract text from a DOCX file by unpacking the document and parsing its XML structure. This content extraction method is part of a structured workflow that supports typical content pipeline operations and format conversions.