docx

docx is a skill for Claude Code from flonat/flonat-research. It costs 68 tokens per session (1,270 once invoked), scanned A, original, MIT.

A tool for creating, reading, editing, and converting Microsoft Word .docx files while keeping their structure and formatting. It supports documents with headings, images, comments, and tracked changes.

In plain words
What is it for?
Use it to create reports and letters, inspect document content, edit existing .docx files, convert older Word files, or process tracked changes and comments.
Why use it?
It helps automate Word-document work without losing important editing information or the layout expected in a professional report or letter.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to create reports and letters, inspect document content, edit existing .docx files, convert older Word files, or process tracked changes and comments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/flonat/flonat-research/docx
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 flonat/flonat-research --skill docx
Clone the repo
git clone --depth 1 https://github.com/flonat/flonat-research

Made for: Claude Code.

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/flonat/flonat-research/docx.svg)](https://agentmods.dev/skills/flonat/flonat-research/docx)
Your own site
<a href="https://agentmods.dev/skills/flonat/flonat-research/docx"><img src="https://agentmods.dev/badge/skills/flonat/flonat-research/docx.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,270 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00068 $0.01270
Opus 5 $0.00034 $0.00635
Sonnet 5 $0.00014 $0.00254
Haiku 4.5 $0.00007 $0.00127

Measured 4d ago against content hash 7915d04498e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 4d 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.

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.

skills/docx/SKILL.md · 135 lines

How it starts

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

DOCX creation, editing, and analysis

Overview

A .docx file is a ZIP archive containing XML files.

Quick Reference

Task Approach
Read/analyze content pandoc or unpack for raw XML
Create new document Use docx-js — see references/docx-js-patterns.md
Edit existing document Unpack → edit XML → repack — see Editing below

Converting .doc to .docx

uv run python scripts/office/soffice.py --headless --convert-to docx document.doc

Reading Content

# Text extraction with tracked changes
pandoc --track-changes=all document.docx -o output.md

# Raw XML access
uv run python scripts/office/unpack.py document.docx unpacked/

Converting to Images

uv run python scripts/office/soffice.py --headless --convert-to pdf document.docx
pdftoppm -jpeg -r 150 document.pdf page

Accepting Tracked Changes

uv run python scripts/accept_changes.py input.docx output.docx

Creating New Documents

Generate .docx files with JavaScript using docx-js. Install: npm install -g docx

Full code patterns (setup, page size, styles, lists, tables, images, hyperlinks, footnotes, tab stops, multi-column layouts, TOC, headers/footers): references/docx-js-patterns.md

Critical Rules for docx-js

  • Set page size explicitly — defaults to A4; use US Letter (12240 x 15840 DXA) for US documents
  • Landscape: pass portrait dimensions — docx-js swaps width/height internally
  • Never use \n — use separate Paragraph elements
  • Never use unicode bullets — use LevelFormat.BULLET with numbering config
  • PageBreak must be in Paragraph — standalone creates invalid XML
  • ImageRun requires type — always specify png/jpg/etc
  • Always set table width with DXA — never use WidthType.PERCENTAGE (breaks in Google Docs)
  • Tables need dual widthscolumnWidths array AND cell width, both must match
  • Use ShadingType.CLEAR — never SO[Project] for table shading
  • Never use tables as dividers — use border on Paragraph instead; for two-column footers, use tab stops
  • TOC requires HeadingLevel only — no custom styles on heading paragraphs
  • Override built-in styles — use exact IDs: "Heading1", "Heading2", etc.
  • Include outlineLevel — required for TOC (0 for H1, 1 for H2, etc.)

Read the full file on GitHub · 135 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. 4d ago First seen · 135 lines · 68 tokens per session scan A 7915d04498e8

Subscribe to this mod's changes

docx is a skill published in the GitHub repository flonat/flonat-research (132 stars, last pushed 12d ago), licensed MIT. It adds 68 tokens to every session and 1,270 once invoked, about $0.0003 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.