docx

Create and edit .docx files with docx-js and pandoc.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/caoronglin/copaw-skills --skill docx-caoronglin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/caoronglin/copaw-skills/tree/main/skills/docx
Command: npx skills add https://github.com/caoronglin/copaw-skills --skill docx-caoronglin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires docx, pandoc, libreoffice, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the creation and modification of Word documents, eliminating the need for manual formatting and complex operations.

Core Features & Use Cases

  • Document Creation: Generate new .docx files from scratch using JavaScript.
  • Tracked Changes: Accept or reject tracked changes within existing documents.
  • Use Case: Automatically generate a client report in .docx format, including tables, images, and specific formatting, based on provided data.

Quick Start

Use the docx skill to create a new document with the title 'Project Proposal'.

Frequently Asked Questions about docx

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

FAQPage Schema
How do I automatically generate a Word document with complex formatting?

You can generate Word documents with complex formatting like lists, tables, and images using JavaScript via the docx-js library. It configures explicit page sizes, headers, footers, and tables of contents automatically from provided data.

Can I convert a .doc file to .docx format for editing?

Yes, you can convert older .doc files to .docx format. The conversion process relies on LibreOffice integration, allowing subsequent text extraction and editing using pandoc and docx-js.

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

The best way to extract text from a .docx file is using pandoc. This approach efficiently pulls text content from the document, enabling further analysis or automated processing within your workflow.

How do I accept tracked changes in an existing Word document?

You can accept or reject tracked changes in existing Word documents through LibreOffice integration. This handles modification review programmatically without requiring manual intervention in a word processor.

Does this approach support exporting Word documents to PDF?

Yes, exporting Word documents to PDF is fully supported. The process uses LibreOffice integration to convert the generated or edited .docx files directly into PDF format for final distribution.

Do I need LibreOffice to manage headers and footers in .docx files?

No, managing headers and footers in .docx files is handled natively by the docx-js library. LibreOffice is only required for accepting tracked changes, .doc to .docx conversion, and PDF export.