DOCX Document Toolkit
Paste the following prompt into your AI chat to install this skill:
Please install @org-02qudk26/cn-docx by following https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Many Word tasks get stuck when text extraction is not enough: structure, comments, tracked changes, embedded media, and metadata can be lost if you only copy text or edit raw XML blindly. This skill targets document workflows that need reliable .docx creation, editing, and analysis, turning the process into concrete paths instead of one-off conversion commands.
How It Works and Limits
- Reading: use
pandocto export Markdown for body text and revisions; unpack the package when comments, complex formatting, embedded media, or metadata matter. - Creating: build files with
docx-jsusingDocument,Paragraph, andTextRun, then export withPacker.toBuffer(). - Editing: use the Python Document library for OOXML operations: unpack, modify, save, and repack. For documents from others, or legal, academic, business, and government documents, prefer the tracked-change workflow and batch 3 to 10 related changes.
- Visual enhancement: for new documents or complex concepts, describe schematics in natural language to generate publication-quality figures, saved under
figures/, for workflows, architecture, data flow, and other relationships. - Analyzing: when visual inspection helps, convert to PDF and render pages with
pdftoppmto check layout, pagination, and structure.
Note: plain-text extraction can stay in Markdown, but preserving formatting, comments, and tracked changes requires XML-level work. Do not use Markdown line numbers to locate XML, because they change after edits.
Use Cases
- Review contract changes by batching date, party, and clause edits as deletions and insertions without touching unrelated text.
- Create technical proposals with docx-js, including headings, tables, and explanatory figures, then export them for review.
- Inspect long-document layout by converting DOCX to PDF and rendering pages as JPEG to check headers, pagination, and images.
- Read annotated Word files by exporting Markdown for content, then unpacking XML to locate comments, media, and metadata.
Best For
- Legal or academic editors working on contracts and manuscripts who need tracked changes while preserving original formatting.
- Technical writers delivering formal documents who want script-generated DOCX files with consistent structure and schematics.
- Operations or consulting staff maintaining report templates who need to extract body text, comments, and media for rework.
- Product managers performing document QA who need to render DOCX into page images to check layout, pagination, and visual elements.
Related Skills
Batch-import team weekly reports, aggregate progress, plans, issues, and support by project, flag delivery or resource risks, and generate structured department reports.
Generates Kingdee Cloud ERP startup, implementation, and acceptance documents from Word templates with delivery guidance.
Read PDF, Word, Excel, PowerPoint, HTML, and text documents, list archive files, and extract text or JSON for AI analysis.
Extract decisions and action items from meeting notes, emails, or chat logs, then track owners, deadlines, and follow-ups with lightweight reminders and no direct tool integrations.