← 返回 Skills 市场
161
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install jrv-text-diff
功能描述
Compare two text files or strings side-by-side or unified. Highlights additions, deletions, and changes with color. Supports word-level diff, ignore-whitespa...
使用说明 (SKILL.md)
jrv-text-diff
Compare two texts, files, or code snippets and show exactly what changed. Supports unified diff, side-by-side view, word-level highlighting, and structural diff for JSON/YAML.
Quick Start
# Compare two files
python3 scripts/text_diff.py file1.txt file2.txt
# Compare inline strings
python3 scripts/text_diff.py --text "hello world" --text2 "hello there"
# Unified diff (patch format)
python3 scripts/text_diff.py file1.txt file2.txt --format unified
# Side-by-side comparison
python3 scripts/text_diff.py file1.txt file2.txt --format side-by-side
# Word-level diff
python3 scripts/text_diff.py file1.txt file2.txt --word-diff
# Ignore whitespace
python3 scripts/text_diff.py file1.txt file2.txt --ignore-whitespace
# JSON structural diff
python3 scripts/text_diff.py data1.json data2.json --format json
# YAML structural diff
python3 scripts/text_diff.py config1.yaml config2.yaml --format yaml
# Output diff as JSON report
python3 scripts/text_diff.py file1.txt file2.txt --output-json
Commands
| Command | Description |
|---|---|
text_diff.py \x3Cfile1> \x3Cfile2> |
Compare two files (default: unified diff) |
--text \x3Cstr> --text2 \x3Cstr> |
Compare two inline strings |
--format unified |
Unified patch-style diff output |
--format side-by-side |
Two-column comparison |
--format context |
Context diff (like diff -c) |
--format json |
Structural JSON diff |
--format yaml |
Structural YAML diff |
--word-diff |
Highlight word-level changes within lines |
--ignore-whitespace |
Ignore leading/trailing whitespace |
--ignore-case |
Case-insensitive comparison |
--context N |
Lines of context (default: 3) |
--output-json |
Output diff stats as JSON |
--no-color |
Disable ANSI color output |
Use Cases
- Code review: See exactly what changed between two versions of a config or script
- Config auditing: Spot differences between prod and staging configs
- JSON/YAML diffs: Structural comparison ignoring key ordering
- Copy editing: Word-level diff for prose documents
- CI pipelines: JSON output for programmatic diff analysis
Exit Codes
0— Files are identical1— Files differ2— Error (file not found, parse error, etc.)
安全使用建议
This skill is a local diff tool and appears to do only what it says: compare two texts/files and print differences. It does read any file paths you give it, so avoid passing it sensitive files unless you intend to diff them. YAML diffs require PyYAML (the script will error if it's absent). There are no network calls or hidden endpoints in the code, but as with any script you run, inspect inputs and only run it in environments where executing a bundled Python script is acceptable.
功能分析
Type: OpenClaw Skill
Name: jrv-text-diff
Version: 1.0.0
The jrv-text-diff skill is a legitimate utility for comparing text files, strings, JSON, and YAML data. The core logic in scripts/text_diff.py uses standard Python libraries like difflib and json to generate various diff formats (unified, side-by-side, word-level) without any evidence of malicious behavior, data exfiltration, or suspicious command execution.
能力评估
Purpose & Capability
Name/description (text diff, unified/side-by-side/JSON/YAML support) match the included Python script and SKILL.md examples. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs running scripts/text_diff.py with files or inline strings. The script reads only the provided inputs, parses JSON/YAML locally, and prints diffs. There are no instructions to read unrelated system files, query external endpoints, or exfiltrate data.
Install Mechanism
No install spec provided (instruction-only plus included script). The code runs with python3 on-path; nothing is downloaded or written to disk by an installer step.
Credentials
No environment variables, secrets, or external credentials are requested. The only optional dependency is PyYAML for YAML diffs (the script prints an error and exits if it's not installed).
Persistence & Privilege
always is false and the skill does not modify other skills or system-wide settings. It has no elevated persistence or privilege demands.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install jrv-text-diff - 安装完成后,直接呼叫该 Skill 的名称或使用
/jrv-text-diff触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of jrv-text-diff.
- Compare two texts, files, or code snippets with clear visualization of differences.
- Supports unified diff, side-by-side view, context diff, and structural diff for JSON/YAML.
- Word-level highlighting, ignore-whitespace, and case-insensitive comparison available.
- Command-line interface with flexible input options for files or inline strings.
- Outputs include colorized terminal diff, JSON reports, and configurable context lines.
- Appropriate exit codes for scripting and CI integration.
元数据
常见问题
Jrv Text Diff 是什么?
Compare two text files or strings side-by-side or unified. Highlights additions, deletions, and changes with color. Supports word-level diff, ignore-whitespa... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 161 次。
如何安装 Jrv Text Diff?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install jrv-text-diff」即可一键安装,无需额外配置。
Jrv Text Diff 是免费的吗?
是的,Jrv Text Diff 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Jrv Text Diff 支持哪些平台?
Jrv Text Diff 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Jrv Text Diff?
由 John Wang(@johnnywang2001)开发并维护,当前版本 v1.0.0。
推荐 Skills