PolarHub
  • Agents
  • MCP Servers
  • Skills
  • PolarBear
PolarHub © 2026
技能市场办公效率Word / DOCX
返回「办公效率」

Word / DOCX

by ivangdavila·skillhub

15下载461星标办公效率

简介

创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。

SKILL.md 详细内容

来自 SKILLHUB · 7KB

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

相关 Skills(来自「办公效率」)

PPT制作

使用python-pptx制作科技风PPT,支持多布局、多图文混排及HTML内容嵌入,轻松生成专业演示文稿。

238

Excel / XLSX

创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。

16384

PDF Extract

从PDF和图片中提取结构化数据,包括表格、OCR文字、图片和印章,基于ComPDF数据提取和AI文档技术。

1299

Powerpoint / PPTX

创建、检查和编辑 Microsoft PowerPoint 演示文稿及 PPTX 文件,支持可靠的布局、模板、占位符、备注、图表和视觉质检。...

7173

Document Pro

文档处理技能 - 让 AI 能够读取、解析、提取 PDF、DOCX、PPT 等文档的关键信息。当用户要求分析文档、提取内容、总结报告时触发此...

626

Data Analysis

\{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"\}

4211

给 Agent 的安装提示词

复制下方脚本发给 AI,Agent 会自动完成下载和解压

Download and install a skill. Follow these steps EXACTLY. If any step fails, STOP and report the error.

SKILL_NAME="word-docx"
DOWNLOAD_URL="https://api.skillhub.cn/api/v1/download?slug=word-docx"
INSTALL_CMD="claw skill install ivangdavila/word-docx"

STEP 1 - FIND SKILL DIRECTORY
[ -d "$HOME/.agents/skills" ] && echo "USER: $HOME/.agents/skills"
[ -d "$PWD/.agents/skills" ] && echo "PROJECT: $PWD/.agents/skills"
for d in "$HOME"/.*/skills; do [ -d "$d" ] && echo "USER: $d"; done
for d in "$PWD"/.*/skills; do [ -d "$d" ] && echo "PROJECT: $d"; done

Decide based on output (deduplicate lines first):
a) Only USER lines -> INSTALL_DIR="<that dir>/$SKILL_NAME"
b) Only PROJECT lines -> INSTALL_DIR="<that dir>/$SKILL_NAME"
c) Both USER and PROJECT -> ask the user to pick global install or project install.
d) Nothing found -> mkdir -p "$HOME/.agents/skills"; INSTALL_DIR="$HOME/.agents/skills/$SKILL_NAME"

STEP 2 - PREPARE
[ -f "$INSTALL_DIR/SKILL.md" ] && echo "EXISTS" || echo "NEW"
# If EXISTS, ask user whether to overwrite. If no, STOP.
mkdir -p "$INSTALL_DIR"

STEP 3 - DOWNLOAD
TMPDIR=$(mktemp -d)
curl -fSL -o "$TMPDIR/skill.zip" "$DOWNLOAD_URL" 2>/dev/null || wget -q -O "$TMPDIR/skill.zip" "$DOWNLOAD_URL"
# If both fail, try INSTALL_CMD as fallback: $INSTALL_CMD
# If still fail, STOP.

STEP 4 - EXTRACT & INSTALL
unzip -o "$TMPDIR/skill.zip" -d "$TMPDIR/ext" 2>/dev/null || python3 -m zipfile -e "$TMPDIR/skill.zip" "$TMPDIR/ext"
# If both fail, this is not a valid ZIP. STOP.

SKILL_PATH=$(find "$TMPDIR/ext" -maxdepth 2 -name "SKILL.md" -print | head -1)
if [ -n "$SKILL_PATH" ]; then
  cp -R "$(dirname "$SKILL_PATH")"/. "$INSTALL_DIR"/
else
  echo "FATAL: SKILL.md not found"; find "$TMPDIR/ext" -type f
fi

STEP 5 - VERIFY
head -5 "$INSTALL_DIR/SKILL.md"

DONE
Read "$INSTALL_DIR/SKILL.md" and follow its instructions to finish the user's task.
粘贴到 Claude / Cursor / Codex 等 Agent 后,会按步骤自动安装到 ~/.agents/skills/

自动安装

通过 PolarBear 协议从 ZIP 地址导入 Skill

Skill 压缩包地址
https://api.skillhub.cn/api/v1/download?slug=word-docx

polarbear://skills/download?name=word-docx&url=https%3A%2F%2Fapi.skillhub.cn%2Fapi%2Fv1%2Fdownload%3Fslug%3Dword-docx

手动安装

3 步完成

  1. 1

    下载 Skill 压缩包

    下载 ZIP
  2. 2

    将其解压到 Agent 的 Skills 目录

    ~/.agents/skills/word-docx/
  3. 3

    重启或重新加载 Agent,让 Skill 可用

    重启 Agent 客户端,或刷新会话后即可调用此 Skill。

来源

平台
skillhub
作者
ivangdavila
Slug
word-docx
在源站查看