Engineering
docx avatar

docx

Comprehensive professional document tool for .docx creation, editing, and analysis. Supports tracked changes, comments, metadata, and raw OOXML manipulation.

Introduction

The docx skill provides a structured framework for managing professional Word documents within Claude Code. It is designed for engineers, legal professionals, and technical writers who require programmatic control over complex document formats. By abstracting the complexities of OOXML (Open Office XML) into clear, actionable workflows, this skill allows for precise document manipulation that preserves formatting and metadata.

  • Text Extraction and Analysis: Converts .docx files to structured markdown using pandoc, facilitating quick content review while preserving evidence of tracked changes.

  • OOXML Raw Access: Enables deep-level editing by unpacking documents into XML components (document.xml, comments.xml), allowing for targeted changes to media, styles, and advanced document structures.

  • Automated Creation: Utilizes docx-js integration to generate new documents from scratch via programmatic definitions, ensuring consistent template application.

  • Professional Redlining: Implements a systematic redlining workflow designed for legal and business documents. It uses a batch-based strategy (3-10 changes per batch) to ensure precise, professional insertions and deletions using <w:ins> and <w:del> tags, while maintaining the integrity of original document RSIDs.

  • Formatting Preservation: Employs dedicated Python scripts to pack and unpack documents, ensuring that structural integrity is maintained between automated edits and final export.

  • Usage Note: For simple text updates, utilize the pandoc extraction workflow. For high-stakes document modifications, such as contract updates or complex technical reports, follow the mandatory redlining workflow to prevent document corruption.

  • Dependencies: Ensure system access to pandoc, Python for OOXML scripts, and JavaScript environments for docx-js output.

  • Practical Tips: Always read the full provided reference documentation (ooxml.md and docx-js.md) before executing complex modifications. Use specific structural identifiers (e.g., Section numbers or unique markers) rather than line numbers, as markdown representation does not correlate to XML structure.

  • Constraint: This tool is intended for professional OOXML (.docx) files. It is not designed for legacy binary (.doc) formats. Always create backups before applying automated scripts to production documents.

Repository Stats

Stars
2,839
Forks
329
Open Issues
7
Language
Python
Default Branch
main
Sync Status
Idle
Last Synced
Apr 29, 2026, 02:39 PM
View on GitHub