Word Document Assistant
Paste the following prompt into your AI chat to install this skill:
Please install @org-02qudk26/docx-nt into your AI assistant by following the guide at https://skillhub.cn/install/skillhub.md.
About this skill
Problem
When generating or changing Word files, the hard part is not the visible text: page setup, table widths, TOC, tracked changes, comments, and text split across multiple XML runs can all produce documents that open but render incorrectly. Direct .docx work also needs separate paths for creating, editing, and reading.
How it works
The skill selects a task-based workflow:
- Create new files: use the preinstalled docx npm script, while handling common pitfalls such as A4 defaults, landscape orientation, DXA column widths, ShadingType.CLEAR, bullets, and page breaks.
- Edit existing files: unzip, patch word/document.xml, then repackage; use merge_runs.py to merge adjacent same-format runs so cross-run phrases are easier to find.
- Read content: convert with pandoc -t markdown file.docx into text for analysis.
- Tracked changes and comments: helper scripts write the cross-referenced comment files and print anchor snippets for document.xml; accept_changes.py can produce an accepted copy.
- Verify output: render pages with pdftoppm and inspect TOC, tables, page numbers, and deleted paragraphs.
Boundaries and cautions
It assumes pandoc, LibreOffice, and Poppler are available; legacy .doc files must be converted first. This is not a graphical Word add-in or a general layout designer, and unvalidated XML edits should not be shipped without visual checks.
Use Cases
- Create script-generated Word reports with TOCs and tables.
- Patch cross-run text in existing .docx after merging runs.
- Convert .docx to Markdown for body-text review or summaries.
- Add contract comments and verify anchors target the text.
Best For
- Frontend engineers: output Word files with page setup, TOC, and tables from Node scripts.
- Document engineers: patch .docx XML, cross-run text, and comment anchors after unzipping.
- Legal or operations staff: batch-generate contracts and validate tracked changes, comments, deletions.
- Data analysts: extract body text and table notes from .docx by converting to Markdown.
Related Skills
Turns files, references, or chat context into styled single-page HTML reports with built-in templates and preset themes.
An engineering-oriented email automation solution for batch sending, Jinja2 templates, attachments, scheduled sending, inbox monitoring, and rule-based auto-reply.
An engineering workflow for creating, editing, reviewing, analyzing, and image-converting .docx files using pandoc, docx-js, OOXML, and LibreOffice.
Pre-submission scanner for Word/PDF blind-bid files that checks margins, fonts, page numbers, and metadata against tender requirements and flags residual bidder identities.