docx

Create and edit DOCX files using OpenXML SDK and CLI tools.

154|1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/haojing8312/WorkClaw --skill docx-haojing8312
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/haojing8312/WorkClaw/tree/main/apps/runtime/src-tauri/builtin-skills/docx
Command: npx skills add https://github.com/haojing8312/WorkClaw --skill docx-haojing8312

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dotnet, pandoc, soffice, zip, unzip, and includes scripts (resource) and assets (resource) components.

What problem does it solve?

Produces, edits, and validates Word (.docx) documents programmatically so users avoid manual formatting errors and fragile WYSIWYG edits. It consolidates content creation, template application, and structural validation into reproducible pipelines for printable, formal documents.

Core Features & Use Cases

  • Professional DOCX generation using OpenXML SDK (.NET) with C# samples for complex layouts (styles, headers/footers, TOC, multi-section documents).
  • Three pipelines: CREATE (from scratch), FILL-EDIT (replace or fill existing .docx), FORMAT-APPLY (overlay templates and perform XSD/business-rule gate-checks).
  • Validation and safety: preview, XSD and business-rule validation, diff tools, and automated repair steps to avoid corrupting OpenXML files.
  • Practical scenarios: drafting academic theses with APA/MLA templates, corporate reports with corporate styles, two-column conference papers, or batch-applying branding templates to dozens of documents.

Quick Start

Ask the skill to create a professional .docx report with title, headings, table of contents, and images and save it as output.docx.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I generate a formatted DOCX document programmatically using OpenXML?

To generate a formatted DOCX document programmatically, the Skill uses the OpenXML SDK with .NET to create complex layouts including headers, footers, tables of contents, and multi-section documents. It provides C# samples for building professional Word files from scratch reproducibly.

Can I fill or edit an existing .docx file without breaking its formatting?

Yes, you can fill or edit an existing .docx file safely. The Skill provides a FILL-EDIT pipeline to replace content in existing Word documents, utilizing built-in preview, XSD, and business-rule validation gates to prevent corrupting the original OpenXML structure.

What's the best way to batch apply corporate styles to multiple Word documents?

Batch applying corporate styles to Word documents is handled through the FORMAT-APPLY pipeline, which overlays templates across multiple files. It enforces XSD and business-rule validation gates while applying branding templates to ensure consistent formatting results.

Do I need .NET SDK to create and validate Word files with this approach?

Yes, the .NET SDK is required because the Skill relies on the OpenXML SDK and C# samples to construct and validate DOCX files. You also need supporting CLI tools like pandoc, soffice, zip, and unzip for preview and conversion workflows.

How does the OpenXML validation process prevent document corruption?

The OpenXML validation process prevents document corruption by running XSD and business-rule validation gates alongside diff tools and automated repair steps. This ensures that any structural edits or template overlays applied to the DOCX file remain compliant.

Can pandoc and soffice convert the generated DOCX files to other formats?

Yes, pandoc and soffice can convert the generated DOCX files to other formats. The Skill includes these CLI tools as optional dependencies to perform format conversions and generate previews after creating or editing the Word documents.