DOCX Document Processing Skill
Create, edit, and analyze .docx files with support for track changes, comments, and formatting preservation.
The skill performs local document processing without network exfiltration or dangerous operations. However, there is no explicit user confirmation mechanism, such as asking before large edits or deletions, and no mention of data confidentiality for sensitive documents. Third-party dependencies like soffice may have security risks, but no isolation measures are specified. The inclusion of defusedxml indicates security awareness, but permission and confirmation mechanisms are incomplete, hence 12.
The skill provides detailed workflows and scripts, but they have not been executed in this static review. Dependencies (pandoc, docx, LibreOffice) may be missing, and error handling is basic. Scripts like pack.py have some error handling, but overall failure feedback is limited. Due to static limitations, key-path reproduction cannot be verified, hence 7.
The skill clearly defines applicable scenarios (create, edit, analyze docx) with a decision tree. However, boundaries are not explicitly declared, such as limitations on complex document features. Environment fit is not fully assessed, and network reachability for mainland China is not addressed. Documentation is primarily English, with Chinese support unclear, hence 10.
Documentation is well-structured with sections and examples, and dependencies are listed. However, the license is declared as Proprietary in the skill, conflicting with the repo's Apache-2.0, and there is no versioning or changelog. Maintenance responsibility is not clear, hence 10.
The skill provides complete workflows and examples, theoretically achieving document tasks. However, there is no evidence of tested outputs, and static evaluation cannot confirm direct usability. Marginal value over alternatives is uncertain, hence 7.
There are auditable scripts (pack.py, unpack.py, validate.py), but no test suites or CI for this skill. Key claims lack independent corroboration, and static review cannot confirm reproduction, hence 5.
- Static review only; no code execution. Validate scripts and dependencies in a real environment.
- License mismatch: skill header says Proprietary while repo is Apache-2.0; clarify before use.
- Dependencies like LibreOffice may not be pre-installed, and installation could be difficult under network restrictions.
- Skill edits documents; if handling sensitive content, execute in an isolated environment with explicit data protection.
What does this skill do, and when should you use it?
This skill provides a comprehensive workflow for handling Word documents (.docx). It leverages the OOXML structure to extract text, create new documents, perform basic edits, and enable collaborative document review with tracked changes. The skill includes scripts for unpacking and repacking documents, plus Python Document and docx-js libraries for programmatic manipulation. It is especially suited for professional scenarios requiring precise change tracking.
It can read document content (via pandoc to markdown or direct XML unpacking), create new documents (using docx-js), edit existing documents (using the Python Document library for simple modifications or complex OOXML operations), manage tracked changes (insert/delete marks), and convert documents to images for visual analysis (via LibreOffice and pdftoppm).
- Users needing to quickly extract text from a document while preserving structure.
- Developers who want to generate formatted Word files from scratch.
- Office workers who need to modify contracts or reports with minimal invasiveness.
- Legal or academic reviewers who need to mark changes on shared documents.
- Analysts who need to convert Word pages to images for visual inspection.
What are this skill's strengths and limitations?
- Comprehensive document handling: creation, editing, redlining, comments, extraction.
- Enforces best-practice workflows (e.g., redlining for others' documents).
- Includes a detailed decision tree to pick the right method for the task.
- Provides practical scripts (unpack.py, pack.py) for robust OOXML manipulation.
- Allows raw XML access for advanced scenarios.
- Proprietary license; not covered by the repo's Apache-2.0 license.
- Requires installation of multiple external dependencies (pandoc, LibreOffice, Node.js, etc.).
- High technical barrier for complex edits, requiring knowledge of OOXML and XML manipulation.
- Testing on non-Linux platforms (e.g., Windows, macOS) is not documented; commands are primarily Linux-styled.
- No automated test suite is provided to verify robustness across different document structures.
How do you install this skill?
Clone the repository from GitHub (https://github.com/modelscope/ms-agent); the skill resides at examples/skills/claude_skills/docx/. Install dependencies as needed: pandoc, npm package 'docx', Python package 'defusedxml', LibreOffice, and poppler-utils.
How do you use this skill?
Place the SKILL.md and its associated files in your agent's skill directory. Then, request with descriptive language, e.g., 'Read the file report.docx and extract the text' or 'Modify clause 12 in agreement.docx with tracked changes.' The skill selects the appropriate workflow: extraction, creation, editing, or redlining.