docx

docx is a skill for Claude Code, Codex from smith-network-solutions/threadknot. It costs 102 tokens per session (1,643 once invoked), scanned A, original, Apache-2.0.

A toolkit for creating, reading, and editing Microsoft Word documents in the .docx format.

In plain words
What is it for?
Use it to write reports, letters, contracts, and templates, modify existing documents, extract their content, or convert them to PDF.
Why use it?
It handles document structure such as headings, tables, images, headers, footers, and styles without manually editing Word's internal files.

Skill for Claude CodeCodex

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

Good fit Use it to write reports, letters, contracts, and templates, modify existing documents, extract their content, or convert them to PDF.

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

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/smith-network-solutions/threadknot/docx/github.svg)](https://agentmods.dev/skills/smith-network-solutions/threadknot/docx)
Your own site
<a href="https://agentmods.dev/skills/smith-network-solutions/threadknot/docx"><img src="https://agentmods.dev/badge/skills/smith-network-solutions/threadknot/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/smith-network-solutions/threadknot/docx"><img src="https://agentmods.dev/badge/skills/smith-network-solutions/threadknot/docx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,643 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.00102 $0.01643
Opus 5.5 $0.00041 $0.00657
Sonnet 5.5 $0.00020 $0.00329
Haiku 4.5 $0.00010 $0.00164

Measured 1mo ago against content hash 5d58611d01b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 1mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/inspect_docx.py, scripts/ooxml.py, scripts/replace.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 · 157 lines

How it starts

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

Word documents (.docx)

A .docx is a ZIP archive of XML parts. Two ways in, and picking the right one is most of the job:

Need Route
Write a document, edit text, add tables/images/styles python-docx (scripts/ here)
Tracked changes, comments, footnotes, content controls, anything python-docx has no API for raw OOXML — scripts/ooxml.py unpack, edit the XML, pack

Never hand-write a whole .docx as XML from nothing. Start from a real file — either one python-docx produced or one the user supplied — and modify it.

Before editing an existing file, look at it

scripts/inspect_docx.py report.docx

Prints every paragraph with its index and style, every table with its dimensions, section/page setup, headers and footers, and the document's declared styles. Do this first on any file you did not create. Paragraph indices from this listing are what the editing recipes below address.

Creating a document

Write a short Python script using python-docx. The API worth remembering:

from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH

doc = Document()                      # or Document("template.docx") to build on one

doc.add_heading("Quarterly Report", level=1)
p = doc.add_paragraph("Ordinary body text. ")
run = p.add_run("Bold tail.")         # runs carry the character formatting
run.bold = True
p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY

table = doc.add_table(rows=1, cols=3)
table.style = "Table Grid"            # without a style the table has NO borders
hdr = table.rows[0].cells
hdr[0].text, hdr[1].text, hdr[2].text = "Region", "Q1", "Q2"
for region, q1, q2 in data:
    cells = table.add_row().cells
    cells[0].text = region
    cells[1].text = f"{q1:,.0f}"

doc.add_picture("chart.png", width=Inches(6))
doc.add_page_break()
doc.save("report.docx")

Points that cost time if you learn them the hard way:

  • All measurements are typed. Pt, Inches, Cm, Emu — never a bare number. Internally everything is EMU (914400 per inch).
  • Formatting lives on runs, not paragraphs. paragraph.text = "x" destroys the paragraph's runs and their formatting. To change text while keeping formatting, assign to run.text on the existing runs.
  • A table with no .style has no visible borders. "Table Grid" is the usual intent.
  • Styles must already exist in the document. Building on a user's template inherits their styles; Document() gives you the default set. Check with inspect_docx.py before referencing a style by name.
  • add_heading(level=0) produces a Title, not a heading.

Read the full file on GitHub · 157 lines

Files

What ships with it

5 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. 1mo ago First seen · 157 lines · 102 tokens per session scan A 5d58611d01b5

Subscribe to this mod's changes

docx is a skill published in the GitHub repository smith-network-solutions/threadknot (8 stars, last pushed 13d ago), licensed Apache-2.0. It adds 102 tokens to every session and 1,643 once invoked, about $0.0004 per session on Opus 5.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-08-31.

Related

Other skills, from other repositories

document-pdf

Handles PDF/UA accessibility, real redaction, metadata scrubbing, signing, and extraction. Use when redacting or signing PDFs; for plain create/merge prefer the official pdf skill.

vasilyu1983/AI-Agents-public · 42 tokens

document-xlsx

Builds Excel charts, pivots, validation, exports, Office Scripts/Graph automation, and workbook audits. Use when automating workbooks; for plain edits prefer official xlsx skill.

vasilyu1983/AI-Agents-public · 42 tokens

document-docx

Builds docxtpl templates, DOCX extraction for RAG, and EAA accessibility checks. Use when templating Word or extracting tables; plain edits and redlines: official docx skill.

vasilyu1983/AI-Agents-public · 44 tokens

atlas-report

Render agent findings as a styled HTML report in the browser. Use when asked for "full report", "detailed report", "show in browser", or when CLI output exceeds the 40-line budget.

tonone-ai/tonone · 44 tokens

pptx-official

Creates, edits, inspects, and renders PowerPoint presentations (.pptx, .potx): pitch decks, executive readouts, board and training material, template fills, slide reordering or duplication, speaker notes, text and chart-data extraction, and deck-to-PDF or slide-to-image rendering. Use when a PowerPoint file is the…

evoelsewhere/evoflux · 128 tokens

docx-official

Creates, edits, inspects, and converts Microsoft Word documents (.docx, .dotx): reports, letters, memos, contracts, proposals, filled templates, tracked-change acceptance, review comments, and text, table, or metadata extraction. Use when a Word file is the deliverable or the source of record, or the user mentions…

evoelsewhere/evoflux · 124 tokens