docx

docx is a skill for Claude Code from nexus-research-lab/nexus. It costs 103 tokens per session (1,026 once invoked), scanned A, original, Apache-2.0.

Instructions for safely reading, creating, and editing Microsoft Word documents and templates, including tables, images, comments, and tracked changes.

In plain words
What is it for?
They are for extracting text, making controlled edits, creating DOCX files, handling older DOC files, and checking the final layout.
Why use it?
They help preserve document content and formatting while choosing an appropriate method for simple or complex Word files.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable.

Good fit They are for extracting text, making controlled edits, creating DOCX files, handling older DOC files, and checking the final layout.

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

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/nexus-research-lab/nexus/docx.svg)](https://agentmods.dev/skills/nexus-research-lab/nexus/docx)
Your own site
<a href="https://agentmods.dev/skills/nexus-research-lab/nexus/docx"><img src="https://agentmods.dev/badge/skills/nexus-research-lab/nexus/docx.svg" alt="Measured on agentmods" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,026 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.00103 $0.01026
Opus 5 $0.00051 $0.00513
Sonnet 5 $0.00021 $0.00205
Haiku 4.5 $0.00010 $0.00103

Measured 8d ago against content hash 5284935dc55c, 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 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/read_word.py, tests/test_read_word.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 · 75 lines

What it actually says

Word 文档

按任务选择最短可靠路径:

任务 路径
读取、总结、问答 运行自带读取脚本;版式相关问题再渲染页面
新建文档 python-docx 生成可编辑 DOCX
编辑现有文档 先读内容和版式,再用 python-docx 做局部修改
批注、修订、内容控件等高级结构 仅在库不能安全保留时做定点 OOXML 修改
旧版 .doc 用 LibreOffice 转为 .docx,保留原件

工作契约

  • 只读问题不重新保存或转换文件,除非读取确实需要转换。
  • 写操作默认另存新文件;用户明确要求覆盖时才覆盖。
  • 用户提供的模板、样式和版式优先于本 Skill 的默认建议。
  • 先直接使用当前环境。import docx 失败且任务需要写文件时,取得用户同意后在隔离环境安装 ${CLAUDE_SKILL_DIR}/requirements.txt,不要静默修改系统 Python。

读取

python3 "${CLAUDE_SKILL_DIR}/scripts/read_word.py" "<input.docx>"
python3 "${CLAUDE_SKILL_DIR}/scripts/read_word.py" "<input.docx>" --output "<new-output.txt>"

脚本按文件签名识别 OOXML 与旧版 OLE,不只相信扩展名。它提取正文和表格;页眉页脚、图片、 批注、修订或版式决定答案时,还要查看渲染页面或相关 OOXML,不能从纯文本猜测。

创建与编辑

在 workspace 或临时目录写一个可重复运行的短 Python 脚本,再用 python-docx 输出文件。

  • 新建前确认文档用途、读者和目标格式;信息足够时直接判断,不为装饰性选择阻塞任务。
  • 使用 Word 样式、编号、分页符、分节、表格和页眉页脚表达结构,不用空格、手工圆点或连续空行伪造布局。
  • 编辑已有文本时优先修改目标 run;给 paragraph.text 整体赋值会丢失段内格式。
  • 表格使用明确列宽并处理重复表头;图片保持纵横比并设置可读尺寸。
  • 遇到宏、内容控件、复杂域、批注或修订时,先确认往返保存是否会丢数据。无法安全保留就停止写入, 说明限制或改用定点 OOXML 修改,不能静默降级。

完成条件

  1. 用读取脚本回读最终文件,确认内容、顺序和关键表格正确。
  2. 新建或涉及版式的编辑,用 LibreOffice 转成 PDF,再用 pdftoppm 生成页面图片并逐页检查:
soffice --headless --convert-to pdf --outdir "<empty-qa-dir>" "<output.docx>"
pdftoppm -png -r 144 "<empty-qa-dir>/<output.pdf>" "<empty-qa-dir>/page"
  1. 修复截字、重叠、异常空白页、断裂表格、字体替换和错误页眉页脚后重新渲染。
  2. 若 LibreOffice 或 Poppler 不可用,仍可完成纯内容读取;写任务要明确说明未完成视觉检查,不能声称版式已验证。
  3. 最终只交付用户要求的 DOCX,不附带构建脚本和预览文件。
Files

What ships with it

3 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. 8d ago First seen · 75 lines · 103 tokens per session scan A 5284935dc55c

Subscribe to this mod's changes

docx is a skill published in the GitHub repository nexus-research-lab/nexus (144 stars, last pushed yesterday), licensed Apache-2.0. It adds 103 tokens to every session and 1,026 once invoked, about $0.0005 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-08-30.

Related

Other skills, from other repositories

ppt-generation

Use this skill when the user requests to generate, create, or make presentations (PPT/PPTX). Creates visually rich slides by generating images for each slide and composing them into a PowerPoint file.

bytedance/deer-flow · 44 tokens

data-analysis

Use this skill when the user uploads Excel (.xlsx/.xls) or CSV files and wants to perform data analysis, generate statistics, create summaries, pivot tables, SQL queries, or any form of structured data exploration. Supports multi-sheet Excel workbooks, aggregation, filtering, joins, and exporting results to…

bytedance/deer-flow · 69 tokens

nano-pdf

Edits PDF files using natural-language instructions via the nano-pdf CLI. Supports modifying text, changing titles, fixing typos, and updating content on specific pages. Use when the user wants to edit a PDF, modify PDF content, update PDF text, fix a typo in a PDF, change a PDF title, or rewrite part of a PDF page.

elizaOS/eliza · 75 tokens

enrich-excel

Enrich a live Excel spreadsheet by researching missing data with TinyFish and writing results directly into the running Excel app via AppleScript. Use when a user says "fill in my spreadsheet", "enrich this Excel file", "research and fill missing data", "update my Excel sheet", "look up data for each row", or any…

tinyfish-io/tinyfish-cookbook · 92 tokens

pdf-processing

Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.

Tencent/WeKnora · 36 tokens

document-converter

Convert documents bidirectionally via the pi-doc-engine facade: ingest PDF/DOCX/PPTX/XLSX to provenance-stamped Markdown (with OCR), and produce templated DOCX/PDF from Markdown with diagrams, TOC and round-trip merge. Use on "convert this PDF to markdown", "ingest these docs into kb", "make a DOCX from markdown with…

BlackBeltTechnology/pi-agent-dashboard · 97 tokens