Create, edit, and analyze Word documents with tracked changes support
The DOCX skill provides comprehensive Word document manipulation capabilities for Claude Code, enabling document creation, editing with tracked changes (redlining), text extraction, and complex OOXML operations. This is the third Office skill integrated into amplihack, building on the common OOXML infrastructure established in PR #3.
The DOCX skill follows amplihack's brick philosophy:
python ../common/verification/verify_skill.py docxExample conversation:
User: Create a Word document with a title, 3 sections, and a table
Claude: [Uses DOCX skill with docx-js to create structured document]
Use docx-js (JavaScript/TypeScript) to create documents from scratch:
import { Document, Paragraph, TextRun, Packer } from "docx";
const doc = new Document({
sections: [
{
properties: {},
children: [
new Paragraph({
children: [new TextRun({ text: "Hello World", bold: true })],
}),
],
},
],
});
const buffer = await Packer.toBuffer(doc);
fs.writeFileSync("output.docx", buffer);
The redlining workflow is the recommended default for editing any document, especially legal, academic, business, or government docs:
pandoc --track-changes=all document.docx -o current.mdpython ooxml/scripts/unpack.py document.docx unpacked/python ooxml/scripts/pack.py unpacked/ reviewed.docxpandoc --track-changes=all reviewed.docx -o verification.mdKey Principle: Minimal, precise edits - only mark text that actually changes, preserve original formatting for unchanged text.
Use pandoc for quick text extraction with structure preservation:
pandoc document.docx -o output.md
pandoc --track-changes=all document.docx -o with-changes.md
For complex operations (comments, advanced formatting, metadata):
# Unpack document
python ooxml/scripts/unpack.py document.docx unpacked/
# Read XML files
cat unpacked/word/document.xml # Main document content
cat unpacked/word/comments.xml # Comments
ls unpacked/word/media/ # Embedded images
# Pack when done
python ooxml/scripts/pack.py unpacked/ output.docx
The DOCX skill requires both Python and Node.js dependencies:
Required (Core functionality):
Optional (Enhanced functionality):
See DEPENDENCIES.md for detailed installation instructions.
Run tests to verify the skill:
cd .claude/skills/docx
pytest tests/ -v
Tests will skip gracefully if dependencies are not installed, showing which features are available.
See examples/example_usage.md for common workflows:
This integration follows amplihack's core principles:
Skill not recognized:
ls -la ooxml/ should show link to ../common/ooxmlImportError for defusedxml:
python ../common/verification/verify_skill.py docxpip install defusedxmlPandoc not found:
sudo apt-get install pandoc (Ubuntu) or brew install pandoc (macOS)pandoc --versionPack script fails validation:
soffice --version--force flag to skip validation: python ooxml/scripts/pack.py unpacked/ output.docx --forceTracked changes not appearing:
<w:ins> and <w:del> tag structureSymlink not working (Windows):
This skill is sourced from Anthropic's official skills repository. For issues:
The DOCX skill is provided by Anthropic under their proprietary license. See SKILL.md and Anthropic's LICENSE.txt for complete terms. The amplihack integration code (this README, DEPENDENCIES.md, tests, examples) follows amplihack's license.
Integration Status: Complete (PR #3) Last Updated: 2025-11-08 Maintained By: amplihack project
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer