docx
Document toolkit (.docx). Create/edit documents, tracked changes, comments, formatting preservation, text extraction, for professional document processing.
Security Assessment
Detected risks:
About docx
The docx skill is a comprehensive toolkit for creating, editing, and analyzing .docx documents. It solves the problem of handling complex Word document tasks, including tracked changes, comments, text extraction, and formatting preservation. This skill enables users to efficiently process professional documents, ensuring high-quality document manipulation and analysis for various industries such as legal, business, and academia. Whether you are working with a new document or editing an existing one, docx simplifies complex workflows and document structures.
Main features of the docx skill include text extraction through markdown conversion, raw XML access for embedded media and metadata, and the ability to preserve document structure. It supports creating new documents via JavaScript/TypeScript with docx-js, provides powerful redlining workflows for document comparison, and includes automatic support for adding scientific schematics to enhance document visual appeal. The skill allows for fine-grained control over tracked changes and comments, making it an essential tool for anyone needing to create or edit Word documents with precision.
This skill is ideal for professionals who need to create, review, or edit official documents such as legal contracts, academic papers, or business reports. It is perfect for users who require high-quality document processing with complex formatting, tracked changes, and comments. Whether you are managing content, analyzing document structure, or generating publication-quality diagrams, the docx skill is designed to meet a wide range of professional needs.
FAQ
How do I extract text from a .docx document?
To extract text from a .docx document, you can convert it to markdown using pandoc. Use the command: `pandoc --track-changes=all path-to-file.docx -o output.md`. This will preserve document structure and show tracked changes.
Can I access raw XML data from a .docx file?
Yes, you can access raw XML data by unpacking the .docx file using `python ooxml/scripts/unpack.py <office_file> <output_directory>`. This allows you to read document structure, comments, embedded media, and metadata.
How do I create a new Word document programmatically?
To create a new Word document programmatically, use the docx-js library. You must first read the entire `docx-js.md` file for detailed syntax and best practices. Then, create the document using JavaScript/TypeScript components such as Document, Paragraph, and TextRun.
What is the recommended workflow for editing someone else's document?
When editing someone else's document, use the redlining workflow, which is the recommended default. This workflow allows you to track changes effectively and is especially suitable for legal, academic, business, or government documents.
What are scientific schematics and when should I add them?
Scientific schematics are diagrams or illustrations that visually represent key concepts, workflows, or relationships in the document. You should add them to enhance the clarity of complex concepts, such as system architecture, process flowcharts, or organizational structures. The docx skill can generate these automatically when creating new documents.
Install docx
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
K-Dense-AI/claude-scientific-skills