DOCX Compare / Duplicate Check

Compare two Word documents (DOCX) to find duplicate text paragraphs and duplicate images. Supports exact string matching, fuzzy matching (difflib), and image MD5 hash comparison. Outputs highlighted DOCX files and a detailed text report. Use when: (1) a user asks to check or compare duplicate content between two Word documents; (2) review for content overlap, version comparison, or plagiarism detection; (3) need to locate duplicated images across documents.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "DOCX Compare / Duplicate Check" with this command: npx skills add zmz209/docx-compare

DOCX 文档查重工具

比较两个 Word 文档(.docx),找出重复的文本段落和重复的图片。

什么时候用

  • 用户说"帮我查一下这两个 Word 文档内容有没有重复"
  • 比较同一文档的不同版本,找出新增/重复内容
  • 需要定位跨文档的重复图片

快速开始

# 最基本用法:比较两个 docx
python scripts/compare_docx.py --file1 文档A.docx --file2 文档B.docx

# 指定输出目录
python scripts/compare_docx.py --file1 文档A.docx --file2 文档B.docx --output ./对比结果

功能说明

模式说明阈值
精确匹配标准化后完全相同的段落100%
模糊匹配相似度超过阈值的段落≥95%
图片查重通过 MD5 哈希值比较图片100%

输出

  • *_标记重复.docx — 高亮标记了重复文字的原始文档
  • *_标记图片重复.docx — 标注了重复图片的原始文档
  • *_重复报告.txt — 纯文本详细对比报告

脚本参数

python scripts/compare_docx.py \
  --file1 <路径>          # 必需:第一个文档
  --file2 <路径>          # 必需:第二个文档
  --output <目录>         # 可选:输出目录(默认同目录)
  --mode all|text|image   # 可选:检查模式(默认 all)
  --threshold 0.95        # 可选:模糊匹配相似度阈值(默认 0.95)

依赖

  • python-docx 用于读写 DOCX 文件
  • difflib(标准库)用于模糊匹配
  • hashlib(标准库)用于图片 MD5 计算

安装依赖:

pip install python-docx

常见陷阱

  • 仅支持 .docx 格式,不支持旧版 .doc(需要先转换)
  • 图片重复检测基于文件内容(MD5),同一张图被不同文件名存储会被判定为重复
  • 段落模糊匹配使用 difflib.SequenceMatcher,CPU 开销随段落数平方增长
  • 输出 DOCX 使用黄色高亮标记,不会修改原始文档
  • 中文段落含混合标点时,模糊匹配效果可能低于预期

相关 Skill

  • word-docx — 通用 Word 文档创建、编辑、格式调整

Feedback

  • 如果觉得有用:clawhub star docx-compare
  • 保持更新:clawhub sync

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Polymarket Politics Random Buyer

Randomly finds a live Polymarket politics market, checks trading context, and buys 1 USDC by default with explicit dry-run and live modes for AION Market.

Registry SourceRecently Updated
General

DB Schenker

德国铁路集团旗下物流巨头,专注欧洲最大陆运网络及多式联运,提供空运、海运及合同物流服务。

Registry SourceRecently Updated
General

Secretary Memory

OpenClaw 秘书式多分区记忆系统 v3.0。仿生现代秘书的笔记本分类法,支持:(1) 多分区并发搜索 + 每分区3条上下文召回,(2) 会话自动摘要,(3) 偏好自动提取 + 用户关系图谱,(4) 记忆冲突主动检测,(5) 定时 consolidation + 会话结束 hook,(6) 精细化恢复/回溯,...

Registry SourceRecently Updated
General

Hunt

Digital bounty hunter skill for finding, tracking, and managing online hackathon opportunities. Trigger when the user says "hunt", "find hackathons", "show m...

Registry SourceRecently Updated