Back to Skills

word-document-processor

Comprehensive word document processing with full format support. Handles creation, editing, formatting preservation, tracked changes, and metadata management.

14stars1forksUpdated 5/18/2026

Security Assessment

Medium Risk(60/100)

Detected risks:

Privilege Escalation([SKILL.md] sudo)
Security Score60/100

About word-document-processor

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.

FAQ

Can I extract text from a Word document while preserving tracked changes?

Yes, you can convert a .docx file to markdown using pandoc with the '--track-changes' option, which supports displaying all insertions and deletions.

Which programming languages are supported for creating and editing documents?

Document creation can be done using JavaScript/TypeScript via docx-js, while editing existing documents is supported in Python using the Document library.

How do I access comments or embedded media in a document?

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.

Is there a recommended workflow for editing someone else's legal or business document?

Yes, the redlining workflow is recommended and sometimes required for legal, academic, business, or government documents, to manage tracked changes accurately.

Are there any mandatory preparation steps before creating or editing documents?

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.

All Files

59 files
ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd0.6 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd6.2 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd236.6 KB
View
ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd1.9 KB
View
ooxml/schemas/microsoft/wml-cex-2018.xsd1.7 KB
View
ooxml/scripts/validation/base.py39.0 KB
View
scripts/templates/commentsExtensible.xml2.7 KB
View
ooxml/scripts/validation/redlining.py10.9 KB
View
scripts/utilities.py13.4 KB
View
scripts/templates/commentsExtended.xml2.6 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd50.1 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd7.2 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd1.3 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd4.5 KB
View
ooxml/schemas/microsoft/wml-2018.xsd0.9 KB
View
ooxml/scripts/validation/__init__.py0.3 KB
View
docx-js.md16.1 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd8.7 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd2.5 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd0.5 KB
View
ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd1.3 KB
View
ooxml/schemas/microsoft/wml-symex-2015.xsd0.7 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd73.2 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd81.7 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd7.3 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd3.9 KB
View
ooxml/schemas/microsoft/wml-2010.xsd25.9 KB
View
ooxml/scripts/unpack.py1.0 KB
View
scripts/document.py49.2 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd6.8 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd1.2 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd22.8 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd167.4 KB
View
ooxml/schemas/microsoft/wml-2012.xsd3.7 KB
View
ooxml/scripts/validate.py1.9 KB
View
scripts/templates/comments.xml2.6 KB
View
ooxml.md23.1 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd14.4 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd3.4 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd5.6 KB
View
ooxml/schemas/mce/mc.xsd3.1 KB
View
ooxml/scripts/pack.py5.5 KB
View
scripts/__init__.py0.1 KB
View
LICENSE.txt1.4 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd148.5 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd1.2 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd25.5 KB
View
ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd2.5 KB
View
ooxml/schemas/microsoft/wml-cid-2016.xsd1.0 KB
View
ooxml/scripts/validation/docx.py9.8 KB
View
scripts/templates/commentsIds.xml2.6 KB
View
SKILL.md9.7 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd1.2 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd0.9 KB
View
ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd24.7 KB
View
ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd2.8 KB
View
ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd0.6 KB
View
ooxml/scripts/validation/pptx.py12.0 KB
View
scripts/templates/people.xml0.1 KB
View

Install word-document-processor

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill