Comprehensive word document processing with full format support. Handles creation, editing, formatting preservation, tracked changes, and metadata management.
Detected risks:
The word-document-processor skill provides comprehensive tools for creating, editing, and analyzing Word (.docx) documents while fully preserving formatting, tracked changes, and metadata. It solves the challenge of programmatically handling complex Word documents in professional, legal, academic, or business contexts, where accurate representation of content and edits is critical. By integrating both high-level document manipulation and direct XML access, it allows users to work with any Word file, whether starting from scratch or editing existing documents, without losing fidelity in structure or style.
Key features include the ability to extract text content and convert it to markdown with tracked changes, access raw XML for detailed manipulation of comments, embedded media, and complex formatting, and create new Word documents using JavaScript/TypeScript via docx-js. For editing existing documents, it leverages a Python Document library that supports both high-level operations and direct DOM access. Additionally, it supports workflows for reviewing documents with tracked changes (redlining), ensuring compliance with legal or organizational standards. Essential scripts for unpacking and repacking documents facilitate direct manipulation of the underlying OOXML structures.
This skill is suitable for developers, technical writers, legal professionals, and data analysts who need to automate Word document processing or integrate Word handling into applications. Typical use cases include converting Word content to markdown for version-controlled workflows, programmatically generating reports with precise formatting, managing collaborative edits via tracked changes, and auditing document metadata. Its dual-language support for Python and JavaScript ensures compatibility with various development environments and workflows, making it a versatile tool for any context that requires reliable, structured document handling.
Yes, you can convert a .docx file to markdown using pandoc with the '--track-changes' option, which supports displaying all insertions and deletions.
Document creation can be done using JavaScript/TypeScript via docx-js, while editing existing documents is supported in Python using the Document library.
For detailed access, you need raw XML access. Unpack the .docx file and read 'word/comments.xml' for comments and 'word/media/' for images or other embedded media.
Yes, the redlining workflow is recommended and sometimes required for legal, academic, business, or government documents, to manage tracked changes accurately.
Before creating a new document, you must read the entire 'docx-js.md' file. Before editing an existing document, read the entire 'ooxml.md' file to understand the Document library API and XML patterns.
Quick Setup:
.claude/skills/Repository
qodex-ai/ai-agent-skills