docx

Create, edit, and manipulate Word documents with docx-js, pandoc, and LibreOffice.

641|104|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/eastreams/loong --skill docx-eastreams
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/eastreams/loong/tree/main/skills/anthropic-office/docx
Command: npx skills add https://github.com/eastreams/loong --skill docx-eastreams

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Users need to produce, modify, and extract content from Word documents (.docx) with precise formatting, tables, images, and tracked changes, a task that is time‑consuming without automation.

Core Features & Use Cases

  • Document Creation: Generate .docx files from JavaScript using docx-js with explicit page size and style overrides.
  • Content Extraction: Convert .docx to markdown via pandoc or unpack XML for direct text access.
  • Editing & Tracking: Unpack, edit XML, manage tracked changes, comments, and accept changes through LibreOffice scripts.
  • Conversion: Transform .docx to PDF or images using LibreOffice, then to JPEG via pdftoppm.
  • Use Cases: Quickly create reports, letters, or templates with tables of contents; extract and reorganize content from existing documents; insert or replace images while preserving formatting.

Quick Start

Ask the docx skill to generate a formatted report titled “Quarterly Summary” with a table of contents.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I automate Word document generation with professional formatting and tables of contents?

Generate Word documents by using docx-js to create .docx files with explicit page sizes, style overrides, tables of contents, and embedded images. This automates the creation of professionally formatted reports, letters, and templates without manual formatting.

What is the best way to extract text and content from an existing .docx file?

Extract .docx content by converting documents to markdown using pandoc or unpacking the XML structure for direct text access. This enables efficient content reorganization and retrieval of tables, images, and text from existing Word files.

Can I manage tracked changes and comments in a .docx file without opening Microsoft Word?

Manage tracked changes without Microsoft Word by unpacking the .docx XML, editing it directly, and running LibreOffice scripts to accept changes, manipulate comments, and control document tracking states programmatically for automated document review workflows.

How do I convert a Word document to PDF or images for visual review?

Convert Word documents to PDF or images using LibreOffice for the initial conversion, then process the output to JPEG format using pdftoppm. This transforms .docx files into static visual formats suitable for sharing, presentation, or archival purposes.

Does this approach work for inserting and replacing images while preserving the original formatting?

Insert or replace images while preserving formatting by unpacking the .docx file, manipulating its XML structure, and repacking the document. This ensures that image modifications maintain the surrounding layout, styles, and professional formatting of the existing Word document.

Do I need LibreOffice and pandoc installed to use this Word document automation skill?

LibreOffice and pandoc are required dependencies for this Word document automation skill. LibreOffice handles conversions and change management, while pandoc manages content extraction to markdown, and docx-js is used for the initial document creation process.