- Home
- Skills
- Jst Well Dan
- Skill Box
- Document Skills Docx
document-skills-docx_skill
- Python
7
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill jst-well-dan/skill-box --skill document-skills-docx- LICENSE.txt1.4 KB
- SKILL.md10.0 KB
Overview
This skill provides comprehensive creation, editing, and analysis of .docx documents with full support for tracked changes, comments, formatting preservation, and text extraction. It guides workflows for creating new documents, performing precise edits (including redlining), unpacking/raw XML access, and converting documents to images for visual review. The focus is on safe, auditable edits and preserving professional formatting.
How this skill works
For simple reading, the skill recommends extracting text and tracked changes via pandoc to a markdown representation. For structural tasks—comments, tracked changes, media, and metadata—it unpacks the .docx ZIP and exposes the raw OOXML files (e.g., word/document.xml, word/comments.xml). Creation uses a docx-js workflow; editing uses a Python Document library with optional direct DOM manipulation. For reviews, a redlining workflow plans changes in markdown, implements them in batches, and preserves RSIDs and runs to minimize noise.
When to use it
- Create a new professional .docx from templates or structured content
- Make precise edits to existing documents while preserving formatting
- Implement or review tracked changes and comments (redlining)
- Extract clean text or convert tracked changes to markdown for review
- Access comments, embedded media, or other raw XML structures
- Convert pages to images for visual QA or review
Best practices
- Always convert to markdown with pandoc for initial review when possible (pandoc --track-changes=all)
- Unpack the .docx and read word/document.xml before making structural edits
- Group edits into batches of 3–10 related changes and test each batch
- When marking tracked changes, only mark the minimal changed text and preserve original <w:r> runs and RSIDs
- Use the Document library for high-level edits and drop to raw XML only when necessary
- Perform a final verification by converting the result to markdown and grepping for original/replacement phrases
Example use cases
- Update contract dates and party names across a multi-section agreement using redlining
- Add reviewer comments and tracked edits to a government or academic manuscript
- Extract a clean markdown version of a report while preserving tracked changes for audit
- Create a new branded proposal .docx programmatically with docx-js
- Convert a long .docx to images for slide-style visual QA or print previews
FAQ
Unpack when you need comments, embedded media, exact run-level edits, RSID preservation, or other XML-level details that high-level APIs cannot expose.
How do I ensure tracked changes look clean and professional?
Only mark the exact text that changes, preserve surrounding runs and RSIDs, and implement edits in small batches to validate formatting and scope.