Skip to content
Back to skills

Docx Toolkit

ASecurity

Comprehensive document creation, editing, and analysis for Word documents (.docx) with support for tracked changes, comments, and formatting preservation.

  • 7 stars
  • 0 votes
  • 1 copy
  • 10 views
  • Added September 3, 2026
toolsjavascriptpythonjavabash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 3, 2026

npx -y skills add mediar-ai/skillhubz --skill docx-toolkit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docx Toolkit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docx Toolkit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mediar-ai-docx-toolkit/badge)](https://www.skillsdirectory.com/skills/mediar-ai-docx-toolkit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# DOCX Toolkit

Comprehensive document creation, editing, and analysis for Word documents (.docx) with support for tracked changes, comments, and formatting preservation.

## Prerequisites

- pandoc (for text extraction)
- docx-js (npm) for creating new documents
- Python with defusedxml for editing

## Instructions

### Reading/Analyzing Content

1. **Text Extraction with pandoc**
   ```bash
   pandoc --track-changes=all document.docx -o output.md
   ```

2. **Raw XML Access** (for comments, formatting, metadata)
   ```bash
   python ooxml/scripts/unpack.py document.docx output_dir
   ```
   Key files: `word/document.xml`, `word/comments.xml`, `word/media/`

### Creating New Documents

Use **docx-js** (JavaScript):
```javascript
import { Document, Paragraph, TextRun } from 'docx';

const doc = new Document({
  sections: [{
    children: [
      new Paragraph({ children: [new TextRun("Hello World")] })
    ]
  }]
});
```

### Editing Existing Documents

1. Unpack: `python ooxml/scripts/unpack.py file.docx dir`
2. Edit XML files using Document library
3. Pack: `python ooxml/scripts/pack.py dir file.docx`

### Redlining Workflow (Tracked Changes)

For legal, academic, business docs - use minimal, precise edits:
```python
# Only mark text that actually changes
# Preserve original run's RSID for unchanged text
```

1. Get markdown: `pandoc --track-changes=all file.docx -o current.md`
2. Identify and group changes (3-10 per batch)
3. Map text to XML, implement changes
4. Pack and verify

## Error Handling

- If password-protected, use decryption tools first
- Validate XML after each edit before packing
- Test tracked changes in Word to verify rendering

## Notes

- Tracked changes: `<w:ins>` (insertions), `<w:del>` (deletions)
- Convert to images: soffice → PDF → pdftoppm

Source: anthropics/skills

Files in this skill

  • manifest.json354 B
  • skill.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.