← Back to Skills Marketplace
johnnywang2001

Jrv Text Diff

by John Wang · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
161
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install jrv-text-diff
Description
Compare two text files or strings side-by-side or unified. Highlights additions, deletions, and changes with color. Supports word-level diff, ignore-whitespa...
README (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 identical
  • 1 — Files differ
  • 2 — Error (file not found, parse error, etc.)
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install jrv-text-diff
  3. After installation, invoke the skill by name or use /jrv-text-diff
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug jrv-text-diff
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 161 downloads so far.

How do I install Jrv Text Diff?

Run "/install jrv-text-diff" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Jrv Text Diff free?

Yes, Jrv Text Diff is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Jrv Text Diff support?

Jrv Text Diff is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Jrv Text Diff?

It is built and maintained by John Wang (@johnnywang2001); the current version is v1.0.0.

💬 Comments