DOCX for Openclaw

An advanced operational skill for creating, editing, and extracting rich data from Microsoft Word documents using automated tooling and XML modification.

yangxiaoqiang1992
v1.0.0
Jun 15, 2026
0
491
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install docx1

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

The DOCX creation, editing, and analysis tool is a specialized module engineered for programmatic interaction with .docx files, which operate under the hood as zipped XML archives. This skill empowers developers and automated workers to generate polished deliverables such as reports, letters, templates, and memos without requiring full office suite software during production.

By leveraging tools like docx-js and Pandoc alongside specific internal helper scripts, the skill ensures standard-compliant structure and validation. It bridges the gap between raw data and presentation-ready Word documents, providing native support for complex typography, precise layouts, tracked changes, and localized document structures.

DOCX Use Cases

  • Programmatic generation of corporate reports, templates, memos, and multi-column document layouts.
  • Automating text extraction and content re-organization from existing .docx assets into cleaner markdown structures.
  • Stripping or accepting tracked changes and embedding structured editorial comments into shared legal and administrative workflows.
  • Batch-converting legacy document formats (.doc) into modern web-ready formats or high-resolution page image previews.

How DOCX Works

  1. Triggering and Conversion: The system detects requests involving .docx, Word documents, or templates, forcing headless asset pre-conversion if a legacy format is introduced.
  2. Document Parsing or Scaffolding: For reading workflows, text is pulled via specialized rendering tools. For instantiation workflows, a fresh layout is defined explicitly using strict measurement parameters like DXA units.
  3. Content and Node Assembly: Elements such as multi-column boundaries, structural table grids with matching absolute cell dimensions, or numbering sequences are safely generated to prevent structural layout breaks.
  4. Unpacking and Node Injection (For Modifications): Existing archives are extracted into raw structural files where custom edits, comment ranges, or granular author tracking attributes are inserted via direct string transformations.
  5. Validation and Repacking: The schema validator checks the resulting package against document formatting specifications, automatically fixing edge cases before compressing everything back into a fully compliant deliverable.

DOCX Setup

Install the required global node library and utilize the provided environment automation scripts to handle conversions and packaging:

# Install the core document creation library globally
npm install -g docx

# Extract text or convert an existing document into a markdown asset
pandoc --track-changes=all document.docx -o output.md

# Unpack a target document to access individual structural elements
python scripts/office/unpack.py document.docx unpacked/

# Validate a newly generated file to ensure structural compliance
python scripts/office/validate.py doc.docx

DOCX Data Schema & Taxonomy

The skill manages documents by evaluating explicit dimension parameters and structural taxonomy. Data structural components include:

Measurement Property Standard Dimension Target Layout Implementation Note
US Letter Width 12,240 DXA Explicitly configured to prevent default overrides
US Letter Height 15,840 DXA Scaled precisely where 1,440 DXA points equal 1 inch
Standard Margin 1,440 DXA Uniform padding on all edges to calculate safe content boundaries

For document tracking and markup reference arrays, structural metadata tags follow precise hex-encoded tracking identifiers and predefined entity mapping tables to preserve smart typographic quotes during modifications.

DOCX Advanced Features

  • Direct programmatic XML manipulation via specialized archival unpacking and packing frameworks.
  • Nested tracked change injections allowing detailed editorial cross-collaboration with explicit authorship properties.
  • Custom multi-column section breaks supporting variable width configuration structures.
  • Seamless document rendering integration using background office engines to produce clean PDF blueprints and image maps.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*