word-document-processor — Claude Code skill for .docx files
A skill for .docx work: extract text, build documents from scratch, and edit existing files with tracked changes. Useful when the agent has to touch someone else's contract.
npx skills add qodex-ai/ai-agent-skills --skill word-document-processor -a claude-codeWhat word-document-processor does
The skill covers three jobs: read a .docx, create a new one, and edit an existing one. For reading, text goes out to markdown through pandoc with --track-changes=all, so insertions and deletions stay visible. Comments, embedded images and metadata need raw XML instead: unpack with python ooxml/scripts/unpack.py <office_file> <output_directory> and read the parts directly. Main content sits in word/document.xml, comments in word/comments.xml, media in word/media/, and tracked changes use <w:ins> and <w:del> tags.
New documents are built with docx-js. You write a JavaScript or TypeScript file out of Document, Paragraph and TextRun components, then export through Packer.toBuffer(). Editing goes through the Python Document library, which handles the unpack and pack steps and still lets you reach the DOM when a case gets messy. Either way the skill insists you read docx-js.md or ooxml.md in full first.
Reviewing someone else's document is its own path. Changes get planned in markdown, then applied to OOXML in batches of 3–10, with each batch tested before the next one starts. Only the text that actually changes gets marked; unchanged runs keep their original RSID, because a redline full of untouched words is painful to review. For legal, academic, business and government documents this path is required. Install runs through npx skills add, and the license is proprietary.
What it helps with
- pull text out of a .docx into markdown
- generate a new document from JavaScript
- redline a contract with tracked changes
- extract comments and images from the XML
- split a review into testable batches
Example prompts for the agent
- read this .docx and show me the tracked changes
- create a document with a heading and a table using docx-js
- edit section 3.2 and leave the changes as tracked changes
How to install word-document-processor
1Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill word-document-processor -a claude-code2Manually: put the files in place
~/.claude/skills/word-document-processor/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/word-document-processor/
1Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill word-document-processor -a codex2Manually: put the files in place
.agents/skills/word-document-processor/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill word-document-processor -a cursor2Manually: put the files in place
.cursor/skills/word-document-processor/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install qodex-ai/ai-agent-skills word-document-processor2Manually: put the files in place
.github/skills/word-document-processor/SKILL.md1Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill word-document-processor -a gemini-cli2Platform CLI
gemini skills install https://github.com/qodex-ai/ai-agent-skills --path skills/word-document-processorManually: put the files in place
.devin/skills/word-document-processor/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add qodex-ai/ai-agent-skills --skill word-document-processor -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about word-document-processor
How do I install word-document-processor in Claude?
Run npx skills add qodex-ai/ai-agent-skills --skill word-document-processor -a claude-code. The skill lands in ~/.claude/skills/word-document-processor/SKILL.md.
What does word-document-processor do?
It reads, creates and edits .docx files. Edits can be tracked changes, and it also handles comments, metadata and embedded media.
What does the skill need to run?
pandoc for reading, docx-js for creating documents, and the Python Document library plus ooxml/scripts/unpack.py and ooxml/scripts/pack.py for editing.