docx

Create, read, edit, and analyze Word .docx documents with python-docx.

1.5k|180|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/Memento-Teams/Memento-Skills --skill docx-memento-teams
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/Memento-Teams/Memento-Skills/tree/main/builtin/skills/docx
Command: npx skills add https://github.com/Memento-Teams/Memento-Skills --skill docx-memento-teams

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Automate Word document creation, reading, and editing to streamline office workflows and reduce repetitive formatting tasks.

Core Features & Use Cases

  • Create, read, and modify .docx documents programmatically using python-docx and related tooling.
  • Validate and transform Word content, including formatting, tables, headers/footers, and embedded images.
  • Use cases include generating branded reports, templated proposals, and polished documents from data sources.

Quick Start

Create a basic Word document by supplying content blocks and formatting rules, then run the skill to generate 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 creation and formatting in Python?

Automate Word document creation and formatting using Python by leveraging python-docx to programmatically generate, edit, and validate .docx files. This streamlines office workflows by transforming data sources into templated reports, proposals, and polished documents without manual formatting.

Can I extract and modify embedded images and tables in .docx files?

Yes, you can extract and modify embedded images, tables, headers, footers, and formatting within .docx files. The skill utilizes python-docx and lxml to parse and safely transform Word content, enabling precise content extraction and batch edits across large document sets.

What is the best way to generate branded reports from a data source into Word?

The best way to generate branded reports from a data source into Word is by applying template-driven document generation. Supply content blocks and formatting rules to programmatically create polished .docx outputs, reducing repetitive formatting tasks and ensuring consistent branding across proposals.

Does python-docx safely handle parsing untrusted OOXML content?

Yes, python-docx safely handles parsing untrusted OOXML content when combined with defusedxml. This approach validates and safely modifies Word documents within a controlled context, protecting against malicious XML payloads while extracting or transforming document content.

How do I perform batch edits across a large set of Word documents?

Perform batch edits across large Word document sets by scripting python-docx to programmatically read, modify, and apply formatting rules to multiple .docx files. This automates repetitive office workflows and ensures consistent document transformations across the entire batch.