DOCX Skill logo

DOCX Skill

Visit

Anthropic's official DOCX skill for comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction.

Share:

Overview

DOCX Skill is one of Anthropic's official Claude Skills, designed to teach AI Agents how to work with professional Word documents (.docx files). This skill provides comprehensive tools and workflows for document creation, editing, and analysis, making Claude capable of handling complex document tasks with tracked changes, comments, and formatting preservation.

The skill includes multiple workflows optimized for different scenarios: creating new documents from scratch, editing existing documents, working with tracked changes for document review, and extracting content for analysis. It supports both high-level document operations and direct XML manipulation for advanced use cases.

Core Features

1. Document Creation

Create professional Word documents from scratch using the docx-js library with JavaScript/TypeScript. Build documents with rich formatting including:

  • Custom styles and themes
  • Tables and lists
  • Images and media
  • Headers and footers
  • Complex paragraph formatting

2. Text Extraction & Analysis

Extract and analyze document content using multiple methods:

  • Convert to markdown with Pandoc for easy text analysis
  • Parse raw XML for detailed structure inspection
  • Access comments and metadata
  • Preserve tracked changes during extraction

3. Document Editing

Edit existing Word documents using the OOXML Document library with comprehensive support for:

  • Content modification while preserving formatting
  • Style and formatting updates
  • Table and list manipulation
  • Direct XML editing for complex scenarios

4. Tracked Changes (Redlining)

Professional document review workflow with tracked changes:

  • Plan and implement systematic changes
  • Mark insertions and deletions precisely
  • Preserve original RSIDs for unchanged text
  • Batch changes for efficient review
  • Verify all changes with automated checks

5. Comments & Collaboration

Work with document comments and collaborative features:

  • Add and read comments
  • Reference specific document sections
  • Manage review workflows

Use Cases

  • Legal Document Review: Track changes for contracts, agreements, and legal documents with professional redlining
  • Academic Writing: Create and edit research papers, theses, and academic documents with proper formatting
  • Business Documents: Generate reports, proposals, and presentations with consistent styling
  • Document Analysis: Extract and analyze content from large document collections
  • Collaborative Editing: Manage document reviews with tracked changes and comments

Technical Implementation

This skill provides multiple approaches for different scenarios:

Creating New Documents

Uses docx-js (JavaScript/TypeScript) for building documents from scratch with rich formatting capabilities.

Reading Documents

  • Pandoc: For text extraction and markdown conversion
  • XML Parsing: For detailed structure and metadata access

Editing Documents

  • Document Library (Python): High-level API for common operations
  • Direct XML Editing: For complex scenarios requiring precise control

Document Conversion

  • LibreOffice: For converting documents to PDF
  • Poppler (pdftoppm): For converting PDF pages to images

Workflow Decision Tree

The skill includes intelligent workflow selection:

  • Reading/Analyzing: Text extraction or raw XML access
  • Creating New: Use docx-js workflow
  • Simple Edits: Basic OOXML editing
  • Professional Review: Redlining workflow with tracked changes (recommended for legal, academic, business, or government documents)

Installation & Usage

Activate this skill in Claude Code or any Skills-enabled environment. Claude will automatically access comprehensive documentation including:

  • Complete OOXML editing guide (ooxml.md)
  • Document creation reference (docx-js.md)
  • Tracked changes patterns and best practices
  • Code samples and examples

The skill handles dependency installation automatically, including Pandoc, docx-js, LibreOffice, Poppler, and defusedxml.

Summary

DOCX Skill is an essential tool for working with professional Word documents, providing reliable and sophisticated document operations through multiple specialized workflows. Whether creating new documents, extracting content, or implementing tracked changes for professional review, this skill ensures high-quality results that match industry standards for document processing.

Comments

No comments yet. Be the first to comment!