docx

Create and edit .docx files with formatting and content operations.

134|33|Updated Nov 22, 2025
One-click install
npx skills add https://github.com/kv0906/pm-kit --skill docx-kv0906
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/kv0906/pm-kit/tree/main/.claude/skills/docx
Command: npx skills add https://github.com/kv0906/pm-kit --skill docx-kv0906

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandoc, docx, LibreOffice, Poppler, and 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), eliminating the need for manual intervention in complex formatting and content management tasks.

Core Features & Use Cases

  • Document Generation: Create new .docx files from scratch using JavaScript, including complex layouts, tables, lists, and styling.
  • Content Editing: Modify existing .docx files by unpacking, editing XML, and repacking, including handling tracked changes and comments.
  • Format Conversion: Convert between document formats (e.g., .doc to .docx) and extract content into other formats (e.g., Markdown).
  • Use Case: Automatically generate a professional report with a table of contents, specific page sizing, and custom headers/footers based on provided data.

Quick Start

Use the docx skill to create a new document with a title and a single 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 like tables of contents and page numbers?

Automating Word document generation is handled by creating new .docx files from scratch using JavaScript, including complex layouts, tables, lists, headings, and custom page numbers. You can generate professional reports with specific page sizing and custom headers or footers based on provided data.

How do I edit an existing .docx file to insert images and perform find-and-replace operations?

Editing an existing .docx file is done by unpacking the document, modifying its underlying XML structure, and repacking it. This approach allows you to perform find-and-replace operations, insert or replace images, and reorganize content directly within the Word document.

Can I convert legacy .doc files to .docx format and extract content into Markdown?

Converting legacy .doc files to .docx format is fully supported, along with extracting document content into other formats like Markdown. The Skill leverages tools such as pandoc and LibreOffice to handle format conversion and transform content into polished Word documents.

Does this approach support working with tracked changes and comments in Word documents?

Working with tracked changes and comments in Word documents is supported during content editing. When you unpack and modify the .docx XML structure, you can manipulate tracked changes and comments natively, ensuring revisions remain intact throughout the editing process.

Do I need pandoc and LibreOffice installed to manipulate Word documents effectively?

Installing pandoc and LibreOffice is required to utilize the full range of document manipulation features. These dependencies enable format conversion, legacy .doc to .docx upgrading, and content extraction, while docx-js handles direct generation and XML editing.

What is the best way to extract and reorganize content from a .docx file without losing formatting?

The best way to extract and reorganize .docx content without losing formatting is unpacking the file and editing its XML structure directly. This method preserves the original styling and layout while allowing precise content manipulation before repacking the document.