anthropic-docx

Create, read, edit, and format Word DOCX documents programmatically.

Updated Jun 14, 2024
One-click install
npx skills add https://github.com/Huijiro/dotfiles --skill anthropic-docx-huijiro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: anthropic-docx
Source: https://github.com/Huijiro/dotfiles/tree/main/agents/.agents/skills/anthropic-docx
Command: npx skills add https://github.com/Huijiro/dotfiles --skill anthropic-docx-huijiro

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Word documents often require manual formatting, consistent styling, and handling complex edits. This skill automates creation, reading, editing, and polishing of Word DOCX outputs to save time and ensure professional results.

Core Features & Use Cases

  • Create and format new DOCX documents with headings, tables, images, and styles using programmatic templates.
  • Read, modify, and reorganize existing Word documents, including tracked changes and comments, then output a polished DOCX.
  • Validate OOXML structure and repair common issues to guarantee compatibility and deterministic packaging across platforms.
  • Handle DOCX-to-PDF conversions or export-ready formats via LibreOffice when needed.

Quick Start

Provide content and request a ready-to-share DOCX with headings, tables, and images formatted automatically.

Frequently Asked Questions about anthropic-docx

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

FAQPage Schema
How do I automate Word document creation with consistent formatting and styles?

Automate Word document creation by using programmable workflows to apply consistent headings, tables, and images. This approach generates professional DOCX reports, templates, and letters deterministically without manual formatting.

Can I edit existing Word documents and handle tracked changes programmatically?

Edit existing Word documents programmatically to read, modify, and reorganize content. The workflow handles tracked changes and comments, then outputs a polished DOCX file with OOXML validation to ensure structural compliance.

How does OOXML validation repair common issues when generating DOCX files?

OOXML validation repairs common DOCX issues by checking the XML structure using libraries like defusedxml and lxml. This deterministic process guarantees compatibility and produces a compliant Word document package across platforms.

What's the best way to convert DOCX files to PDF for export-ready formats?

Convert DOCX files to PDF or other export-ready formats by integrating LibreOffice within the workflow. This handles format conversion after document content is finalized and validated.

Do I need Python libraries like lxml and defusedxml to package Word documents?

Python libraries like lxml, defusedxml, and docx are required to package Word documents. They provide the underlying XML parsing, secure element handling, and structural generation needed for deterministic DOCX creation.

Why does my Word document have formatting issues after automated editing?

Formatting issues after automated editing often stem from non-compliant OOXML structures. This skill repairs common structural problems during packaging using defusedxml and lxml to validate and ensure deterministic output.