微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📘

专业 DOCX 编辑与跨平台兼容保障

Word DOCX处理 · v1.0.0
这个包缺安装入口,装上也不会生效 缺 SKILL.md 或 frontmatter 不完整(BAD_NAME)。我们仍保留下载,方便你自行查看内容。
办公 安全 A 级 作者 linbo405 公开目录收录
1.1k 下载 0 安装 4.4k 收藏 29 浏览

简介

专业处理 Microsoft Word/DOCX 文档,支持样式管理、修订追踪、字段引用与跨编辑器兼容性校验,确保复杂文档在多轮编辑中格式不漂移。

原始描述

Create, inspect, and edit Microsoft Word documents and DOCX files with reliable styles, numbering, tracked changes, tables, sections, and compatibility check...

通过你的 Agent 添加

安装目录:word-docx-47424/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/word-docx-47424/
Codex CLI~/.codex/skills/word-docx-47424/
DeepSeek Harness~/.agents/skills/word-docx-47424/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心功能

本技能专注于 Microsoft Word 文档(.docx 格式)的创建、检查与编辑,核心能力覆盖三大场景:结构保留读取、样式驱动生成、OOXML 感知编辑。它将 DOCX 视为 ZIP 压缩的 XML 包而非纯文本,能够精准处理 document.xml、styles.xml、numbering.xml 及关系文件等关键部件。

显著优点

  1. 深度 OOXML 理解:识别文本跨多个 XML 节点分割的情况,避免传统文本处理工具的格式丢失问题
  2. 修订与批注安全处理:在启用修订追踪时,正确处理插入、删除标记及评论锚点,防止移动文本时孤儿化批注
  3. 样式系统管理:优先使用命名样式而非直接格式,支持段落样式、字符样式的层级管理,防止样式冲突
  4. 编号系统完整性:理解 abstractNum、num 及段落编号属性的关联,避免列表编号重启或扁平化
  5. 节级布局控制:精确处理页边距、方向、页眉页脚的分节行为,支持首页/奇偶页差异设置
  6. 字段与引用稳定:安全编辑目录、页码、交叉引用、书签等字段,确保 ID 与关系匹配
  7. 跨编辑器兼容性验证:预判 Word、LibreOffice、Google Docs 间的布局漂移风险,特别是表格、嵌入字体、复制样式等常见问题

潜在局限

  • 学习曲线陡峭:需理解 OOXML 结构才能高效使用,不适合仅需简单文本替换的场景
  • 旧格式限制:.doc 文件需先转换,.docm 宏文档被视为高风险需额外处理
  • 实时渲染滞后:字段缓存显示值可能滞后,需手动刷新才能确认最终效果
  • 工具依赖:复杂编辑需配合包布局检查,不能仅依赖渲染输出判断

适用人群

  • 法律/学术/商务审阅人员:需保留修订痕迹、批注、原始格式语境的专业审阅工作流
  • 文档工程师/模板设计者:构建可维护的企业级文档模板,控制样式继承与编号系统
  • 跨平台协作者:文档需在 Word、Google Docs、LibreOffice 间流转,需预判兼容性风险
  • 自动化文档生成开发者:基于 OOXML 结构批量生成复杂格式报告、合同、标书

常规风险

风险类型 具体表现 缓解建议
格式漂移 表格宽度、分页在不同编辑器中表现不一致 显式设置固定宽度,避免自动适应
修订元数据残留 已接受修订仍含隐藏删除文本或批注 交付前执行"接受所有修订"并检查 XML
样式污染 跨文档复制导入外来样式 使用"仅保留文本"粘贴或样式映射清理
字段失效 书签、交叉引用 ID 不匹配导致刷新失败 编辑时保持锚点稳定,避免整段重写
编号断裂 列表视觉正确但底层编号状态错误 检查 numPr 元素,必要时重建编号定义
节属性误设 手动分页代替分节符导致布局连锁错误 统一使用分节符控制页面设置变更

最佳实践总结

  • 读取优先于编辑:审阅任务先用结构保留读取,确认需求后再进入 OOXML 编辑模式
  • 最小替换原则:修订工作流中仅修改必要文本跨度,避免整段重写破坏审阅质量
  • 显式优于隐式:页面尺寸、表格宽度、样式应用均显式声明,减少默认行为依赖
  • 验证交付物:复杂文档交付前在目标编辑器中打开验证,执行字段刷新检查 |

技能正文


name: Word / DOCX slug: word-docx version: 1.0.2 homepage: https://clawic.com/skills/word-docx description: "Create, inspect, and edit Microsoft Word documents and DOCX files with reliable styles, numbering, tracked changes, tables, sections, and compatibility checks. Use when (1) the task is about Word or .docx; (2) the file includes tracked changes, comments, fields, tables, templates, or page layout constraints; (3) the document must survive round-trip editing without formatting drift." changelog: Tightened the skill around fragile review workflows, reference stability, and layout drift after a stricter external audit. metadata: {"clawdbot":{"emoji":"📘","os":["linux","darwin","win32"]}}

When to Use

Use when the main artifact is a Microsoft Word document or .docx file, especially when tracked changes, comments, headers, numbering, fields, tables, templates, or compatibility matter.

Core Rules

