docx

Create, edit, and analyze .docx files using docx-js and LibreOffice.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/cpfcoaching/glowing-palm-tree --skill docx-cpfcoaching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/cpfcoaching/glowing-palm-tree/tree/main/skills-library/docx
Command: npx skills add https://github.com/cpfcoaching/glowing-palm-tree --skill docx-cpfcoaching

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docx-js, libreoffice, poppler, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies the creation, editing, and analysis of .docx files by providing robust scripting and validation tools. It streamlines document generation, manipulation, and formatting for professionals.

Core Features & Use Cases

  • Document Creation: Generate .docx files with custom formatting, styles, and page sizes using JavaScript and the docx-js library.
  • Document Editing: Edit existing .docx files by unpacking, modifying XML, and repacking.
  • Content Analysis: Extract text, convert documents to images, and manage tracked changes.
  • Use Case: When you need to create a professional report or memo with tables, headings, and page numbers, this Skill can automate the process and ensure consistency.

Quick Start

To convert a document to .docx format, use the following command:

python scripts/office/soffice.py --headless --convert-to docx document.doc

Frequently Asked Questions about docx

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

FAQPage Schema
How do I automate .docx document creation with custom formatting and styles?

You can automate .docx document creation by using the docx-js library to define custom formatting, styles, tables, and page sizes programmatically. This ensures consistent professional report generation without manual formatting.

Can I edit existing .docx files and modify their internal XML structure?

Yes, you can edit existing .docx files by unpacking the document, directly modifying the underlying XML code, and repacking it. This approach enables precise content manipulation and structural changes.

What dependencies do I need to convert and analyze .docx files?

To convert and analyze .docx files, you need docx-js for manipulation, LibreOffice for format conversion, and Poppler for converting documents to images and managing content extraction.

Does LibreOffice work for converting older .doc files to .docx format?

Yes, LibreOffice can convert older .doc files to .docx format. You execute a headless conversion command using the soffice script to automate the office format migration process.

What is the best way to extract text and convert .docx documents to images?

The best way to extract text and convert .docx documents to images is by utilizing Poppler alongside LibreOffice. These tools parse the document structure and render pages visually for analysis.

Are there limitations when unpacking and modifying .docx XML directly?

When unpacking and modifying .docx XML directly, you must validate the document structure afterward to maintain compatibility with various office suites, as improper XML edits can corrupt the file.