DOCX Manager for Openclaw

A comprehensive toolkit for programmatically creating, editing, and analyzing Microsoft Word documents with high-fidelity formatting.

zda2019
v0.1.0
Mar 8, 2026
1
2.7k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install docx-2

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install docx-2 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is DOCX Manager?

The DOCX skill provides a robust framework for Openclaw Skills to handle complex Word document lifecycles. It allows for the generation of professional-grade files from scratch using JavaScript, as well as deep XML-level manipulation for existing documents. By treating .docx files as the structured ZIP archives they are, this skill enables precise control over styles, tables, tracked changes, and metadata.

This toolset is designed for developers who need to bridge the gap between automated data processing and human-readable deliverables. Whether you are generating legal contracts, technical reports, or batch-processing legacy files, the skill ensures that every output meets strict schema requirements and renders consistently across different office suites.

DOCX Manager Use Cases

  • Automated generation of reports, memos, and letters using dynamic data.
  • Programmatic extraction of text, images, and tracked changes from existing documents.
  • Batch conversion of legacy .doc files to the modern .docx format.
  • High-fidelity find-and-replace operations within complex document XML structures.
  • Managing collaborative workflows by injecting or accepting tracked changes and comments.

How DOCX Manager Works

  1. Analyze the request to determine if it requires creating a new document or modifying an existing one.
  2. For new documents, the skill uses the docx-js library to build a document structure using explicit units like DXA for layout precision.
  3. For existing documents, the skill unpacks the .docx ZIP archive into its constituent XML files.
  4. It applies targeted edits to the XML files, such as modifying text runs, adding image relationships, or inserting comment markers.
  5. Finally, it repacks the XML files, validates the structure against office schemas, and generates the final .docx file.

DOCX Manager Setup

To get started with this skill, ensure the necessary environment dependencies are installed:

npm install -g docx
# Ensure pandoc and LibreOffice are available for conversion tasks

Use the provided Python utility scripts to manage document state:

# Unpack for editing
python scripts/office/unpack.py document.docx unpacked_dir/

# Repack after XML modification
python scripts/office/pack.py unpacked_dir/ output.docx --original document.docx

DOCX Manager Data Schema & Taxonomy

The skill manages document layout and metadata using a structured taxonomy:

Attribute Specification
Measurement Units DXA (1440 DXA = 1 inch)
Page Sizes US Letter (12240x15840) or A4 (11906x16838)
Font Defaults Arial 12pt (standardized for cross-platform compatibility)
Table Widths Always uses WidthType.DXA to ensure Google Docs compatibility
Image Handling Requires explicit type definitions and EMU-based transformation scaling

DOCX Manager Advanced Features

  • Direct XML injection for nesting complex tracked changes and multi-author comment threads.
  • Support for multi-column layouts with custom column spacing and vertical separators.
  • Automatic Table of Contents generation based on HeadingLevel outline markers.
  • Headless conversion of .docx files to PDF or high-resolution images via integrated LibreOffice and Poppler hooks.
  • Smart quote entity conversion to ensure professional typography survives the XML editing process.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*