Skip to content

Guide · Agent skill

How to Use the docx Word Document Agent Skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The docx skill teaches an AI agent how to create, read, edit and review Word (.docx) files, using bundled Python helper scripts and the docx npm package. This guide explains what the skill does, how to install it, how to trigger it with normal requests, and what you need on your machine before it works. By the end you will be able to get a usable Word file from an agent and know which checks to run on it.

Word Document Creator and Editoreigent-ai/eigent · Apache-2.0

Quick start

  1. 1Install the prerequisites. Install Node.js, then run npm install -g docx. Install Python 3 with defusedxml, LibreOffice, pandoc and poppler so that pdftoppm is available.
  2. 2Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder so the docx folder sits inside it.
  3. 3Or upload it in the Claude apps. In the Claude apps, open Settings, then Capabilities, then Skills, and upload the skill.
  4. 4Ask for a document in plain language. Mention Word, .docx or a report, memo, letter or template, and describe the content and formatting you need.
  5. 5Back up originals before editing. Copy any existing document before asking for edits, accepted changes or XML changes.
  6. 6Check the output. Open the file and review it. For new files the agent runs validate.py; you should still read the content yourself.

What the docx skill makes the agent do

A .docx file is a ZIP archive of XML files. The skill gives the agent a set of working procedures for that format rather than leaving it to guess.

For new documents, the agent builds the file with the docx npm package and can set headings, tables, lists, page sizes and page numbers. For existing documents, it unpacks the file's XML, edits it, and repacks it. It can also read text including tracked changes, convert legacy .doc files, render pages to images, accept all tracked changes and add comments. Generated files are run through a validation script.

  • Create new Word documents with headings, tables, lists, page sizes and page numbers
  • Edit existing files by unpacking the XML, changing it and repacking it
  • Read document text, including tracked changes
  • Convert .doc files to .docx, render pages to images, accept all tracked changes, add comments
  • Validate the output file

How to install the docx skill

Download the ZIP from this page and unzip it into one of these locations. Use ~/.claude/skills/ to make the skill available across your projects, or a project's .claude/skills/ folder to limit it to that project. The docx folder should end up inside the skills folder.

In the Claude apps you can instead upload the skill under Settings, then Capabilities, then Skills.

  • Personal: ~/.claude/skills/
  • Single project: the .claude/skills/ folder inside that project
  • Claude apps: Settings → Capabilities → Skills, then upload

What you need installed first

The skill is not only instructions. Several features call external tools, so install these before you rely on them. The skill's own description says it is not for environments where LibreOffice or Node.js cannot be installed, because several features depend on them.

The source lists these requirements: Node.js with the docx npm package, Python 3 with the defusedxml library, LibreOffice (soffice), pandoc for text extraction, and pdftoppm from poppler for page images.

  • Node.js with the docx npm package: npm install -g docx
  • Python 3 with the defusedxml library
  • LibreOffice (soffice): needed for .doc conversion, PDF rendering and accepting tracked changes
  • pandoc: text extraction
  • pdftoppm (poppler): page images
npm install -g docx

How to trigger the skill with natural requests

You do not need a special command. The skill activates when your request matches its description. Mention Word, .docx or a Word-style deliverable, and say what you want produced or changed.

The skill's trigger list includes any mention of Word doc, word document or .docx, and requests for a report, memo, letter or template delivered as a Word file. It also covers tables of contents, headings, page numbers, letterheads, find-and-replace, images, tracked changes and comments.

It is designed not to fire for PDFs, spreadsheets, Google Docs or unrelated coding tasks. If you need one of those formats, ask for it explicitly.

Example requests and what the agent does

Clear requests give better files. Name the deliverable, the audience, the structure and any formatting you need. Here are patterns that match the skill's described capabilities.

  • Create a quarterly report as a .docx with a table of contents, numbered headings and page numbers in the footer.
  • Write a memo to the project team as a Word document, with a header block and a summary table.
  • Turn this list of notes into a polished Word document with a letterhead.
  • Extract all the text from contract.docx, including the tracked changes, so I can review it.
  • Accept all tracked changes in review.docx and give me a clean copy. Keep the original file.
  • Replace every instance of Client A with Client B in proposal.docx.

