diff-tool

文本差异比较工具。比较两个文本、文件或字符串的差异,高亮显示新增、删除和修改的行。适合代码审查、文档对比、版本比对等场景。

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 "diff-tool" with this command: npx skills add sxliuyu/diff-tool

Diff Tool 🧐

文本差异比较工具,快速比较两个文本或文件的差异。

功能

  • 📝 比较两个文本字符串的差异
  • 📄 比较两个文件的差异
  • 🔍 高亮显示新增(绿色)、删除(红色)、修改(黄色)内容
  • 📊 显示统计信息(新增/删除/修改行数)
  • 🎨 支持多种输出格式(标准/简洁/JSON)

使用方法

比较两个字符串

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

JSON 输出(适合程序处理)

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

输出格式说明

  • 标准格式:完整 diff 输出,带颜色标注
  • 简洁格式:只显示有差异的行
  • JSON 格式:机器可读的 JSON 输出,包含差异详情和统计

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

Gigo Lobster Resume

🦞 GIGO · gigo-lobster-resume: 续跑入口:v2 stable 当前会清理旧 checkpoint 并从头重跑;保留此 slug 作为旧 checkpoint 兼容入口。 Triggers: 继续试吃 / 恢复评测 / resume tasting / continue lobster...

Registry SourceRecently Updated
General

YiHui CONTEXT MODE

context-mode is an MCP server that saves 98% of your context window by sandboxing tool outputs. It routes large file reads, shell outputs, and web fetches th...

Registry SourceRecently Updated
General

xinyi-drink

Use when users ask about 新一好喝/新一咖啡 drinks, stores, menu, activities, Skill用户大礼包, today drink recommendations, afternoon tea, feeling sleepy, or personalized...

Registry SourceRecently Updated
General

vedic-destiny

吠陀命盘分析中文入口。用于完整命盘研判、命主盘 Rashi chart 与九分盘 Navamsha chart 联读、既往事件回看、出生时间稳定度判断、事业主题、婚姻主题、时空盘专题,以及基于 Jagannatha Hora PDF、星盘截图或文本命盘数据的系统拆盘。当用户提到完整星盘、事业方向、婚姻问题、关系窗...

Registry SourceRecently Updated