Install
openclaw skills install diff-tool文本差异比较工具。比较两个文本、文件或字符串的差异,高亮显示新增、删除和修改的行。适合代码审查、文档对比、版本比对等场景。
openclaw skills install diff-tool文本差异比较工具,快速比较两个文本或文件的差异。
python3 scripts/diff.py string "第一段文本" "第二段文本"
python3 scripts/diff.py file /path/to/file1.txt /path/to/file2.txt
python3 scripts/diff.py file /path/to/file1.txt /path/to/file2.txt --format simple
python3 scripts/diff.py file /path/to/file1.txt /path/to/file2.txt --format json
# 比较两段代码
python3 scripts/diff.py string "def hello(): print('hello')" "def hello(): print('Hello World')"
# 比较两个文件并显示统计
python3 scripts/diff.py file /tmp/a.txt /tmp/b.txt --stats
# 忽略空白字符差异
python3 scripts/diff.py string "a b" "a b" --ignore-space