ck:docx

Manage .docx creation, editing, and redlining with tracked changes.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/hidonguyen/trade-ops --skill ck-docx-hidonguyen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ck:docx
Source: https://github.com/hidonguyen/trade-ops/tree/main/.claude/skills/document-skills/docx
Command: npx skills add https://github.com/hidonguyen/trade-ops --skill ck-docx-hidonguyen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires defusedxml, lxml, and includes scripts (resource) components.

What problem does it solve?

Many workflows require precise, auditable edits to Microsoft Word documents while preserving formatting, comments, and tracked changes; manual redlining or naive format conversions break structure and introduce errors. This Skill provides deterministic tools and workflows for reading, modifying, and validating .docx (OOXML) packages so that edits are traceable and documents remain valid.

Core Features & Use Cases

  • Text extraction & analysis: Convert DOCX to markdown with tracked changes preserved and extract comments, metadata, and embedded media.
  • Raw OOXML access: Unpack docx, inspect and edit document.xml, comments.xml, and relationships for complex structural edits.
  • Programmatic creation & editing: Create new documents using docx-js patterns or edit existing files with the Document Python library that injects RSIDs, authors, and tracked-change wrappers.
  • Redlining workflow: Plan changes in markdown, group into batches, implement tracked <w:ins>/<w:del> edits, add comments, and verify with pandoc and validation tools.
  • Validation & packaging: Pack and validate Office files, run XSD and redlining validators, and ensure content types, relationships, and whitespace rules are correct.
  • Use case: Perform a legal redline: convert a contract to markdown with tracked changes, plan batched amendments, apply precise OOXML edits preserving RSIDs and formatting, then repack and validate the final docx.

Quick Start

Convert a .docx with tracked changes to markdown, plan 3–8 grouped edits in markdown, then run the redlining workflow to apply tracked <w:ins>/<w:del> edits and validate the repackaged .docx.

Frequently Asked Questions about ck:docx

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

FAQPage Schema
How do I automate redlining in .docx files while preserving tracked changes?

You can automate redlining in .docx files by unpacking the OOXML package, applying programmatic tracked-change wrappers for <w:ins> and <w:del> elements, injecting RSIDs and authors, and repacking the validated document.

What is the best way to extract text and comments from a Word document for batch editing?

Extract text and comments from a Word document by converting the .docx to markdown while preserving tracked changes, allowing you to plan and group batch edits before applying precise OOXML modifications.

Can I use lxml and defusedxml to validate OOXML document structures?

You can use lxml and defusedxml to validate OOXML document structures by unpacking the .docx package, inspecting document.xml and comments.xml, and running XSD validators to ensure correct content types and relationships.

How do I programmatically insert comments and images into legal Word documents?

Insert comments and images into legal Word documents programmatically by accessing raw OOXML files, editing comments.xml and relationships directly, and repacking the .docx with validation to maintain structural integrity.

Why do my tracked changes disappear when converting Word documents to markdown?

Tracked changes disappear during naive format conversions because standard parsers strip OOXML revision metadata; preserving them requires specialized extraction that maps <w:ins> and <w:del> elements directly into markdown formatting.