Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

word-track-changes词轨变化

Agent Skill

word-track-changes 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,172

周安装

87

GitHub Stars

公开资料未说明

下载量

703
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:word-track-changes(词轨变化)
来源仓库:https://github.com/elio-huang-15/word-track-changes
安装命令:
openclaw skills install word-track-changes
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install word-track-changes

简介

启用 Microsoft Word 修订模式,精确跟踪文本变更与段落级替换记录。

  • 适合多人协同编辑、法务审核或学术校对等需要留痕追溯的工作流。
  • 支持正则表达式匹配与批量操作,提升大规模文档处理效率。
  • 必须安装完整版 Word 才能激活 OOXML 底层接口,精简版 Office 不可用。
  • 修订状态关闭后修改仍可追溯,但频繁开关会影响性能表现。

SKILL.md

name
word-track-changes
description
Enable Microsoft Word's Track Changes (修订模式) on documents using native OOXML elements. Supports cross-run text matching and precise paragraph-level replacement. Use when agents need to modify Word documents with tracked changes that show up as insertions (green) and deletions (red strikethrough) in Word's Review pane. Handles real-world DOCX files where text is split across multiple w:t nodes.

Word Track Changes Skill

Enable native Microsoft Word Track Changes functionality using OpenXML. Handles real-world DOCX files where text is split across multiple <w:t> nodes.

When to Use

Use this skill when you need to:

  • Edit a Word document while preserving a visible record of changes
  • Show insertions as green underlined text
  • Show deletions as red strikethrough text
  • Allow users to accept/reject changes in Word's Review pane
  • Replace text that may be split across multiple <w:r> / <w:t> elements

Quick Start

1. Enable Track Changes on a Document

python ~/.openclaw/skills/word-track-changes/scripts/enable_tracking.py input.docx output.docx

2. Replace Text with Revision Mark

from track_changes import TrackChangesProcessor

p = TrackChangesProcessor("document.docx")
p.set_author("Agent")
p.replace_text_with_revision(
    old_text="existing text to replace",
    new_text="new text with revision mark"
)
p.save("output.docx")
p.cleanup()

3. Insert a New Paragraph with Revision Mark

from track_changes import TrackChangesProcessor

p = TrackChangesProcessor("document.docx")
p.set_author("Agent")
p.insert_paragraph_after(
    search_text="text before new paragraph",
    new_text="New paragraph shown as insertion."
)
p.save("output.docx")
p.cleanup()

4. Batch Multiple Revisions

from track_changes import batch_revisions

revisions = [
    {"type": "replace", "old": "old text 1", "new": "new text 1"},
    {"type": "insert_after", "search": "anchor text", "new": "inserted paragraph"},
]

batch_revisions(
    "input.docx",
    revisions,
    author="Agent",
    output_path="output.docx"
)

Key Capabilities

CapabilityDescription
Cross-Run MatchingFinds text even when Word splits it across multiple <w:t> nodes
Paragraph-Level PrecisionOnly replaces the target text within its paragraph, preserving all other content
Format PreservationCopies existing run properties (<w:rPr>) for consistent font/style
Batch RevisionsApply multiple tracked changes in a single pass
Track Changes SettingsAutomatically enables trackRevisions in settings.xml

Technical Details

OOXML Elements Used

  • <w:ins> — Insertion mark (green, underlined)
  • <w:del> — Deletion mark (red strikethrough)
  • <w:delText> — Deleted text content

Architecture

DOCX (ZIP archive)
├── word/document.xml      ← Main content (modified with revision marks)
├── word/settings.xml      ← Track changes settings (updated if needed)
└── ...

The processor:

  1. Unzips the DOCX into a temporary directory
  2. Parses word/document.xml
  3. Builds a paragraph-level text index to locate target text across split <w:t> nodes
  4. Inserts <w:ins> / <w:del> at the exact position
  5. Re-zips into a valid DOCX

Scripts Reference

All scripts are in scripts/ directory:

ScriptPurpose
track_changes.pyCore library with TrackChangesProcessor
enable_tracking.pyCLI tool to enable track changes
insert_revision.pyCLI tool to replace text with revision marks
delete_revision.pyCLI tool to mark text for deletion
batch_revisions.pyCLI tool for processing multiple revisions from stdin

Python API

TrackChangesProcessor(docx_path)

Main class for processing a DOCX file.

Methods

  • set_author(author) — Set the revision author name.
  • replace_text_with_revision(old_text, new_text) — Replace text inside a paragraph with tracked changes. Raises ValueError if old_text is not found.
  • insert_paragraph_after(search_text, new_text) — Insert a new paragraph after the paragraph containing search_text, marked as <w:ins>.
  • enable_track_changes() — Update word/settings.xml to enable track revisions.
  • save(output_path) — Write the modified DOCX.
  • cleanup() — Remove temporary files.

Helper Functions

  • enable_track_changes(input, output)
  • insert_text_with_revision(input, search, new, author, output)
  • mark_deletion(input, target, author, output)
  • batch_revisions(input, revisions, author, output)

Example: Real-World Report Update

See example_usage.py for a complete working example.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

91.85%
按下载量换算646

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills