docx

Create, read, edit, and package DOCX files with formatting and tracked changes.

1|1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/polaris-dxz/xclaw --skill docx-polaris-dxz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/polaris-dxz/xclaw/tree/main/apps/desktop/openclaw-runtime/config/skills/docx
Command: npx skills add https://github.com/polaris-dxz/xclaw --skill docx-polaris-dxz

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word document creation, reading, editing, and packaging can be tedious and error-prone when done manually. This skill automates DOCX tasks, enabling programmatic generation, modification, validation, and formatting of Word documents.

Core Features & Use Cases

  • Create new documents with structured formatting (headers, tables, images) using automated workflows.
  • Read, analyze, and edit existing documents (find/replace, tracked changes, comments, image insertion) to streamline revisions.
  • Unpack/pack and validate DOCX files, convert legacy formats, and prepare documents for templating and batch processing.

Quick Start

Create a sample .docx with a header, a simple table, and a few formatted sections to see the automation in action.

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 with Python?

Automating Word document generation is handled by this Skill through scripts that create DOCX files with structured formatting, tables, and images, replacing manual drafting with programmatic workflows.

Can I read and edit existing DOCX files programmatically?

Yes, reading and editing existing DOCX files is supported, allowing you to apply find-and-replace operations, insert images, add tracked changes, and extract content from Word documents automatically.

Does this approach require lxml to handle DOCX formatting?

Yes, lxml and defusedxml are required dependencies, enabling the Skill to unpack, pack, and validate DOCX files while securely parsing the underlying XML structure for formatting and image insertion.

What's the best way to insert images into a Word document?

The best way to insert images into a Word document using this Skill is through its automated image insertion feature, which programmatically embeds visual assets into DOCX files during creation or editing.

Can I use this for batch processing and templating Word files?

Yes, you can use this Skill for batch processing and templating Word files, as it unpacks and packs DOCX files, converts legacy formats, and prepares documents for automated template-driven generation.

Are there limitations when applying tracked changes to DOCX files?

While the Skill applies tracked changes and comments during document editing, limitations may arise with highly complex legacy formatting, so validating the unpacked DOCX structure before batch processing is recommended.