docx

Automates creation, editing, and formatting of .docx documents via script.

5|3|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/zebbern/termstack --skill docx-zebbern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/zebbern/termstack/tree/main/.github/skills/docx
Command: npx skills add https://github.com/zebbern/termstack --skill docx-zebbern

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables automated creation, editing, and formatting of Word documents (.docx), eliminating manual, repetitive document assembly and ensuring consistent styling and structure across reports, letters, templates, and presentations.

Core Features & Use Cases

  • Create new .docx documents with titles, headers/footers, images, tables, and formatted text.
  • Read and reorganize content from existing Word files, apply formatting, and update sections or templates.
  • Insert or replace images, perform find-and-replace, manage tracked changes and comments, and export polished Word documents (e.g., reports, letters, proposals).
  • Ideal for template-driven document generation, mass customization, and standards-compliant document production.

Quick Start

Create a new Word document with a title and a header, add simple body text, and save as output.docx.

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 a template?

You can automate Word document generation by using a structured script workflow to populate templates with dynamic text, images, tables, and headers. This eliminates manual assembly and ensures consistent formatting across multiple generated .docx files.

Can I programmatically edit an existing .docx file to insert images and tables?

Yes, you can programmatically edit existing .docx files to insert or replace images, add formatted tables, and apply styling. The Skill reads and reorganizes content from Word files, allowing targeted updates to specific sections or templates.

Does this approach support managing tracked changes and comments in Word documents?

Yes, managing tracked changes and comments in Word documents is supported. You can programmatically add, review, or modify tracked changes and comments within the .docx file structure during the automated document generation and editing workflow.

What is the best way to do a find-and-replace across multiple Word documents?

The best way to perform find-and-replace across multiple Word documents is using an automated script workflow. This allows you to programmatically search for specific text patterns and apply replacements consistently across numerous .docx files for mass customization.

Do I need lxml installed to programmatically create and format Word documents?

Yes, you need lxml and defusedxml installed to programmatically create and format Word documents. These dependencies are required to parse and manipulate the underlying XML structure of .docx files securely and effectively.