anthropics/skills/skills/docx
Word document tools
Teaches an agent to create, read, edit, and manipulate Word documents and templates, including formatting, images, comments, tracked changes, and content extraction.
What Word document tools does
The skill tells the agent to choose a method based on the Word task. For a new .docx, it writes a JavaScript script with the docx npm package. For reading, it converts the document to Markdown with Pandoc. Existing documents are extracted so the agent can edit word/document.xml, then repacked and validated. The instructions cover page sizing, tables, lists, images, page breaks, headings, tables of contents, and other formatting details.
For edits, the skill includes scripts that merge fragmented WordprocessingML runs, accept tracked changes, add comments, convert Office files with LibreOffice, and validate document XML. It tells the agent to remove symlinks after extracting documents from external sources. Finished documents should be rendered to PDF and then to page images for visual inspection. The workflow can produce new or edited .docx files, clean copies with tracked changes accepted, and documents containing comments. It depends on the docx package, Pandoc, LibreOffice, and Poppler's pdftoppm for the documented workflows.
Install
/plugin install document-skills@anthropic-agent-skillsRead the security check below before you run it. The repository's own instructions win if they differ.
Security check
What the skill's files do, from reading them. A flag that nobody has checked yet says "Not checked", never "No".
- Runs scripts
- Yes
- Uses the network
- Yes
- Installs hooks
- No
- Asks for secrets
- No
The folder ships 15 script files, and the supplied security scan reports network access in several of them. The scan reports no installed hooks and no required secrets. The scripts can read, write, extract, repack, convert, and validate Office files, so they can change files on the machine when invoked. Before installing, read the included scripts and license, check the commands they call, and try document edits on copies or in a test directory first.
Scan details: Ships 15 script files: scripts/init.py, scripts/accept_changes.py, scripts/comment.py, scripts/merge_runs.py, scripts/office/helpers/init.py, scripts/office/helpers/pptx_chart.py, …. skills/docx/scripts/accept_changes.py makes network requests. skills/docx/scripts/comment.py makes network requests. skills/docx/scripts/merge_runs.py makes network requests. skills/docx/scripts/office/helpers/init.py makes network requests. skills/docx/scripts/office/helpers/pptx_theme.py makes network requests. skills/docx/scripts/office/validate.py makes network requests. skills/docx/scripts/office/validators/base.py makes network requests. skills/docx/scripts/office/validators/docx.py makes network requests. skills/docx/scripts/office/validators/pptx.py makes network requests. skills/docx/scripts/office/validators/redlining.py makes network requests. Checked at commit 8a1541c4a3ff.
Use cases
- Create formatted Word documents from requested content.
- Edit text and XML inside existing DOCX files.
- Work with tracked changes and Word comments.
- Extract Word document content as Markdown.
Limitations
- It is not intended for PDFs, spreadsheets, Google Docs, or unrelated coding tasks.
- The documented workflows depend on Pandoc, LibreOffice, Poppler, and the docx package.
- Existing DOCX files are edited through their extracted XML rather than opened with docx-js.
- External DOCX archives are treated as untrusted and have symlinks removed after extraction.
Sources
- docx skill folderRepositoryPrimarygithub.com
- anthropics/skillsRepositoryPrimarygithub.com
- raw.githubusercontent.com/anthropics/skills/main/skills/docx/SKILL.mdWeb
- raw.githubusercontent.com/anthropics/skills/main/skills/docx/scripts/accept_changes.pyWeb
- raw.githubusercontent.com/anthropics/skills/main/skills/docx/scripts/comment.pyWeb
- raw.githubusercontent.com/anthropics/skills/main/README.mdWeb
- raw.githubusercontent.com/anthropics/skills/main/skills/docx/LICENSE.txtWeb