Text Diff

v1.0.0

Compare two text files and display their differences using unified, context, or side-by-side diff formats with customizable options.

0· 150·2 current·2 all-time
byhaidong@harrylabsj

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for harrylabsj/text-diff.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Text Diff" (harrylabsj/text-diff) from ClawHub.
Skill page: https://clawhub.ai/harrylabsj/text-diff
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install text-diff

ClawHub CLI

Package manager switcher

npx clawhub@latest install text-diff
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (text diff) align with the included script and README. The skill only needs Python (already assumed) and works on two user-specified files; there are no unrelated dependencies or credentials requested.
Instruction Scope
SKILL.md instructs the agent to run the bundled Python script on two specified files. The script only reads the provided file paths and optionally writes output to a user-specified file — it does not access other system files, environment secrets, or network endpoints.
Install Mechanism
No install spec is provided (instruction-only). The package includes a plain Python script and docs; nothing is downloaded or executed from external URLs during install.
Credentials
No environment variables, credentials, or config paths are requested. The script reads files the user passes on the command line and optionally writes an output file — this is proportionate to the stated task.
Persistence & Privilege
The skill does not request always:true, does not modify other skills or system-wide settings, and runs only when invoked by the user (or agent) as normal.
Assessment
This is a local text comparison tool that reads the two file paths you give it and prints or saves a diff; it does not contact external services or access hidden credentials. If you install it, ensure you trust the skill source (it runs Python code from the skill directory). Confirm you have Python 3 available and be careful not to pass sensitive files to any tool unless you intend to view/compare them locally.

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

latestvk9722k1xmfrcm0thh5cr9cpdch838445
150downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

text-diff

Show line-by-line differences between two text files using Python's difflib.

Description

A utility skill for comparing two text files and displaying their differences in a readable format. Supports unified diff output and side-by-side comparison modes.

Usage

# Show unified diff between two files
python ~/.openclaw/skills/text-diff/text_diff.py unified file1.txt file2.txt

# Show side-by-side comparison
python ~/.openclaw/skills/text-diff/text_diff.py side-by-side file1.txt file2.txt

# Show context diff (3 lines of context)
python ~/.openclaw/skills/text-diff/text_diff.py context file1.txt file2.txt

# Compare with custom context lines
python ~/.openclaw/skills/text-diff/text_diff.py unified file1.txt file2.txt -c 5

Options

  • unified: Show unified diff format (default)
  • context: Show context diff format
  • side-by-side: Show line-by-line comparison
  • -c, --context: Number of context lines (default: 3)
  • -o, --output: Save diff to file instead of stdout
  • --no-color: Disable colored output

Examples

# Basic unified diff
python ~/.openclaw/skills/text-diff/text_diff.py unified old.txt new.txt

# Side-by-side comparison with no colors (for piping)
python ~/.openclaw/skills/text-diff/text_diff.py side-by-side old.txt new.txt --no-color

# Save diff to file
python ~/.openclaw/skills/text-diff/text_diff.py unified old.txt new.txt -o diff.txt

# Compare with 10 lines of context
python ~/.openclaw/skills/text-diff/text_diff.py context old.txt new.txt -c 10

Output Format

Unified Diff

--- old.txt
+++ new.txt
@@ -1,5 +1,5 @@
 line 1
 line 2
-line 3 (removed)
+line 3 (added)
 line 4
 line 5

Side-by-Side

OLD                          | NEW
---------------------------- | ----------------------------
line 1                       | line 1
line 2                       | line 2
line 3 (removed)             | line 3 (added)
line 4                       | line 4

Exit Codes

  • 0: Files are identical
  • 1: Files differ
  • `

Comments

Loading comments...