1. Treat DOCX as OOXML, not plain text

  • A .docx file is a ZIP of XML parts, so structure matters as much as visible text.
  • The critical parts are usually word/document.xml, styles.xml, numbering.xml, headers, footers, and relationship files.
  • Text may be split across multiple runs; never assume one word or sentence lives in one XML node.
  • Use different workflows on purpose: structured extraction for quick reading, style-driven generation for new files, and OOXML-aware editing for fragile existing documents.
  • If the job is mainly reading, extracting, or reviewing, prefer a structure-preserving read path before touching OOXML.
  • For deep edits, inspect the package layout instead of relying only on rendered output.
  • Reading, generating, and preserving an existing reviewed document are different jobs even when the format is the same.
  • Legacy .doc inputs usually need conversion before you can trust modern .docx assumptions.

2. Preserve styles and direct formatting deliberately

  • Prefer named styles over direct formatting so the document stays editable.
  • Styles layer: paragraph styles, character styles, and direct formatting do not behave the same.
  • Removing direct formatting is often safer than stacking more inline formatting on top.
  • When editing an existing file, extend the current style system instead of inventing a parallel one.
  • Copying content between documents can silently import foreign styles, theme settings, and numbering definitions.

3. Lists and numbering are their own system

  • Bullets and numbering belong to Word's numbering definitions, not pasted Unicode characters.
  • abstractNum, num, and paragraph numbering properties all matter, so restart behavior is rarely "visual only".
  • Indentation and numbering are related but not identical; a list can have broken numbering even if the indent looks right.
  • A list that looks correct in one editor can restart, flatten, or renumber itself later if the underlying numbering state is wrong.

4. Page layout lives in sections

  • Margins, orientation, headers, footers, and page numbering are section-level behavior.
  • First-page and odd/even headers can differ inside the same document, so one header fix may not fix the document.
  • Set page size explicitly because A4 and US Letter defaults change pagination and table widths.
  • Use section breaks for layout changes; manual spacing and stray page breaks usually create drift.
  • Header and footer media use part-specific relationships, so copied IDs often break images or links.
  • Tables, page breaks, and headers often drift together, so treat layout fixes as document-wide, not local cosmetic edits.
  • Table geometry depends on page width, margins, and fixed widths, so "close enough" table edits often break later in Google Docs or LibreOffice.

5. Track changes, comments, and fields need precise edits

  • Visible text is not the full document when tracked changes are enabled.
  • Insertions, deletions, and comments carry metadata that can survive careless edits.
  • Deleted text may still exist in the XML even when it no longer appears on screen.
  • Comment anchors and review ranges can break if edits move text without preserving the surrounding structure.
  • Comment markers and review wrappers do not behave like inline formatting, so moving text carelessly can orphan or misplace them.
  • Comments, footnotes, bookmarks, and linked media may live in separate parts, not only in the main document body.
  • Tables of contents, page numbers, dates, cross-references, and mail merge placeholders are fields.
  • Edit the field source carefully and expect cached display values to lag until refresh.
  • Hyperlinks, bookmarks, and references can break if IDs or relationships stop matching.
  • Bookmarks, footnotes, comment ranges, and cross-references depend on stable anchors even when the visible text seems untouched.
  • A document can look correct while still containing stale field output that refreshes later into something different.
  • For review workflows, make minimal replacements instead of rewriting whole paragraphs.
  • In tracked-change workflows, only the changed span should look changed; broad rewrites create noisy reviews and can destroy the original formatting context.
  • For legal, academic, or business review documents, default to review-style edits over wholesale paragraph rewrites unless the user explicitly wants a rewrite.

6. Verify round-trip compatibility before delivery

  • Complex documents can shift between Word, LibreOffice, Google Docs, and conversion tools.
  • Tables, headers, embedded fonts, and copied styles are common sources of layout drift.
  • Treat .docm as macro-bearing and higher risk; treat .doc as legacy input that may need conversion first.
  • When layout matters, explicit table widths are safer than auto-fit or percentage-style behavior that different editors reinterpret.
  • A document that passes a text check can still fail on pagination, table widths, or reference refresh after the recipient opens it.

Common Traps

  • Copy-paste can import unwanted styles and numbering definitions.
  • Header or footer images use part-specific relationships, so reusing IDs blindly breaks them.
  • Empty paragraphs used as spacing make templates fragile; spacing belongs in paragraph settings.
  • A clean-looking export can still hide unresolved revisions, comments, or stale field values.
  • Restarting lists "by eye" usually fails because numbering state lives outside the paragraph text.
  • One visible phrase can be split across several runs, bookmarks, revision tags, or field boundaries.
  • Replacing a whole paragraph to change one clause often breaks review quality, bookmarks, comments, or nearby inline formatting.
  • Deleting all visible text from a paragraph or list item can still leave behind an empty paragraph mark, empty bullet, or unstable numbering.
  • Table auto-fit and percentage-like width behavior can look acceptable in Word and still drift in Google Docs or LibreOffice.
  • LibreOffice and Google Docs can shift complex tables, section behavior, and embedded fonts even when Word looks perfect.
  • Compatibility mode can silently cap newer features or change pagination behavior.
  • A single change in page size or margin defaults can ripple through tables, headers, TOC, and cross-references.
  • A revision workflow can look accepted on screen while leftover metadata, comments, or field caches still make the file unstable later.
  • TOC entries, footnotes, and cross-references can look correct until the recipient updates fields and exposes broken anchors.

Related Skills

Install with clawhub install <slug> if user confirms:

  • documents — General document handling and format conversion.
  • brief — Concise business writing and structured summaries.
  • article — Long-form drafting and editorial structure.

Feedback

  • If useful: clawhub star word-docx
  • Stay updated: clawhub sync

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

worddocxooxmlmicrosoft-officedocument-editingtracked-changesdocument-compatibilitystylesnumberingreview-workflows

同类 Skill