docx

Create, read, edit, and format Word .docx documents with Python.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/HuuBar/skill-routing-experiment --skill docx-huubar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/HuuBar/skill-routing-experiment/tree/main/unified_skills/anthropics/docx
Command: npx skills add https://github.com/HuuBar/skill-routing-experiment --skill docx-huubar

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word documents are central to business communication; this Skill automates creation, reading, editing, and formatting of Word documents (.docx), reducing manual toil.

Core Features & Use Cases

  • Create and edit Word documents with consistent formatting, headers, and tables of contents.
  • Insert images, perform find-and-replace, manage tracked changes, and generate polished Word templates.
  • Use case: automatically generate a formatted report in .docx from data sources, including headers, lists, and embedded images.

Quick Start

Create a new .docx report from a template and apply a standardized header and section structure.

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 creation and formatting from data?

Automating Word document formatting involves parsing and modifying DOCX XML to apply consistent headers, lists, and embedded images. This Skill uses Python-based tooling to generate polished .docx templates from your data sources.

Can I perform find-and-replace and insert images into a .docx file?

Yes, you can perform find-and-replace and insert images into a .docx file. The Skill identifies and automates Word document workflows by manipulating .docx content, handling tasks like image insertion and text replacement.

How does Python handle tracked changes in Word documents?

Python handles tracked changes in Word documents by parsing and modifying the underlying DOCX XML structure. This automation approach allows you to manage tracked changes alongside creating, reading, and editing text without manual toil.

What is the best way to generate a formatted .docx report from a template?

The best way to generate a formatted .docx report from a template is using Python-based tooling to parse and modify DOCX XML. This Skill applies a standardized header and section structure to create polished documents automatically.

Do I need lxml and defusedxml to edit Word documents?

Yes, you need lxml and defusedxml dependencies to edit Word documents effectively. These libraries provide the Python-based tooling required to safely parse and manipulate the underlying DOCX XML structure for formatting and editing.

When should I not use Python to automate Word document editing?

You should not use Python to automate Word document editing if your task requires complex desktop publishing features outside standard .docx formatting. This Skill focuses on content manipulation, tracked changes, and templates rather than advanced layout rendering.