docx

Create and edit .docx files using docx-js and LibreXML.

Updated May 15, 2026
One-click install
npx skills add https://github.com/dawsonblock/agent_eval_skills_merged_clean --skill docx-dawsonblock
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/dawsonblock/agent_eval_skills_merged_clean/tree/main/agent-skills-curated/skills/pdf-and-documents/docx
Command: npx skills add https://github.com/dawsonblock/agent_eval_skills_merged_clean --skill docx-dawsonblock

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docx, LibreOffice, Pandoc, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating, editing, and analyzing Word documents, saving you time and effort in document management.

Core Features & Use Cases

  • DOCX Creation: Build new documents using JavaScript and the docx-js library.
  • Document Editing: Modify existing .docx files using XML manipulation and LibreOffice.
  • Use Case: Need to create a comprehensive business report? Use this Skill to easily format the document, add tables and images, and apply styles consistently.

Quick Start

To create a new .docx document, use the following JavaScript code:

const { Document, Packer, Paragraph, TextRun } = require('docx');
const doc = new Document();
doc.addParagraph('Hello World!');
Packer.toBuffer(doc).then(buffer => fs.writeFileSync('output.docx', buffer));

Frequently Asked Questions about docx

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

FAQPage Schema
How do I generate a DOCX file using JavaScript?

You can create a DOCX file using JavaScript by leveraging the docx-js library to build document structures like paragraphs and text runs programmatically. It outputs a buffer that you write directly to a .docx file.

Can I modify an existing Word document without breaking the formatting?

Yes, you can modify an existing Word document by directly manipulating its underlying XML structure and processing it through LibreOffice. This ensures that document formatting remains intact while applying targeted edits.

What's the best way to extract data from a DOCX file for analysis?

To extract data from a DOCX file, use Pandoc to process the document text and convert its content into structured formats. This enables efficient analysis and extraction of information trapped within the Word document.

Do I need LibreOffice and Pandoc installed to edit DOCX files?

Yes, LibreOffice and Pandoc are required dependencies for editing DOCX files. LibreOffice handles XML manipulation for modifying existing files, while Pandoc manages the text processing required for document analysis.

Does this DOCX creation method support both A4 and US Letter page sizes?

Yes, DOCX creation supports both A4 and US Letter page sizes. You can configure these dimensions along with landscape and portrait orientations to meet specific document formatting requirements.

How do I add tables and images when creating a business report in DOCX?

To add tables and images when creating a business report in DOCX, use the docx-js library to programmatically define these elements within your document structure. This ensures consistent styling and automated placement.