← Back to Skills Marketplace
299
Downloads
0
Stars
4
Active Installs
4
Versions
Install in OpenClaw
/install diff-tool
Description
文本差异比较工具。比较两个文本、文件或字符串的差异,高亮显示新增、删除和修改的行。适合代码审查、文档对比、版本比对等场景。
README (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 输出,包含差异详情和统计
Usage Guidance
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.
Capability Analysis
Type: OpenClaw Skill
Name: diff-tool
Version: 1.0.2
The diff-tool skill is a standard utility for comparing text strings or files using Python's built-in difflib module. The code in scripts/diff.py is well-structured, uses only standard libraries, and contains no evidence of malicious behavior, data exfiltration, or command injection vulnerabilities.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install diff-tool - After installation, invoke the skill by name or use
/diff-tool - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- Version bump from 1.0.0 to 1.0.2 with no file changes detected.
- No new features, bug fixes, or documentation updates in this release.
v2.0.0
No changes detected in this version.
v1.0.1
No changes detected in this version.
- Version number updated to 1.0.1.
- No modifications to code or documentation.
v1.0.0
Initial release of diff-tool.
- 支持比较两个文本字符串或文件的差异
- 高亮显示新增(绿色)、删除(红色)、修改(黄色)内容
- 输出统计信息,包括新增/删除/修改行数
- 提供标准、简洁和 JSON 多种输出格式
- 可通过命令行参数忽略空白字符差异
Metadata
Frequently Asked Questions
What is Diff Tool?
文本差异比较工具。比较两个文本、文件或字符串的差异,高亮显示新增、删除和修改的行。适合代码审查、文档对比、版本比对等场景。 It is an AI Agent Skill for Claude Code / OpenClaw, with 299 downloads so far.
How do I install Diff Tool?
Run "/install diff-tool" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Diff Tool free?
Yes, Diff Tool is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Diff Tool support?
Diff Tool is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Diff Tool?
It is built and maintained by SxLiuYu (@sxliuyu); the current version is v1.0.2.
More Skills