office-word-diff

Apply word-level tracked changes to Microsoft Word DOCX documents.

46|25|Updated May 7, 2026
One-click install
npx skills add https://github.com/LegalQuants/lq-skills --skill office-word-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: office-word-diff
Source: https://github.com/LegalQuants/lq-skills/tree/main/skills/office-word-diff
Command: npx skills add https://github.com/LegalQuants/lq-skills --skill office-word-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

office-word-diff eliminates the difficulty of applying AI-generated edits to Microsoft Word while preserving formatting and producing native tracked changes that lawyers can review.

Core Features & Use Cases

  • Word-level tracked changes: generates granular insertions and deletions rather than paragraph-level diffs.
  • Formatting preservation: keeps bold/italic/underline and other structure intact through the transformation.
  • Complex document support: handles nested lists, tables, headers, and formatting runs more reliably than line-based diffs.
  • Use case: you generate revised contract language from an agent and need a DOCX output where Word shows clear redline-style tracked changes for review and acceptance.

Quick Start

Use office-word-diff to transform an old DOCX and an AI-edited new DOCX into an updated DOCX that contains valid Word tracked changes attributed to a specified author.

Frequently Asked Questions about office-word-diff

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

FAQPage Schema
How do I apply word-level tracked changes to a DOCX file programmatically?

To apply word-level tracked changes to a DOCX file, compute deterministic word diffs and insert Word-compatible revisions using Office.js. This generates native tracked changes in the output document that Microsoft Word can review and accept.

Why does line-based diffing break formatting in complex Word documents?

Line-based diffing breaks formatting in complex Word documents because it struggles with nested lists, tables, headers, and formatting runs. Word-level diffing preserves bold, italic, and underline structures by targeting granular insertions and deletions instead of entire paragraphs.

Can I generate DOCX redlines for legal document transformation while preserving formatting runs?

Yes, you can generate DOCX redlines for legal document transformation while preserving formatting runs. The process computes deterministic word diffs and inserts native Word revisions, keeping complex structures like nested tables and lists intact for legal redlining workflows.

What's the best way to show AI-generated contract edits as native Word revisions?

The best way to show AI-generated contract edits as native Word revisions is to compare the original DOCX and the AI-edited version to produce an updated DOCX containing valid tracked changes attributed to a specified author for legal review.

Does Office.js support inserting native tracked changes in DOCX without relying on line-based diffing?

Yes, Office.js supports inserting native tracked changes in DOCX without relying on fragile line-based diffing. It parses and transforms the DOCX structure to apply deterministic word-level diffs, ensuring formatting preservation across complex document elements.