docx

Create, edit, and analyze Microsoft Word .docx files with Python and JavaScript libraries.

Updated Nov 9, 2025
One-click install
npx skills add https://github.com/xu-mengnan/bilibili --skill docx-xu-mengnan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/xu-mengnan/bilibili/tree/main
Command: npx skills add https://github.com/xu-mengnan/bilibili --skill docx-xu-mengnan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandoc, docx, libreoffice, poppler, defusedxml.

What problem does it solve?

This Skill eliminates the tedious manual work of creating, editing, and analyzing professional Word documents (.docx files), saving hours of repetitive formatting and content manipulation tasks.

Core Features & Use Cases

  • Document Creation: Build new Word documents from scratch using docx-js with proper formatting, styles, and structure.
  • Tracked Changes & Comments: Implement comprehensive redlining workflows for legal, academic, or business documents with precise XML-level control.
  • Text Extraction & Analysis: Convert documents to markdown or extract raw XML for deep content analysis, preserving structure and formatting.
  • Use Case: Imagine you need to review a 50-page contract with tracked changes. Use this Skill to programmatically apply amendments, add comments, and generate a clean reviewed version without manually editing each section.

Quick Start

Use the docx skill to create a new Word document from the provided content and save it as 'report.docx'.

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 creation and formatting without manual intervention?

Automate Word document creation by using docx-js and OOXML manipulation to generate .docx files with proper formatting, styles, and structure programmatically. This approach eliminates repetitive formatting tasks and builds complete documents from scratch without manual editing.

Can I programmatically apply tracked changes and comments to Word documents for contract review?

Yes, you can implement comprehensive redlining workflows for Word documents by manipulating OOXML at the XML level. This allows precise programmatic application of amendments and comments for legal, academic, or business contract review without manual intervention.

What's the best way to extract text from a .docx file for content analysis?

The best way to extract text from .docx files is converting documents to markdown or extracting raw XML. This preserves document structure and formatting while enabling deep content analysis using pandoc and defusedxml parsing tools.

Do I need pandoc and LibreOffice installed to edit Word documents programmatically?

Yes, editing Word documents programmatically requires pandoc, docx-js, and LibreOffice installed in your environment. These dependencies parse and modify binary document formats, enabling automated document editing and format conversion without manual intervention.

How does OOXML manipulation compare to standard document editing libraries for redlining workflows?

OOXML manipulation provides precise XML-level control for implementing tracked changes and comments, surpassing standard document editing libraries. It enables comprehensive redlining workflows for legal and business documents by directly modifying the underlying document structure.

Why does text extraction from Word documents lose formatting and structure?

Text extraction loses formatting when using basic parsing instead of proper conversion tools. Using pandoc to convert .docx files to markdown or extracting raw XML preserves structure and formatting, ensuring accurate deep content analysis.