Word Track Changes for Openclaw

A specialized tool for enabling and managing native Microsoft Word Track Changes using OpenXML to maintain visible, auditable edit histories in DOCX files.

elio-huang-15
v1.0.0
Apr 9, 2026
1
620
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install word-track-changes

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 word-track-changes 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 Word Track Changes?

This Openclaw Skills package provides a robust mechanism for AI agents to interact with Microsoft Word documents while preserving human-readable revision histories. Unlike simple text replacement which overwrites data, this skill utilizes native OOXML elements like insertion and deletion tags to ensure changes appear as standard redlines—complete with green underlined text and red strikethroughs—within the Word Review pane.

The skill is engineered to overcome the common challenge of fragmented text in real-world DOCX files, where words are often split across multiple internal XML nodes. By implementing paragraph-level indexing and cross-run matching, it ensures that agents can reliably modify documents without corrupting formatting or losing the context of the edits.

Word Track Changes Use Cases

  • Editing professional Word documents while maintaining a visible record of all AI-suggested modifications.
  • Collaborative drafting where an agent proposes insertions and deletions that a human user can later accept or reject.
  • Automated legal or technical document reviews that require a clear audit trail of every change made.
  • Replacing text strings that are internally split across multiple XML elements due to previous formatting or metadata.

How Word Track Changes Works

  1. The skill unzips the target DOCX archive into a temporary environment to access its internal XML structure.
  2. It parses the word/document.xml file and builds a paragraph-level index to accurately locate text that may be split across multiple nodes.
  3. The processor identifies the specific insertion or deletion points based on the provided search text or paragraph triggers.
  4. It injects native OOXML revision markers into the XML, wrapping deleted text in deletion tags and new text in insertion tags.
  5. The skill modifies the word/settings.xml file to ensure the trackRevisions flag is set to active.
  6. Finally, the modified components are re-packaged into a valid, standard-compliant DOCX file for use in Microsoft Word.

Word Track Changes Setup

To integrate this functionality into your Openclaw Skills workflow, use the provided Python API or CLI scripts.

To enable track changes on a document via the command line:

python ~/.openclaw/skills/word-track-changes/scripts/enable_tracking.py input.docx output.docx

To perform programmatic text replacement with revision marks:

from track_changes import TrackChangesProcessor

p = TrackChangesProcessor("input.docx")
p.set_author("AI Agent")
p.replace_text_with_revision(
    old_text="original content",
    new_text="updated content"
)
p.save("output.docx")
p.cleanup()

Word Track Changes Data Schema & Taxonomy

The skill manages document state by interacting with the underlying OpenXML architecture. The primary data modifications occur within these specific file paths:

XML Component Purpose
word/document.xml Stores the actual text content and the w:ins and w:del revision elements.
word/settings.xml Stores the document-level configuration where trackRevisions is toggled.

It employs a temporary directory strategy to prevent file corruption during the unzip/re-zip lifecycle.

Word Track Changes Advanced Features

  • Cross-Run Matching: Successfully identifies and replaces search strings even when they are fragmented across multiple internal XML tags.
  • Paragraph-Level Precision: Ensures that modifications are isolated to the target paragraph, preserving the structural integrity of the rest of the document.
  • Format Preservation: Inherits existing run properties to ensure that all new agent-generated text matches the surrounding font, size, and style.
  • Batch Revision Support: Allows for the application of multiple, complex tracked changes in a single processing pass for improved performance.
  • Customizable Attribution: Enables the setting of specific author names for each revision, allowing for clear distinction between different agents or users.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*