docx

Automate creation, reading, editing, and formatting of Word documents with Python.

Updated Sep 1, 2025
One-click install
npx skills add https://github.com/walsh-investment/clean-slate-import --skill docx-walsh-investment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/walsh-investment/clean-slate-import/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/walsh-investment/clean-slate-import --skill docx-walsh-investment

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Word document creation, editing, and formatting are tedious when done manually; this Skill automates repetitive docx tasks to save time and ensure consistency.

Core Features & Use Cases

  • Create new .docx files with structured headings, tables, images, and TOC
  • Edit existing documents: insert content, update headers/footers, apply formatting, and manage tracked changes
  • Use cases include generating reports, letters, templates, and proposals at scale; extract, insert, or reorganize content within .docx files

Quick Start

Create or modify a .docx file to include a title and basic sections using Python-docx or docx-js.

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?

Automate Word document generation by using python-docx to programmatically create .docx files with structured headings, tables, images, and tables of contents. This Skill handles complex multi-section document assembly, report generation, and template creation at scale.

Can I edit existing .docx files and apply tracked changes programmatically?

Yes, you can edit existing .docx files to insert content, update headers and footers, apply formatting, and manage tracked changes. This allows automated modifications to letters, proposals, and reports while preserving document review workflows.

Do I need LibreOffice and Pandoc to process Word documents?

Yes, processing Word documents requires python-docx, Pandoc, and LibreOffice. These dependencies enable the Skill to handle .docx file creation, content extraction, formatting, and basic page layout features for automated document workflows.

What is the best way to insert images and tables into a Word document?

The best way to insert images and tables into a Word document is using python-docx to programmatically add structured elements. This Skill supports image insertion and table generation to build complex multi-section reports and templates automatically.

Does this approach support generating reports and templates at scale?

Yes, this approach supports generating reports, letters, templates, and proposals at scale. By automating repetitive .docx creation and formatting tasks, it ensures document consistency while saving time on manual Word processing.

Why does my automated Word document lose formatting when extracting content?

Formatting loss during content extraction or reorganization can occur due to .docx structural complexity. This Skill leverages Pandoc and LibreOffice alongside python-docx to manage basic page layout, headings, and tracked changes to maintain formatting consistency.