Safety notes: scripts, network and backups

The skill runs bundled scripts, so it is not a passive set of instructions. The skill declares that it runs scripts and does not use the network. Read the bundled files if your environment needs a review before use.

Editing is the risky part. Accepting tracked changes and XML edits overwrite or rewrite content, and validation may not catch every problem. Keep a backup of any original or sensitive document and check the result before sharing it.

The skill's license file is Anthropic's terms, which restrict copying, redistribution and derivative works. Read LICENSE.txt before reusing or modifying the files.

  • Make a copy of any document before asking the agent to edit or accept changes
  • Check that the output opens correctly and that the content is what you expect
  • Do not use the skill on the only copy of a sensitive file

Tips for better results

Use the command-line tools directly when you want predictable results. The skill's quick reference shows the exact commands. For example, convert a legacy .doc file with soffice before editing it, and extract text with pandoc in tracked-changes mode.

For PDF output, the skill converts the .docx with LibreOffice and then renders pages to JPEG images at 150 dpi using pdftoppm. Ask for a rendered page image when you want to check layout visually.

  • Convert old .doc files first: python scripts/office/soffice.py --headless --convert-to docx document.doc
  • Extract text with tracked changes: pandoc --track-changes=all document.docx -o output.md
  • Unpack for raw XML: python scripts/office/unpack.py document.docx unpacked/
  • Accept all changes to a clean copy: python scripts/accept_changes.py input.docx output.docx
  • Validate a new file: python scripts/office/validate.py doc.docx
python scripts/office/soffice.py --headless --convert-to pdf document.docx pdftoppm -jpeg -r 150 document.pdf page

What people use it for

  • Producing a formatted monthly report with a table of contents and page numbers
  • Drafting memos and letters on a letterhead from rough notes
  • Filling in a Word template with find-and-replace
  • Extracting text from reviewed contracts, including tracked changes, for summary
  • Accepting tracked changes to produce a clean final version of a document

Frequently asked questions

Is the docx skill free?

The skill's SKILL.md lists its license as Proprietary, and the bundled LICENSE.txt sets Anthropic's terms, which restrict copying, redistribution and derivative works. The directory listing shows Apache-2.0, which conflicts with the files, so read LICENSE.txt before relying on any licence statement.

What do I need to install before using the docx skill?

You need Node.js with the docx npm package (npm install -g docx), Python 3 with defusedxml, LibreOffice (soffice), pandoc, and pdftoppm from poppler. LibreOffice and Node.js are needed for several features, so the skill is not suitable where they cannot be installed.

Where do I install the docx skill?

Unzip the downloaded ZIP into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project. In the Claude apps you can upload it under Settings, then Capabilities, then Skills.

Does the docx skill work with PDFs or Google Docs?

No. The skill explicitly excludes PDFs, spreadsheets, Google Docs and unrelated coding tasks, so those requests should not trigger it. Use the appropriate tool for those formats.

Can the docx skill edit tracked changes and comments?

Yes. It can read text including tracked changes through pandoc, accept all tracked changes with scripts/accept_changes.py, and add comments. Back up the original first, because accepting changes overwrites content.

Why did my docx skill output fail to open or look wrong?

Check that the prerequisites are installed, since LibreOffice and Node.js support several features. Run validate.py on the file and render pages to images with soffice and pdftoppm to check the layout. If validation fails, the skill's approach is to unpack the file, fix the XML and repack it.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use the docx skill if you regularly need Word files for reports, memos, letters or templates, or if you review documents with tracked changes and want a clean final copy. Skip it if you work mainly with PDFs, spreadsheets or Google Docs, or if you cannot install LibreOffice and Node.js, and read the licence terms before reuse.

Download the skill