Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

用于为Word文档开启并调整修订模式,添加、删除批注等功能

v1.0.0

Word文档 (.docx) 处理,支持修订模式(Track Changes)和批注操作。使用场景:(1) 修订模式 - 添加插入/删除修订、红字标注;(2) 批注操作 - 添加、删除、查看批注;(3) 文档内容修改。当用户要求"修订"、"track changes"、"批注"、"红字修订"、"添加评论"、"添加...

0· 230·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for hanselxie/docx-trackchanges-and-comments.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "用于为Word文档开启并调整修订模式,添加、删除批注等功能" (hanselxie/docx-trackchanges-and-comments) from ClawHub.
Skill page: https://clawhub.ai/hanselxie/docx-trackchanges-and-comments
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install docx-trackchanges-and-comments

ClawHub CLI

Package manager switcher

npx clawhub@latest install docx-trackchanges-and-comments
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The name/description match the actual implementation: the provided Python script manipulates OOXML (docx) to add insert/delete revisions and inline comment text. No unrelated services or credentials are requested, and the SKILL.md documents the same XML files and operations the script performs.
Instruction Scope
Most instructions stay on-topic (unzipping docx, editing XML, repackaging). However, SKILL.md includes a hard-coded/example local path (/Users/hansel/.openclaw/media/inbound) and shell commands that operate on local files; this implies the agent will access files on the host filesystem where the agent runs. The manual procedure also suggests reading and writing arbitrary docx files in those locations, which is expected for a file-editing skill but worth noting for privacy.
!
Install Mechanism
This is an instruction-only skill with no install spec, but the script imports 'docx' (python-docx). The skill does not declare or install this dependency, so it may fail at runtime or require the platform to already provide python-docx. Lack of declared dependencies is a packaging hygiene issue (not necessarily malicious) and may hide the need for network installs when users try to run it.
Credentials
The skill requests no environment variables or credentials (good). However, SKILL.md's example uses a specific user path (the agent's inbound media directory) which suggests the skill expects to read files from the agent's environment. That is proportionate to the stated purpose (processing uploaded .docx files) but you should be aware it will read and write local files the agent can access.
Persistence & Privilege
No 'always: true' or other privileged flags. The skill does not attempt to modify other skills or system-wide configuration; it operates on files it is given. Autonomous invocation is allowed by default but not combined with other high-risk indicators here.
What to consider before installing
This skill appears to implement what it claims (editing .docx to add track-changes and comments), but consider the following before installing or running it: - Dependency: The script imports python-docx (module name 'docx') but the skill provides no install instructions. Ensure the runtime has python-docx installed or be prepared to install it in a controlled environment. - Local file access: The instructions include operations on local paths (example: /Users/hansel/.openclaw/media/inbound). Running the skill will read and write .docx files on the host where the agent runs — only run it on files you trust and in an environment where reading those files is appropriate. - Back up originals: The script copies input to output and edits the copy, but direct XML edits can corrupt documents. Keep backups of originals before batch processing. - Verify authorship/date fields: The code uses a fixed ISO timestamp in created elements; if author/date accuracy matters, review or modify the script to set them appropriately. - Run in sandbox: Because the skill will perform filesystem operations, run it first in a sandbox or test environment with non-sensitive documents to confirm behavior. If you want to proceed, ask the skill owner to (a) declare or provide an install step for python-docx, (b) remove or clarify the hard-coded example path to avoid confusion, and (c) confirm there are no hidden network endpoints (none are present in the code provided).

Like a lobster shell, security has layers — review code before you run it.

latestvk97fy8r4j7mmrtf2b7ne32zcbx8356wt
230downloads
0stars
1versions
Updated 5h ago
v1.0.0
MIT-0

Word 文档处理 (修订模式 + 批注)

概述

Word 文档基于 OOXML 标准,内部结构为 ZIP 包,主要 XML 文件:

  • word/document.xml - 文档正文内容
  • word/comments.xml - 批注内容存储
  • word/settings.xml - 文档设置(包含修订模式开关)

快速开始

使用脚本添加修订/批注

手动操作流程

  1. 解压文档:unzip -o document.docx -d docx_temp
  2. 编辑 XML 文件
  3. 重新打包:cd docx_temp && zip -r ../output.docx . && cd .. && rm -rf docx_temp

