docx

docx is a skill for Claude Code, Codex from NousResearch/hermes-agent. It costs 19 tokens per session (2,730 once invoked), scanned A, original, MIT.

A tool for creating, reading, editing, templating, and reviewing Microsoft Word .docx files.

In plain words
What is it for?
Use it to generate or revise reports, letters, contracts, and templates, or inspect document comments and tracked changes.
Why use it?
It handles common Word document operations programmatically, including tables, images, tracked changes, comments, and page fields.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to generate or revise reports, letters, contracts, and templates, or…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nousresearch/hermes-agent/docx
About the project

Hermes Agent is an AI assistant that learns from its use by creating and improving skills, retaining knowledge, searching past conversations, and adapting to its users. It is for people who want to run an agent through a terminal or messaging platforms while connecting it to different AI models and scheduled tasks.

NousResearch/hermes-agent · 242,093 stars · on GitHub · hermes-agent.nousresearch.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add NousResearch/hermes-agent --skill docx
Clone the repo
git clone --depth 1 https://github.com/NousResearch/hermes-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docx

README.md
[![agentmods](https://agentmods.dev/badge/skills/nousresearch/hermes-agent/docx.svg)](https://agentmods.dev/skills/nousresearch/hermes-agent/docx)
Your own site
<a href="https://agentmods.dev/skills/nousresearch/hermes-agent/docx"><img src="https://agentmods.dev/badge/skills/nousresearch/hermes-agent/docx.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,730 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.02730
Opus 5 $0.00010 $0.01365
Sonnet 5 $0.00004 $0.00546
Haiku 4.5 $0.00002 $0.00273

Measured 3d ago against content hash 9678b14d5e78, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

docx scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/docx_comments.py, scripts/docx_common.py, scripts/docx_create.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

  • docx — 100% identical, 0 lines differ
  • docx — 100% identical, 0 lines differ
skills/productivity/docx/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docx Skill

Create, read, edit, and template Microsoft Word .docx files with python-docx via small CLIs. It handles text, styles, lists, tables, images, headers/footers, {{token}} templating, tracked changes (list/accept/reject), comments (list/add/delete), TOC and page-number fields, and package health checks. It does not render documents itself (PDF needs LibreOffice — see Converting to PDF) or edit legacy .doc.

When to Use

  • The user asks to generate a Word document (report, letter, contract).
  • You need the text, outline, styles, or embedded images of a .docx.
  • You must change an existing .docx: replace text, edit table cells, insert/delete paragraphs, apply styles, merge fragmented runs.
  • You have a .docx template with {{placeholders}} to fill from data.
  • The document has tracked changes to review, accept, or reject.
  • You need to read reviewers' comments, or add/delete comments.
  • A .docx won't open or behaves oddly and you need corruption triage.
  • The document needs a table of contents or "Page X of Y" footers.
  • Not for: .doc (legacy), .odt, or WYSIWYG layout work.

Prerequisites

  • Python 3.10+ with python-docx installed: pip install python-docx (import name is docx; lxml comes with it).
  • Comments add uses the native API on python-docx >= 1.2 and an XML fallback on older versions — both are automatic.
  • For image blocks: the image files must exist locally (PNG/JPEG).

How to Run

All helpers live in scripts/ next to this file. Run them with the terminal tool; each supports --help and prints JSON to stdout.

python scripts/docx_create.py spec.json out.docx
python scripts/docx_read.py out.docx --text
python scripts/docx_edit.py replace out.docx --find old --replace new
python scripts/docx_template.py tpl.docx values.json filled.docx
python scripts/docx_revisions.py list out.docx
python scripts/docx_comments.py list out.docx
python scripts/docx_validate.py out.docx

Quick Reference

Task Command
Create from JSON spec docx_create.py spec.json out.docx
Full text (body+tables+headers/footers) docx_read.py f.docx --text
Heading outline + table shapes docx_read.py f.docx --structure
Styles actually used docx_read.py f.docx --styles
Extract embedded images docx_read.py f.docx --images outdir/
Detect tracked changes/comments docx_read.py f.docx --revisions
Find/replace (formatting kept) docx_edit.py replace f.docx --find A --replace B -o out.docx
Set a table cell docx_edit.py set-cell f.docx --table 0 --row 1 --col 2 --text X
Insert paragraph before index N docx_edit.py insert f.docx --index N --text X --style Normal
Delete paragraph N docx_edit.py delete f.docx --index N
Apply style to paragraph N docx_edit.py style f.docx --index N --style "Heading 1"
Merge equal-format adjacent runs docx_edit.py normalize f.docx -o out.docx
Insert TOC field before para N docx_edit.py toc f.docx --index N -o out.docx
"Page X of Y" footer fields docx_edit.py page-numbers f.docx
Fill {{tokens}} docx_template.py tpl.docx values.json out.docx --strict
List revisions (id/author/date/text) docx_revisions.py list f.docx
Accept / reject all revisions docx_revisions.py accept-all f.docx -o out.docx (or reject-all)
Accept / reject one revision docx_revisions.py accept f.docx --id 3 -o out.docx
List comments (+anchored text) docx_comments.py list f.docx
Add comment anchored to text docx_comments.py add f.docx --target "phrase" --text "note" --author You
Delete comment by id docx_comments.py delete f.docx --id 0
Health-check the package docx_validate.py f.docx (exit 1 on errors)

Read the full file on GitHub · 197 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 197 lines · 19 tokens per session scan A 9678b14d5e78

Subscribe to this mod's changes

docx is a skill published in the GitHub repository NousResearch/hermes-agent (242,093 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 2,730 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.