docx

Generate Word (.docx) documents from templates with Python-based XML manipulation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables automated creation, reading, editing, and formatting of Word documents (.docx), replacing tedious manual drafting with programmable control over content and styles.

Core Features & Use Cases

  • Create polished documents from templates with headers/footers, tables of contents, and advanced formatting.
  • Read, edit, and reorganize content in existing Word files, including inserting images and performing targeted find-and-replace.
  • Manage tracked changes and comments to produce professional Word outputs such as reports, letters, or templates.

Quick Start

Provide content and a template to generate a ready-to-deliver Word document.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I automatically generate Word documents from templates?

To automatically generate Word documents from templates, you provide content and a .docx template, and the Skill programmatically assembles formatted outputs with headers, footers, tables, and images.

Can I edit existing Word files and insert images programmatically?

Yes, you can edit existing Word files programmatically. The Skill reads, modifies, and reorganizes content in .docx files, including inserting images and performing targeted find-and-replace operations.

Does this approach support tracked changes and comments for client-ready documents?

Yes, this approach supports tracked changes and comments. It manages revisions directly within the Word document XML to produce professional, client-ready outputs like reports and letters.

What is the best way to format Word documents using Python and lxml?

The best way to format Word documents using Python and lxml is through direct DOCX XML manipulation. This Skill uses defusedxml and lxml to programmatically apply advanced formatting and export polished files.

Can I create a Word document with a table of contents and headers without manual formatting?

Yes, you can create a Word document with a table of contents and headers without manual formatting. The Skill programmatically applies advanced styles and structures to generate ready-to-deliver outputs.

Are there limitations when manipulating DOCX XML for complex document generation?

When manipulating DOCX XML for complex document generation, limitations depend on the underlying Python libraries. This Skill relies on defusedxml and lxml to safely assemble, format, and export Word files within their parsing constraints.