docx

Create, read, edit, and format Word documents across Python and JavaScript.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/MRTERRIFIC007/Bond --skill docx-mrterrific007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/MRTERRIFIC007/Bond/tree/main/.agents/skills/docx
Command: npx skills add https://github.com/MRTERRIFIC007/Bond --skill docx-mrterrific007

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill enables programmatic creation, reading, editing, and formatting of Word documents (.docx), reducing manual, repetitive tasks and enabling repeatable document workflows.

Core Features & Use Cases

  • Create new documents with code and apply formatting like headings, tables of contents, and page layout.
  • Read and edit existing .docx by manipulating the underlying XML (unpack/edit/pack) and handle images, tables, and tracked changes.
  • Validate and convert Word content within automated pipelines, including compatibility checks with common tooling.
  • Use cases include generating polished proposals, reports, or letters from templates, and updating content programmatically.

Quick Start

Create, read, or modify a Word document (.docx) through an automated workflow by specifying your desired outcome to generate or adjust the file.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I programmatically generate and format Word documents?

You can programmatically generate and format Word documents by automating .docx file creation to apply headings, tables of contents, and page layout. This reduces manual repetitive tasks and enables repeatable document generation workflows from templates.

How does XML editing work when modifying existing .docx files?

Modifying existing .docx files via XML editing involves unpacking the document archive, manipulating the underlying XML structure, and repacking it. This mechanism allows direct handling of embedded images, tables, and tracked changes within the document.

Can I use Python and JavaScript to automate document generation and editing?

Yes, you can use Python and JavaScript to automate document generation and editing workflows across .docx files. The process integrates with tooling like docx-js and requires dependencies such as defusedxml and lxml for secure XML processing.

Does this workflow support converting and validating Word documents with pandoc and LibreOffice?

Yes, this workflow supports validating and converting Word documents using pandoc and LibreOffice-based tooling. These integrations enable compatibility checks and automated content transformations within your document processing pipelines.

What is the best way to handle tracked changes and images in a Word document?

The best way to handle tracked changes and images in a Word document is through direct XML manipulation. By unpacking and editing the underlying .docx XML structure, you can programmatically insert images and manage tracked changes across the file.

Are there limitations when extracting content from Word documents using lxml?

Limitations when extracting content from Word documents using lxml relate to handling complex formatting and ensuring valid XML structure. You must correctly unpack and repack the .docx archive to avoid file corruption during automated document editing pipelines.