功能一:修订模式 (Track Changes)

启用修订模式

word/settings.xml 中添加:

<w:trackChanges>true</w:trackChanges>

添加插入修订

from scripts.track_changes import add_insertion
add_insertion(doc, "要插入的新内容", author="何大拿")

XML 原理:使用 <w:ins> 标签包裹插入内容(绿色下划线)

添加删除修订

from scripts.track_changes import add_deletion
add_deletion(doc, "要删除的原文", author="何大拿")

XML 原理:使用 <w:del> 标签包裹删除内容(红色删除线)


功能二:批注操作

批注结构

批注涉及两个文件:

  1. word/comments.xml - 存储批注内容
  2. word/document.xml - 存储批注引用位置

快速查看批注

cd /path/to/inbound
unzip -o document.docx -d docx_temp
cat docx_temp/word/comments.xml

添加批注(XML 级别)

Step 1: 解压文档

cd /Users/hansel/.openclaw/media/inbound
unzip -o document.docx -d docx_temp

Step 2: 编辑 XML

需要修改两个文件:

2.1 修改 comments.xml

找到下一个可用的 comment ID:

grep -o 'w:id="[0-9]*"' docx_temp/word/comments.xml | sed 's/w:id="//;s/"//' | sort -n | tail -1

假设下一个 ID 是 1,添加新批注:

<w:comment w:id="1" w:author="你的名字" w:date="2026-03-17T14:00:00Z" w:initials="XX">
  <w:p w:rsidRDefault="00C227CD">
    <w:r><w:t>批注内容</w:t></w:r>
  </w:p>
</w:comment>

XML 实体转义:&&amp;<&lt;>&gt;

2.2 修改 document.xml

在需要添加批注的文本位置添加标记:

<!-- 批注开始标记 -->
<w:commentRangeStart w:id="1"/>

<!-- 被批注的文本 -->
<w:r><w:t>这里是正文内容</w:t></w:r>

<!-- 批注结束标记 -->
<w:commentRangeEnd w:id="1"/>

<!-- 批注引用标记(显示为上标数字) -->
<w:r>
  <w:rPr>
    <w:rStyle w:val="CommentReference"/>
  </w:rPr>
  <w:commentReference w:id="1"/>
</w:r>

⚠️ 重要

  • <w:commentRangeStart><w:commentRangeEnd><w:p>同级兄弟元素
  • <w:commentReference> 需要包裹在 <w:r>

Step 3: 重新打包

cd docx_temp && zip -r ../output.docx . && cd ..
rm -rf docx_temp

删除批注

  1. comments.xml 中删除对应的 <w:comment> 元素
  2. document.xml 中删除三处标记:
    • <w:commentRangeStart w:id="X"/>
    • <w:commentRangeEnd w:id="X"/>
    • 包含 <w:commentReference w:id="X"/> 的整个 <w:r> 元素
  3. 重新打包

接受批注(将批注内容合并到正文)

  1. document.xml 中删除三处批注标记
  2. 保留 comments.xml 中的批注内容(可选)
  3. 重新打包

批注 XML 详解

comments.xml 结构

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:comments xmlns:w="...">
  <w:comment w:id="0" w:author="作者名" w:date="2026-01-01T12:00:00Z" w:initials="XX">
    <w:p w:rsidRDefault="00C227CD">
      <w:r><w:rPr><w:rStyle w:val="ae"/></w:rPr><w:annotationRef/></w:r>
      <w:r><w:t>批注内容</w:t></w:r>
    </w:p>
  </w:comment>
</w:comments>

document.xml 中的批注引用

<w:p>
  <w:commentRangeStart w:id="0"/>
  <w:r><w:t>被批注的文本</w:t></w:r>
  <w:commentRangeEnd w:id="0"/>
  <w:r>
    <w:rPr>
      <w:rStyle w:val="CommentReference"/>
    </w:rPr>
    <w:commentReference w:id="0"/>
  </w:r>
</w:p>

注意事项

  • 作者名称:建议使用英文或拼音
  • 日期格式:ISO 8601 格式,如 2026-03-17T14:00:00Z
  • ID 唯一性:每个批注的 ID 必须唯一,且在两个 XML 文件中保持一致
  • initials:作者名缩写,2个字符为宜

Comments

Loading comments...