Install
openclaw skills install doc-diffCompare two documents or files and generate a structured diff report. Use when: user asks to compare files, find differences between documents, generate diff report, or check what changed between two versions.
openclaw skills install doc-diffCompare two documents or files and generate a structured difference report in Chinese.
✅ USE this skill when:
Ask the user for the two file paths to compare if not provided.
# Basic diff (line by line)
diff file_a.txt file_b.txt
# Unified format (shows context lines, recommended)
diff -u file_a.txt file_b.txt
# Side-by-side comparison
diff -y --width=120 file_a.txt file_b.txt
# Ignore whitespace differences
diff -u -b -B file_a.txt file_b.txt
# Word-level diff (more granular)
diff -u --word-diff=plain file_a.txt file_b.txt
# Compare two directories recursively
diff -rq dir_a/ dir_b/
# Full diff of all files in directories
diff -ru dir_a/ dir_b/
After running diff, present the results as a structured report with these sections:
+)-)Present the report in Chinese with clear sections:
📄 文档对比报告
================
文件 A: <path>
文件 B: <path>
📊 变更概览
- 新增行数: X
- 删除行数: X
- 变更行数: X
➕ 新增内容
...
➖ 删除内容
...
📝 变更摘要
...