docx
An agent skill by anthropics, from anthropics/skills. Tags: anthropic, documents, office.
What it does
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add anthropics/skills --skill docx
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/anthropics/skills
cp -r skills/skills/docx ~/.claude/skills/docx
Safety box score
Grade C, moderate risk: 26 of 100 risk points, rated 2026-10-15. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is a local document-processing toolkit for `.docx`/`.dotx` files: it unpacks archives, edits Word XML, validates Office parts, and can render or accept tracked changes. The main risks are code execution through LibreOffice/gcc helpers and destructive in-place overwrites of documents; it does not appear to target secrets or external services beyond an optional package install.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 3 (high) | It runs external programs and native code: `scripts/office/soffice.py` compiles a C shim with `gcc` and sets `LD_PRELOAD`, and `scripts/accept_changes.py` drives LibreOffice via a Basic macro (`AcceptAllTrackedChanges`). |
| Network access | 1 (low) | There is no routine network traffic, but `SKILL.md` explicitly allows a fallback `npm install docx`, which would contact the npm registry and download third-party code. |
| Filesystem reach | 2 (moderate) | The skill reads, unpacks, edits, and re-zips document archives, and can overwrite the source file by default (`out = Path(args.output) if args.output else src`). |
| Secrets & credentials | 0 (none) | No code accesses token stores, keychains, browser sessions, `.env` files, or other credential locations; it only processes document files. |
| Privilege & persistence | 1 (low) | It changes the runtime loader for child processes with `LD_PRELOAD` and uses a temporary LibreOffice profile, but it does not require sudo, install services, or make persistent OS changes. |
| Instruction hijack surface | 0 (none) | I found no prompt-injection payloads, hidden instructions, or requests to ignore higher-level rules; the files only contain normal operational guidance. |
| Irreversible actions | 0 (none) | It modifies documents locally but does not publish, send messages, deploy, pay, book, or delete remote resources. |
| Transparency | 0 (none) | The shipped code is readable source; even the native helper is embedded as inline C text (`_SHIM_SOURCE`), not a binary or decoded blob. |
Before installing
- Test it first on a copied document in a scratch directory; several scripts overwrite the input path if you do not pass `-o`.
- Confirm you are comfortable with LibreOffice macro execution and `LD_PRELOAD` use before allowing the skill to run.
- If you need a no-network setup, preinstall `docx`, `pandoc`, `soffice`, and `pdftoppm` so it never falls back to `npm install docx`.
Rated 2026-10-15 by an automated review of 22 files from the skill's repository.
Source
- Repository
- anthropics/skills (all skills from this repository)
- Path
- skills/docx/SKILL.md
- Branch
- main
- Updated
- 2026-09-19
Related skills
- discernment-nudge — After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals.
- doc-coauthoring — Guide users through a structured workflow for co-authoring documentation.
- internal-comms — A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use.
- pdf — Use this skill whenever the user wants to do anything with PDF files.
- pptx — Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks.
- theme-factory — Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc.