docx

Create and edit DOCX files via XML manipulation and validation.

60|38|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/abcnuts/manus-skills --skill docx-abcnuts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/abcnuts/manus-skills/tree/main/skills/utility-skills/docx
Command: npx skills add https://github.com/abcnuts/manus-skills --skill docx-abcnuts

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word document tasks such as creation, editing, and formatting are tedious when done manually; this skill streamlines those workflows by automating DOCX generation, XML edits, and validation to ensure consistent outputs.

Core Features & Use Cases

  • DOCX creation: generate Word documents by assembling underlying XML and packaging into a .docx.
  • Edit existing documents: unpack DOCX, modify word/document.xml, and repack, with support for tracked changes and comments.
  • Analyze/validate: validate XML against schemas, verify content types and relationships, and ensure structural integrity across Word workflows.
  • Image insertion and formatting: insert or replace images and apply styling templates to outputs.
  • Template-assisted outputs: produce polished Word documents like reports or letters using ready-made templates.

Quick Start

Create a simple Word document with a title and paragraph using the docx library.

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 editing?

Automating Word document creation and editing involves assembling underlying XML and packaging it into a .docx file. This approach streamlines repetitive formatting tasks by programmatically generating business reports, letters, and templates.

Can I edit an existing DOCX file and apply tracked changes?

Yes, you can edit an existing DOCX file by unpacking it, modifying the word/document.xml directly, and repacking it. This method supports inserting tracked changes and comments for structured document review workflows.

How do I insert images into a Word document programmatically?

To insert images into a Word document programmatically, the process targets the underlying document XML to embed or replace image references. It also applies styling templates to ensure the inserted images match the document's formatting.

What's the best way to validate DOCX structural integrity?

Validating DOCX structural integrity is done by validating the underlying XML against schemas and verifying content types and relationships. This ensures the generated or edited Word documents maintain correct formatting and open without errors.

Do I need Python and lxml to generate Word documents?

Generating Word documents requires the docx library for creation and Python-based XML manipulation libraries like lxml and defusedxml for edits and validation. These dependencies handle the underlying XML structure and packaging.

Why does my DOCX template output have formatting issues?

DOCX template formatting issues often occur when the underlying XML is modified without proper schema validation. Validating XML against schemas and verifying content relationships ensures structural integrity and prevents broken document outputs.