docx-cli skill
A skill plus the docx program: the agent fills forms, edits tables and reviews Word files with tracked changes
- 241 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The program edits .docx in place, and without a copy the original cannot be restored after a bad edit
- The binary is downloaded from GitHub by an install script, and the release has a `SHA256SUMS` file to check against
- `docx images add` with a web address reaches out to the network
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/docx-cliDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The program edits .docx in place, and without a copy the original cannot be restored after a bad edit
- The binary is downloaded from GitHub by an install script, and the release has a `SHA256SUMS` file to check against
- `docx images add` with a web address reaches out to the network
This is third-party code. Review the repository files before installing.
What it does
docx-cli gives an agent a skill and the `docx` program, which edits .docx files in place instead of rebuilding the document from a simplified view. Everything in the file has a stable address: paragraph `p3`, cell `t0:r1c2`, comment `c0`, change `rev1`. `docx read` prints the document as annotated Markdown, `docx find` returns the exact span, and `replace`, `insert`, `delete` and `edit` change text while keeping formatting. Success shows in the exit code and a one-line confirmation, and errors arrive as JSON, so even small models handle the program. For review there is `docx track-changes` (turn tracking on, list, accept or reject changes) and `docx comments` (add, reply, resolve). `docx create --from draft.md` builds a new document from Markdown, `docx diff FILE --against ORIGINAL.docx` lists the differences as text, and `docx validate` checks a file against the ECMA-376 schemas. Batch operations go through `--batch FILE.jsonl`. Document content is never sent anywhere.
Who it is for. Lawyers, analysts and document-flow operators whose agent fills contracts and forms, updates tables in reports and handles review in Word.
Good fit when
- An agent fills in an NDA or a form and must leave the contract's formatting untouched
- A lawyer asks for edits as tracked changes that are accepted or rejected one by one
- A monthly report is refreshed: figures in tables and figure captions change across every file in a folder
- A résumé needs restyling, and the margins shift so that date lines do not wrap
- A new report is assembled from a Markdown draft with `docx create --from draft.md`
Not a fit when
- You need an MCP server: the project has none and the agent calls `docx` through the shell, while MCP options in the catalog are docx-mcp and safe-docx
- A person edits a document open in Word together with the agent in real time: word-mcp-live handles live editing
- The files are not Word: the program works only with .docx, and the catalog has OfficeCLI for Excel and PowerPoint
Example request
Open contract.docx, turn on tracked changes, replace "Net 90" with "Net 30" everywhere and show the list of changesLimitations
The project is pre-1.0 and flags can change between minor versions, so pin the version in production. The npm package is called `bun-docx` and runs under Bun 1.3 or newer even when installed with npm; a service on Node or Python uses the standalone binary instead. `docx render`, which produces page images, needs Word or LibreOffice. The comparison with Anthropic's skill and OfficeCLI was run by the author himself: six tasks, three runs, one model.
How to disable. In Claude Code run `/plugin uninstall docx-cli@docx-cli` or delete the skill folder from `~/.claude/skills/`. `bun remove -g bun-docx` removes the program itself, and a standalone binary is deleted from `~/.local/bin`.
FAQ
How do I install docx-cli in Claude Code?
Run `/plugin marketplace add kklimuk/docx-cli`, then `/plugin install docx-cli@docx-cli`. The skill appears in the next session; if the `docx` program is missing, the skill tells the agent to run the `bootstrap.sh` script that installs a binary of the pinned version.
Can I edit the original without fear of damaging it?
The program saves changes into the file it is given, so ask the agent to write to a new file with `-o` or keep the original. `--dry-run` previews a change without saving, and turned-on tracking makes every change a Word revision you can reject.
How do I know a replacement hit the right place?
`docx replace` exits with code 3 and a `MATCH_NOT_FOUND` JSON error when nothing matches. With several matches it changes the first and lists the rest, and `--all` changes them all.
Where does the program use the network?
Only on install and upgrade, and in `docx images add` when you give it a web address for an image. Nothing updates in the background: the binary changes only through `docx upgrade`, the installer or `bootstrap.sh`.
Does docx-cli suit weaker models?
The author tuned it for them: addresses in the Markdown survive many rounds of edits, and reading page images is not required. In the comparison on Haiku 5.5 the program solved all six tasks, a measurement by the author himself.
Discussion
No questions or reviews yet.
Related
SkillsA Firecrawl skill and CLI that lets your agent convert Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV and PDF to Markdown on your own machine
MCP Word server for docx editing with tracked changes: comments, footnotes, version comparison and a change log, all visible in Word
A CLI that lets an agent create and edit Word, Excel and PowerPoint: a single binary, no Office install, no extra libraries
A skill to convert Markdown to Word and back through Pandoc with ready styling templates and Lua filters
A skill and CLI that turn Markdown into DOCX, PDF, PPTX, XLSX, PNG and about a dozen more formats, all computed locally
docx-skill-4-cn-paper: a Word skill for Chinese papers
docx-skill-4-cn-paper
The docx-editor-cn skill builds Word files to Chinese university rules: margins, fonts, native formulas and three-line tables
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| docx-cli (this card) | no | 241 | ||
| Word MCP Live | no | not required | 260 | an MCP server where the agent edits a document open in Word live, while docx-cli works on files directly with no Word running |
| Safe DOCX | no | not required | 47 | a local MCP server and CLI for DOCX, while docx-cli ships a skill with element addresses and no MCP |
| OfficeCLI | no | 33,096 | one binary for Word, Excel and PowerPoint, while docx-cli is Word-only and goes deeper on review |
README in short
The README opens with the promise that an agent can work inside Word files and a comparison table against Anthropic's docx skill and OfficeCLI on six tasks. It goes on with instructions for the agent itself, manual install routes, safety notes and sections for developers and administrators.
README badge
Original SKILL.md
--- name: docx-cli description: "Edits, redlines, and comments on Word .docx files in place, keeping their formatting — prefer it over unzipping and hand-editing the XML. Use for tracked changes (redline, accept/reject), comments (add/reply/resolve), filling contracts/NDAs/forms, restyling headings/fonts, margins/page setup, tables, headers/footers/page numbers, footnotes, or reading a .docx as Markdown. Also builds new Word docs and reports from Markdown or code. Not for PDF, Excel, PowerPoint, Google Docs, or .doc." --- # docx-cli `docx` is a command-line tool for working on Microsoft Word `.docx` files: fill in forms and templates, update tables, restyle, build new documents from Markdown, and review with tracked changes and comments. It edits the underlying OOXML **in place** (it never rebuilds the document from a lossy view), addresses everything with **stable locators**, and signals success through an **exit code** plus a one-line confirmation — so even small, cheap models can drive it reliably. ## 0. Make sure the binary is on PATH Run `docx --version`. If you get "command not found", install it: ```sh bun add -g bun-docx # if Bun >= 1.3 is installed (npm install -g bun-docx also works) sh SKILL_DIR/scripts/bootstrap.sh # otherwise: a pinned, SHA-256-verified binary ``` `SKILL_DIR` is the folder containing this SKILL.md (use its absolute path; your working directory is usually the user's project). The binary lands in `~/.local/bin`; if `docx --version` still says "not found", add that directory to PATH. If `DOCX_CLI_VERSION` or `DOCX_CLI_NO_UPDATE` is set in your environment, an admin has pinned the version: use `bootstrap.sh` (it honors the pin), never npm or `docx upgrade`. The npm package is `bun-docx`. `docx` here is this CLI binary: it is NOT the npm `docx` (docx-js) library, and the npm package named `docx-cli` is unrelated. Install details and failure modes: `references/troubleshooting.md`. Every verb works on the `.docx` file directly; only `docx render` needs Word or LibreOffice. ## 1. The contract is `--help` — start there The help text is authoritative and versioned with the binary. This skill is thin on purpose and defers to it: ```sh docx --help # every command + a one-line capability hint each docx <command> --help # flags, locator forms, output shape — read before you use a verb docx info locators # the full addressing grammar (spans, cells, ranges, text boxes) ``` `docx info schema` describes the JSON that `docx read --ast` emits; you only need