DOCX Creation, Editing, and Analysis for Openclaw

A comprehensive toolset for programmatic creation, redlining, and deep XML analysis of Microsoft Word documents.

kidaiangel
v1.0.0
Mar 19, 2026
0
1.8k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install document-docx

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 document-docx 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 Creation, Editing, and Analysis?

The docx skill provides a robust framework for AI agents to interact with professional documents beyond simple text editing. It enables sophisticated workflows including OOXML manipulation, tracked changes (redlining), and visual analysis through PDF conversion. By treating .docx files as structured ZIP archives, this skill allows for precise control over document metadata, comments, and complex formatting.

Utilizing Openclaw Skills, developers can automate the generation of legal, academic, and business documents using JavaScript or Python. Whether you need to extract clean markdown via Pandoc or perform surgical XML edits on existing files, this skill ensures professional-grade output that preserves document integrity and revision history.

DOCX Creation, Editing, and Analysis Use Cases

  • Creating new business or legal documents from scratch using TypeScript/JavaScript.
  • Performing 'Redlining' on professional contracts to propose tracked changes and comments.
  • Converting .docx files to Markdown for LLM-based content analysis and summarization.
  • Visualizing document layouts by converting pages into JPEG images for multi-modal analysis.
  • Automated batch editing of document metadata and structural XML components.

How DOCX Creation, Editing, and Analysis Works

  1. Workflow Selection: The agent determines if the task requires creating a new file, reading existing content, or performing a complex redline edit.
  2. Environment Preparation: Necessary utilities like Pandoc or the Python OOXML library are invoked based on the chosen path.
  3. Content Processing: For analysis, files are converted to markdown; for editing, the .docx archive is unpacked into its constituent XML parts (e.g., word/document.xml).
  4. Manipulation: Changes are applied either via high-level libraries (docx-js) or direct DOM manipulation of the XML nodes to ensure minimal and precise edits.
  5. Packaging and Verification: The modified directory is repacked into a valid .docx file and verified using markdown-based regression checks.

DOCX Creation, Editing, and Analysis Setup

Ensure the following system dependencies are installed to use the full suite of Openclaw Skills:

# Install Pandoc for text extraction
sudo apt-get install pandoc

# Install Node.js library for document creation
npm install -g docx

# Install LibreOffice and Poppler for image conversion
sudo apt-get install libreoffice poppler-utils

# Install Python dependencies for secure XML parsing
pip install defusedxml

DOCX Creation, Editing, and Analysis Data Schema & Taxonomy

The skill interacts with the internal Open XML structure. Key components include:

File/Path Description
word/document.xml The primary container for document text and structure.
word/comments.xml Stores all user comments and annotations.
word/media/ Directory containing embedded images and multimedia.
<w:ins> / <w:del> XML tags used to manage tracked insertions and deletions.

DOCX Creation, Editing, and Analysis Advanced Features

  • Advanced Redlining: Implements a minimal edit principle to preserve original RSIDs for professional-grade document reviews.
  • Batching Strategy: Groups 3-10 changes per iteration to maintain XML stability and simplify debugging.
  • Visual Inspection: Supports headless LibreOffice conversion to PDF followed by PDF-to-PPM for per-page image analysis.
  • Secure Parsing: Uses defusedxml to prevent XML-based security vulnerabilities during unpacking operations.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*