docx

docx is a skill for Claude Code, Codex from netease-youdao/LobsterAI. It costs 36 tokens per session (1,850 once invoked), scanned A, a copy of docx, MIT.

A toolkit for creating, editing, and examining Microsoft Word document files (.docx). It supports text extraction, formatting preservation, comments, and tracked changes, which record proposed edits.

In plain words
What is it for?
Use it to create or edit Word documents, extract their contents, preserve formatting, and handle comments or tracked changes.
Why use it?
It helps preserve document structure and review history while making changes. This is useful when edits must remain visible or auditable.

Skill for Claude CodeCodex

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

Good fit Use it to create or edit Word documents, extract their contents, preserve formatting, and handle comments or tracked changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/netease-youdao/lobsterai/docx
About the project

LobsterAI is an open-source desktop AI agent that operates files, commands, browsers, documents, spreadsheets, slides, messaging channels, and scheduled jobs in a user's working environment. It supports office work, research, and custom multi-agent workflows, while catalogue add-ons extend the agent with additional skills and workflows.

netease-youdao/LobsterAI · 6,228 stars · on GitHub · lobsterai.youdao.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 netease-youdao/LobsterAI --skill docx
Clone the repo
git clone --depth 1 https://github.com/netease-youdao/LobsterAI

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/netease-youdao/lobsterai/docx/github.svg)](https://agentmods.dev/skills/netease-youdao/lobsterai/docx)
Your own site
<a href="https://agentmods.dev/skills/netease-youdao/lobsterai/docx"><img src="https://agentmods.dev/badge/skills/netease-youdao/lobsterai/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/netease-youdao/lobsterai/docx"><img src="https://agentmods.dev/badge/skills/netease-youdao/lobsterai/docx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,850 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 100% copy Near-identical to another mod 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.00036 $0.01850
Opus 5.5 $0.00014 $0.00740
Sonnet 5.5 $0.00007 $0.00370
Haiku 4.5 $0.00004 $0.00185

Measured 3d ago against content hash ea1829ce26db, 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 3d ago.

The scan reads SKILL.md. This mod also ships 11 executable files (ooxml/scripts/pack.py, ooxml/scripts/unpack.py, ooxml/scripts/validate.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

This is a copy

100% identical to docx — 230 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

SKILLs/docx/SKILL.md · 70 lines

How it starts

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

DOCX 文档创建与编辑指南

请全程使用与用户输入一致的语言进行思考、过程说明与最终交付。参考手册路径请基于本技能目录(<skill_dir>)解析。

一、任务路由(按场景选最简方案)

  1. 编辑已有 .docx(改文字、样式、段落、插表格、选区"修改这里")

    • 优先使用 LobsterAI 实时编辑工具 word_read + word_edit(若工具未挂载,调用 lobster_enable_tools({ capabilities: ["word"] }) 或已随本技能自动解锁)。
    • 修改会在右侧 Word 编辑器实时显示、保留未动部分的原格式并自动保存:
      1. 先调 word_read({ path }) 获取 revision、各段落 id/style/text(表格单元格含 table/row/cell)及用户当前 selection。
      2. 再调 word_edit({ path, expectedRevision, edits }),支持 replace_text(保留局部 run 样式)、set_text、insert_paragraph(anchor 为段落 id/"start"/"end",\n 分段,可设 style)、delete_paragraph、format_text、format_paragraph、insert_table。
      3. 若报 revision 冲突则重新 word_read 后重试;编辑成功返回的结果即最新内容,无需再次 word_read。
  2. 从零新建 .docx 文档

    • 优先选 python-docx(轻量快速、几乎零依赖折腾,适合绝大多数报告、方案、纪要、合同与含表格/图片的正式文档);若需复杂页眉页脚、多级目录或已有 Node 流水线,也可选用 docx(docx-js)(需查具体 API 时再按需局部查阅 <skill_dir>/docx-js.md,不要整篇盲读)。
    • 写完文档脚本后一次性生成,避免反复试探环境几十步。
  3. 修订模式(Tracked Changes / 批注 / 法律或他人文档审阅)

    • 仅在用户明确要求保留修订痕迹(红线修改)或添加批注时,走 OOXML 修订流程:按需局部查阅 <skill_dir>/ooxml.md 的 "Document Library" 与 "Tracked Change Patterns",使用 ooxml/scripts/unpack.py、scripts/document.py、ooxml/scripts/pack.py。
    • 修订原则:只标记真正改动的最短词组(保留未改动文字的原始 <w:r> 与 rsid),不要整段删了重写。
  4. 读取/提取 .docx 文本

    • 优先用 word_read 或 python-docx 读取段落与表格;若需查看修订痕迹可用 pandoc --track-changes=all file.docx -o out.md。

二、中文专业排版与核心避坑

  1. 页面与字体:
    • 中文文档默认 A4 纸张(210mm × 297mm),页边距 2.54cm(1 英寸);统一配色(如深蓝主色 #1F4E79 + 浅灰表头/引用底色 #F2F5F9 + 深灰正文 #222222)。
    • 必须同时指定西文与东亚字体(w:eastAsia):中文推荐 PingFang SC / Microsoft YaHei(或正式公文用 SimSun / FangSong),西文数字用 Arial / Calibri,避免出现方框乱码或中英字体错位。
  2. 结构与分页:
    • 用规范标题层级(Heading 1 / Heading 2 / Heading 3)和段前/段后间距(如段后 6pt、行距 1.3–1.5 倍),不要用连续空行硬撑间距。
    • 分页符避坑:
      • python-docx:使用 document.add_page_break() 或段落的 paragraph_format.page_break_before = True;
      • docx-js:PageBreak 必须放在 Paragraph 的 children 内,绝不能作为顶层元素,否则 Word 无法打开。
    • 目录(TOC)注意:Word 动态域代码目录首次打开前默认不会自动展开页码;如需用户一打开就看到完整结构,推荐在封面后直接生成排版整洁的静态「内容导览 / 目录概览」块(或清晰告知用户可在 Word 中右键更新目录域)。
  3. 表格与列表避坑:
    • docx-js 表格底纹一律用 ShadingType.CLEAR(禁止 ShadingType.SOLID,会渲染成全黑底!);必须同时提供 columnWidths 与各单元格宽度,每个单元格至少包含一个 Paragraph。
    • python-docx 表格显式设置列宽、表头加粗+浅色填充、清晰细边框、单元格内边距与跨页表头重复(w:tblHeader)。
    • 列表使用标准编号/项目符号样式;段落中不要滥用 \n 强制换行,每条独立成段。
    • docx-js 插入 ImageRun 时必须显式传入 type("png" / "jpg" 等)。

Read the full file on GitHub · 70 lines

Files

What ships with it

58 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. 3d ago Changed · -145 lines · -41 tokens per session scan B → A ea1829ce26db
  2. 1mo ago Changed · +17 lines c08e786a190a
  3. 3mo ago First seen · 198 lines · 77 tokens per session scan B 6c07fb81bf69

Subscribe to this mod's changes

docx is a skill published in the GitHub repository netease-youdao/LobsterAI (6,228 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 1,850 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to docx, differing in 230 lines, and is treated as a copy.

Related

docx compared with skills from other repositories

docx next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
docxnetease-youdao/LobsterAISkill6.2kyesterdayMITA36Claude Code, Codex
ha-data-analyticsshiwenwen/hope-agentSkill1.9ktodayMITA106Codex
feishushiwenwen/hope-agentSkill1.9ktodayMITA189Claude Code
office-docxshiwenwen/hope-agentSkill1.9ktodayMITA64Claude Code, Codex
office-pptxshiwenwen/hope-agentSkill1.9ktodayMITA62Claude Code, Codex
office-xlsxshiwenwen/hope-agentSkill1.9ktodayMITA64Claude Code, Codex
hive.pdfaden-hive/hiveSkill11k2d agoApache-2.0A98Claude Code, Codex