Diff Tool

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

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 44 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description describe a text/file diff utility and the package contains a Python script that implements that functionality. The only minor inconsistency is metadata: _meta.json declares a dependency on 'python3' while the top-level registry metadata lists no required binaries, and SKILL.md/version strings show 1.0.0 while registry version is 1.0.2. These are bookkeeping issues but do not indicate malicious behavior.
Instruction Scope
SKILL.md instructs running the included Python script to compare two strings or files. The runtime instructions and script operate only on provided inputs and filesystem paths the user supplies; there are no steps that read unrelated system state, exfiltrate data, call external endpoints, or access environment variables beyond normal execution.
Install Mechanism
There is no install spec — this is effectively instruction-only with an included script. No network downloads, package installs, or archive extraction are present. The code is local and will run with the system Python if executed by the user/agent.
Credentials
The skill requests no environment variables, credentials, or config paths. That matches its purpose. The only implicit requirement is a Python 3 runtime to execute scripts, which is reasonable.
Persistence & Privilege
Skill flags are default (always: false, model invocation allowed). It does not request permanent presence or modify other skills/configuration. Autonomous invocation is permitted by platform default but not combined with any high-risk requests.
Assessment
This appears to be a simple, local diff utility. Before installing or running it: (1) verify you trust the author/source because the package has no homepage and an opaque owner ID; (2) be aware the script will read any file paths you pass to it — avoid diffing secrets or sensitive files unless you trust the environment; (3) ensure Python 3 is available; (4) the metadata/version strings are slightly inconsistent (minor bookkeeping issue). There are no network calls or credential requests in the code, so the main risk is accidental exposure of files you choose to diff.

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

Current versionv1.0.2
Download zip
latestvk97cw0yy7kfnc9ws4y1djd38cd831je5

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

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 输出,包含差异详情和统计

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…