docx

Create, edit, and analyze Word .docx documents with docx-js and pandoc.

96|1|Updated Jun 4, 2026
One-click install
npx skills add https://github.com/langbyyi/CyberStrikeAI-SRC --skill docx-langbyyi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx
Source: https://github.com/langbyyi/CyberStrikeAI-SRC/tree/main/skills/docx
Command: npx skills add https://github.com/langbyyi/CyberStrikeAI-SRC --skill docx-langbyyi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires defusedxml, lxml, and includes scripts (resource) components.

What problem does it solve?

This Skill eliminates the tedious manual work of creating, editing, and analyzing Word documents. It handles everything from generating formatted reports and memos to accepting tracked changes and extracting content, ensuring professional results without fighting with Word's XML internals.

Core Features & Use Cases

  • Document Generation: Create new .docx files with proper formatting, styles, tables, headers, footers, and table of contents using JavaScript and docx-js.
  • Document Editing: Modify existing documents by unpacking XML, making precise edits, and repacking with validation—including support for tracked changes and comments.
  • Content Extraction: Convert .docx files to text, markdown, or images using pandoc and LibreOffice for quick analysis.
  • Use Case: A security consultant needs to generate a formatted penetration test report with a table of contents, headings, and embedded screenshots. This Skill automates the entire document assembly and formatting process.

Quick Start

Use the docx skill to create a professionally formatted Word document from the provided content with headings, tables, and page numbers.

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 for formatted reports?

Automating Word document generation involves using docx-js to create .docx files with formatted styles, tables, headers, footers, and table of contents. This eliminates manual formatting and ensures professional report assembly without interacting with Word's XML internals.

Can I extract text and images from existing .docx files for analysis?

Yes, you can extract text and images from .docx files for analysis by converting documents to text, markdown, or images. This content extraction process utilizes pandoc and LibreOffice to quickly transform Word documents into accessible formats.

How do I manage tracked changes and comments in a Word document programmatically?

Managing tracked changes and comments programmatically requires unpacking the Word document's XML, making precise edits to the revision structures, and repacking the file. Custom Python validation scripts ensure schema compliance and XML integrity during this modification process.

Does this document automation approach require LibreOffice and pandoc to convert .docx files?

Yes, converting .docx files to text, markdown, or image formats requires pandoc and LibreOffice. These dependencies handle the document conversion and text extraction, while defusedxml and lxml manage the underlying XML validation and parsing.

What is the best way to modify an existing Word document without breaking its XML structure?

The best way to modify an existing Word document without breaking its XML structure is to unpack the .docx file, apply targeted edits to the XML, and repack it using custom Python validation scripts to ensure schema compliance and XML integrity.

What are the limitations of using docx-js for document generation and editing?

Using docx-js for document generation handles creating new formatted files, but editing existing documents requires unpacking and repacking XML with custom Python validation. Complex modifications to established files may face structural constraints if schema compliance is not maintained.