docx-advanced

Edit and generate complex .docx files with tracked changes, styles, and docx-js scripting.

7|3|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/BaiGanio/aperio --skill docx-advanced
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx-advanced
Source: https://github.com/BaiGanio/aperio/tree/main/skills/docx-advanced
Command: npx skills add https://github.com/BaiGanio/aperio --skill docx-advanced

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use this skill for complex Word document operations that go beyond simple creation: editing existing .docx files (tracked changes, comments, find-and-replace), inserting or replacing images, custom styles (headings, fonts, page size), footnotes, headers and footers, table of contents, multi-column layouts, numbered lists, bookmarks and hyperlinks, accepting or rejecting revisions, converting .doc to .docx, or when generate_docx is insufficient and a custom docx-js script is needed. Do NOT use for simple document creation — use the docx skill with generate_docx instead.

Core Features & Use Cases

  • Edit existing .docx files including tracked changes and comments
  • Insert or replace images, apply custom styles (headings, fonts, page size), footnotes, headers and footers
  • Table of contents, multi-column layouts, numbering, bookmarks, and hyperlinks
  • Accept or reject revisions, convert .doc to .docx, or invoke custom docx-js scripts when generate_docx is insufficient
  • Use cases include corporate docs, reports with strict formatting, and template-heavy documents

Quick Start

Create or modify a complex Word document using docx-js, including images, custom styles, and headers/footers.

Frequently Asked Questions about docx-advanced

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I edit an existing Word document with tracked changes and comments?

To edit an existing Word document with tracked changes, you can apply revisions and insert comments programmatically. This approach supports accepting or rejecting revisions while ensuring XML-aware operations with safe validations and fallbacks for complex formatting.

What is the best way to add headers, footers, and a table of contents to a docx file?

The best way to add headers, footers, and a table of contents to a docx file is using an advanced document editing workflow. This ensures explicit page size, custom styles, and multi-column layouts are correctly applied throughout the document.

Can I insert and replace images in a Word docx using docx-js scripting?

Yes, you can insert and replace images in a Word docx using optional docx-js scripting. This method is recommended when standard document generation falls short of handling complex formatting and content structures.

Does this approach support converting legacy .doc files to .docx format?

Yes, this approach supports converting legacy .doc files to .docx format. It handles complex formatting during conversion, ensuring explicit page size and style overrides are preserved with safe validations and fallbacks.

When should I use advanced Word document editing instead of simple document creation?

Use advanced Word document editing for complex operations like modifying existing files, applying tracked changes, or adding custom styles. For simple document creation without complex formatting requirements, use standard generation tools instead.

Why does my Word document lose custom styles and numbering when generated programmatically?

Word documents may lose custom styles and numbering if the generation process lacks XML-aware operations and explicit style overrides. Using an advanced workflow with safe validations ensures headings, fonts, and multi-column layouts are properly maintained.