One-click install
npx skills add https://github.com/gabrielfruet/.dotfiles --skill docx-gabrielfruet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/gabrielfruet/.dotfiles/tree/main/pi/agent/skills/docx
Command: npx skills add https://github.com/gabrielfruet/.dotfiles --skill docx-gabrielfruet

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Manually creating, editing, and formatting Word .docx files is time-consuming and error-prone, as .docx files are complex ZIP archives containing structured XML that is difficult to modify correctly by hand. This Skill eliminates that hassle by providing automated, validated workflows for all common .docx tasks.

Core Features & Use Cases

  • New Document Generation: Create professional, properly formatted .docx files with custom headings, tables, tables of contents, headers, footers, page numbers, and images using the docx-js library, with built-in validation to ensure compatibility with Word and Google Docs.
  • Existing Document Editing: Modify existing .docx files by unpacking their XML, making tracked changes, adding comments, inserting or replacing images, and repacking with auto-repair and schema validation to avoid corrupting files.
  • Content Extraction & Conversion: Extract text from .docx files (including tracked changes), convert legacy .doc files to .docx format, convert documents to PDF or image sequences, and accept all tracked changes to produce clean final documents.
  • Use Case: If you need to update a vendor contract with tracked changes and comments, generate a formatted quarterly report with a table of contents and data tables, or convert 50 legacy .doc files to .docx for archival, this Skill handles all of these tasks reliably.

Quick Start

Use the docx skill to generate a formatted quarterly sales report with a table of contents, headers, page numbers, and a summary data table from the provided sales data, and save it as a .docx file.

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 tables of contents and custom headers?

Automating Word document generation uses the docx-js library to create professional .docx files with custom headings, tables, tables of contents, headers, footers, page numbers, and images, while built-in validation ensures compatibility with Word and Google Docs.

Can I edit existing .docx files with tracked changes and comments without corrupting the document?

Editing existing .docx files with tracked changes and comments involves unpacking the document XML, making modifications, and repacking with auto-repair and schema validation to prevent file corruption.

What's the best way to convert legacy .doc files to .docx format for archival?

Converting legacy .doc files to .docx format for archival is handled reliably through automated workflows that process the older binary format and output validated .docx files.

Do I need LibreOffice and Poppler to extract text and images from .docx files?

Extracting text and images from .docx files requires pandoc for text extraction and Poppler for image extraction, while LibreOffice is used for PDF conversion and accepting tracked changes to produce clean final documents.

How does modifying .docx XML directly compare to using standard document editing tools?

Modifying .docx XML directly through automated scripts eliminates manual formatting errors by safely unpacking the ZIP archive containing structured XML, making precise edits, and repacking with schema validation, unlike standard document editing tools.

Why does my .docx file break when I manually edit the internal XML structure?

A .docx file breaks when manually editing internal XML because .docx files are complex ZIP archives containing structured XML that is difficult to modify correctly by hand, making automated unpacking, editing, and schema validation necessary to avoid corruption.