docx

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

34.3k|3.0k|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/agentscope-ai/CoPaw --skill docx-agentscope-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/agentscope-ai/CoPaw/tree/main/src/copaw/agents/skills/docx
Command: npx skills add https://github.com/agentscope-ai/CoPaw --skill docx-agentscope-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the creation, editing, and manipulation of Microsoft Word documents (.docx files), automating complex formatting and content management tasks.

Core Features & Use Cases

  • Document Creation: Generate new Word documents from scratch using programmatic control over text, tables, images, and formatting.
  • Content Editing: Modify existing .docx files, including find-and-replace, accepting tracked changes, and managing comments.
  • Advanced Formatting: Implement features like tables of contents, page numbers, headers/footers, and custom styles.
  • Use Case: Automatically generate a monthly report in .docx format, incorporating data from various sources, applying a company letterhead, and including a table of contents and page numbers.

Quick Start

Use the docx skill to create a new Word document with a title and a paragraph.

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 custom formatting?

Automate Word document generation by using the docx-js library to programmatically control text, tables, images, headers, footers, and custom styles to create new .docx files from scratch.

Can I accept tracked changes and modify existing .docx files programmatically?

Yes, you can modify existing .docx files by performing find-and-replace operations, managing comments, and accepting tracked changes through automated command-line tools.

Do I need LibreOffice to convert .docx files to other formats?

Yes, converting between formats and performing advanced manipulation on .docx files requires installing the docx npm package alongside LibreOffice for advanced command-line operations.

What is the best way to add a table of contents and page numbers to a .docx file?

The best way to add a table of contents and page numbers is by using the docx-js library to implement advanced document formatting and manage structural elements programmatically.

How does pandoc work with .docx files for content extraction?

Pandoc works as a command-line tool to extract text and convert between different document formats, streamlining content management and manipulation tasks for .docx files.