docx

docx is a skill for Claude Code, Codex from MilkyWay008/Hermes-OTG. It costs 16 tokens per session (2,108 once invoked), scanned B, original, MIT.

A tool for creating, reading, and editing Microsoft Word documents and templates in .docx or .dotx format. It also handles document features such as tables of contents, comments, and tracked changes.

In plain words
What is it for?
Use it to produce reports, letters, memos, and templates, extract or reorganize document content, insert images, and manage comments or tracked changes.
Why use it?
Automating Word files can require changing their internal XML while preserving formatting and review information. This supports both ordinary document creation and precise edits.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is (cd unpacked && rm -f ../out.docx && zip -Xr ../out.docx .).

Good fit Use it to produce reports, letters, memos, and templates, extract or reorganize document content, insert images, and manage comments or tracked changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/MilkyWay008/Hermes-OTG
agentmods
npx agentmods add skills/milkyway008/hermes-otg/docx

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/milkyway008/hermes-otg/docx/github.svg)](https://agentmods.dev/skills/milkyway008/hermes-otg/docx)
Your own site
<a href="https://agentmods.dev/skills/milkyway008/hermes-otg/docx"><img src="https://agentmods.dev/badge/skills/milkyway008/hermes-otg/docx/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docx

Your own site · 80×15
<a href="https://agentmods.dev/skills/milkyway008/hermes-otg/docx"><img src="https://agentmods.dev/badge/skills/milkyway008/hermes-otg/docx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,108 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00016 $0.02108
Opus 5 $0.00008 $0.01054
Sonnet 5 $0.00003 $0.00422
Haiku 4.5 $0.00002 $0.00211

Measured 9d ago against content hash cf17a6245da7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

docx scanned grade B with 1 finding 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 9d ago.

The scan reads SKILL.md. This mod also ships 15 executable files (scripts/__init__.py, scripts/accept_changes.py, scripts/comment.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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

pip show pandoc >/dev/null 2>&1 || true; which pandoc || sudo apt install -y pandoc # reading
data/skills/productivity/docx/SKILL.md · 128 lines

How it starts

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

DOCX Skill

Create, read, and edit Word documents — reports, memos, letters, letterheads, tables of contents, tracked changes (redlining), and comments. A .docx is a ZIP archive of XML files; this skill covers both the high-level creation path and surgical XML editing.

When to Use

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx) or Word templates (.dotx). Triggers include: any mention of "Word doc", ".docx", ".dotx", or requests for a "report", "memo", "letter", or similar deliverable as a Word file; extracting or reorganizing content from .docx files; find-and-replace in Word files; inserting images; tracked changes or comments. Do NOT use for PDFs (see the pdf skill), spreadsheets (xlsx), or presentations (powerpoint).

Prerequisites

npm ls docx --depth=0 2>/dev/null | grep -q docx || npm install docx   # creation (docx-js)
pip show pandoc >/dev/null 2>&1 || true; which pandoc || sudo apt install -y pandoc   # reading
which soffice || sudo apt install -y libreoffice     # rendering/verification
which pdftoppm || sudo apt install -y poppler-utils  # PDF → images
pip install defusedxml lxml   # validation scripts

macOS: brew install pandoc libreoffice poppler.

Quick Reference

Task Approach
Create a new document Write a docx (npm) script — see gotchas below
Edit an existing document unzip → edit word/document.xmlzip (docx-js cannot open existing files)
Read content pandoc -t markdown file.docx (or read_file, which auto-extracts .docx text)

Script paths below are relative to this skill's directory.

Creating with docx-js — gotchas

Write the script and require('docx'). The model knows the API; these are the footguns:

  • Page size defaults to A4. For US Letter set page: { size: { width: 12240, height: 15840 } } (DXA; 1440 = 1″).
  • Landscape: pass portrait dimensions and orientation: PageOrientation.LANDSCAPE — docx-js swaps width/height internally.
  • Tables need dual widths: set columnWidths on the table AND width on every cell, both in WidthType.DXA (PERCENTAGE breaks in Google Docs). Column widths must sum to the table width.
  • Table shading: use ShadingType.CLEAR, never SOLID (renders black).
  • Lists: never insert literally; use a numbering config with LevelFormat.BULLET.
  • ImageRun requires type: ("png", "jpg", …).
  • PageBreak must be inside a Paragraph.
  • Never use \n — use separate Paragraph elements.
  • TOC: headings must use built-in HeadingLevel.*; custom heading styles need outlineLevel set or they won't appear.
  • Don't use a table as a horizontal rule — use a paragraph bottom border instead.
  • Dot-leader / right-aligned-on-same-line: use PositionalTab (alignment: PositionalTabAlignment.RIGHT, leader: PositionalTabLeader.DOT) inside a TextRun, not literal . or space padding.

Read the full file on GitHub · 128 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 128 lines · 16 tokens per session scan B cf17a6245da7

Subscribe to this mod's changes

docx is a skill published in the GitHub repository MilkyWay008/Hermes-OTG (15 stars, last pushed 28d ago), licensed MIT. It adds 16 tokens to every session and 2,108 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.