docx

Create and edit .docx files using docx-js and XML manipulation.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/marcusfelix/barney --skill docx-marcusfelix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/marcusfelix/barney/tree/main/src/prompts/skills/docx
Command: npx skills add https://github.com/marcusfelix/barney --skill docx-marcusfelix

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the creation and modification of Word documents (.docx), handling everything from basic text generation to complex formatting, tracked changes, and comments.

Core Features & Use Cases

  • Document Generation: Create new .docx files from scratch using JavaScript (docx-js).
  • Content Manipulation: Read, edit, and update existing .docx files by directly manipulating their XML structure.
  • Tracked Changes & Comments: Add, accept, or reject tracked changes and insert comments, adhering to specific authoring conventions.
  • Use Case: Automatically generate a client report in .docx format, incorporating data tables, specific formatting, and tracked changes for review.

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 specific formatting and tables?

Automate Word document generation by using JavaScript with the docx-js library to create .docx files featuring specific formatting, tables, lists, images, and headers. This approach programmatically builds structured documents tailored to your exact specifications.

Can I add, accept, or reject tracked changes and comments in a .docx file?

Yes, you can manage tracked changes and comments in a .docx file by directly manipulating its underlying XML structure. This method allows you to insert, accept, or reject revisions and add comments while adhering to specific authoring conventions.

What is the best way to edit existing Word documents programmatically?

The best way to edit existing Word documents programmatically is by directly manipulating their internal XML structure. This method allows you to read, edit, and update .docx file contents with precise control over formatting and document elements.

Do I need pandoc and poppler-utils to convert and validate Word documents?

Yes, pandoc and poppler-utils are required dependencies for converting legacy .doc files to the .docx format and for validating generated files. These tools ensure compatibility and structural integrity across your Word document processing pipeline.

How does direct XML manipulation help with Word document formatting?

Direct XML manipulation helps with Word document formatting by allowing precise editing of a .docx file's internal structure. This technique enables granular control over complex formatting, tracked changes, and comments that high-level libraries might not fully expose.