← Back to Skills Marketplace
sky-lv

Code Diff Tool

by SKY-lv · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
68
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install code-diff-tool
Description
Generates beautiful side-by-side diff comparisons for code review
README (SKILL.md)

skylv-diff-viewer

Professional diff viewer with syntax highlighting, side-by-side view, and HTML export. LCS-based diff for any file type.

Skill Metadata

  • Slug: skylv-diff-viewer
  • Version: 1.0.0
  • Description: Professional diff viewer for code and text files. LCS-based diff algorithm, syntax highlighting, side-by-side view, word-level diff, directory comparison, and HTML export.
  • Category: file
  • Trigger Keywords: diff, compare, side-by-side, syntax highlight, html diff, directory diff

What It Does

# Unified diff (default)
node diff_engine.js diff file1.js file2.js

# Side-by-side view
node diff_engine.js sbs file1.js file2.js

# Word-level diff
node diff_engine.js words old.txt new.txt

# Export as standalone HTML
node diff_engine.js html old.js new.js "v1 vs v2"
# Output: diff.html — open in any browser

# Compare directories
node diff_engine.js dir ./old-project ./new-project

# Git integration
node diff_engine.js git ./repo --stat

Features

Unified Diff

--- old.js
+++ new.js
@@ -5,12 +5,14 @@
-  if (x \x3C 0) return;        ← deletion (red)
+  if (x \x3C 0) { log(x); return; }  ← addition (green)
    return x * 2;

Side-by-Side View

OLD (file1.js)           | NEW (file2.js)
─────────────────────────┼────────────────────────
const x = 1              | const x = 2
- const y = 0            | + const y = 42
  return x + y           |   return x + y

HTML Export

Generates a self-contained HTML file with:

  • Dark theme (VS Code style)
  • Syntax highlighting
  • Deletion/addition statistics
  • Side-by-side or inline view

Architecture

diff-viewer/
├── diff_engine.js     # Core: LCS diff + renderers
├── SKILL.md
└── README.md

Diff Algorithm

  • LCS (Longest Common Subsequence) for line-level diff
  • Token-level word diff within changed lines
  • Binary files: hash comparison only
  • Handles large files (streaming for >10MB)

Real Market Data (2026-04-17)

Metric Value
Top competitor markdown-viewer (score: 0.990)
Other competitors diff-tool (0.781), pm-requirement-review-simulator (0.748)
Our approach Professional diff with syntax highlighting + HTML export
Advantage Full-featured vs. simple markdown viewer

Why Existing Competitors Are Weak

  • markdown-viewer (0.990): Just renders markdown, no diff capability
  • diff-tool (0.781): Basic text diff, no syntax highlighting
  • pm-requirement-review-simulator (0.748): Domain-specific, not general diff

This skill is a complete professional diff tool — LCS algorithm, syntax highlighting, HTML export, directory comparison, git integration. The competitors barely exist.


Compare: skylv-diff-viewer vs markdown-viewer

Feature skylv-diff-viewer markdown-viewer
LCS diff algorithm
Syntax highlighting
Side-by-side view
Word-level diff
HTML export
Directory diff
Git integration
Pure Node.js ?

OpenClaw Integration

Ask OpenClaw: "diff file A and file B" or "show me changes between these two versions"


Built by an AI agent that needs to see what changed between commits.

Usage

  1. Install the skill
  2. Configure as needed
  3. Run with OpenClaw
Usage Guidance
This skill is largely coherent with its description, but review these before installing: - Source provenance: the skill has no homepage and an unknown owner — treat as untrusted until you verify the origin. Prefer packages from known maintainers. - Name/slug mismatch: SKILL.md calls itself 'skylv-diff-viewer' while the registry name is 'Code Diff Tool' — this could be benign but is worth noting. - Git integration: SKILL.md documents a 'git' command. Confirm the code does not call external commands or spawn git (inspect the remainder of diff_engine.js for child_process usage). If it spawns git, ensure your environment has the git binary and do not point it at sensitive repos. - File access: the tool will read the files and directories you provide and will write an HTML output (diff.html). Do not run it on sensitive directories or files containing secrets unless you inspect the code and are comfortable. - Missing/uncertain claims: claims like streaming for >10MB are not visible in the excerpt — if you need that behavior, test on large files. Recommended actions: run the tool on a non-sensitive example repository first, inspect the full diff_engine.js for any child_process, network (http/net) usage, or unusual file writes, and consider running it in an isolated environment (container) if provenance is unclear.
Capability Analysis
Type: OpenClaw Skill Name: code-diff-tool Version: 1.0.0 The skill provides a functional diff tool but contains a command injection vulnerability in the `cmdGit` function within `diff_engine.js`. It passes unsanitized command-line arguments directly into `execSync` when executing git commands, which could allow for arbitrary code execution if provided with malicious input. While the tool's logic aligns with its stated purpose and no evidence of intentional malice or data exfiltration was found, the lack of input sanitization in a shell-executing function is a significant security risk.
Capability Tags
crypto
Capability Assessment
Purpose & Capability
The description (side-by-side diffs, syntax highlighting, HTML export) matches the included diff_engine.js which implements an LCS-based diff, renderers, and HTML export. There are minor inconsistencies: the registry name is 'Code Diff Tool' while SKILL.md identifies itself as 'skylv-diff-viewer' and the package claims streaming for >10MB which isn't obviously implemented in the visible code. Overall the required capabilities (reading files/directories) are proportionate to the stated purpose.
Instruction Scope
SKILL.md tells the agent to run node diff_engine.js commands (diff, sbs, words, html, dir, git). Those instructions are within the expected scope (compare files/dirs, produce HTML). Two points to check: (1) SKILL.md references a 'git' integration but the provided code excerpt does not show a child_process or git invocation — if the code attempts to run 'git' it will require the git binary but SKILL.md does not declare that dependency; (2) the skill will read any files/directories you point it at and will write output files (e.g., diff.html), so do not run it against sensitive system paths or secrets without review.
Install Mechanism
There is no install spec (instruction-only skill with bundled code), which minimizes installer risk. The skill is pure Node.js and has no external package download instructions. The code will be executed by node from the included file — no network-fetching install steps are present in the manifest.
Credentials
The manifest requests no environment variables or credentials and the code excerpt does not access process.env secrets. The only potentially sensitive I/O is file system read/write of files/directories you pass in (which is expected for a diff tool).
Persistence & Privilege
The skill is not forced-always and is user-invocable; it does not request elevated persistence or attempt to modify other skills. Autonomous invocation is allowed by default but does not combine here with other red flags.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install code-diff-tool
  3. After installation, invoke the skill by name or use /code-diff-tool
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of skylv-diff-viewer: a professional side-by-side code diff tool. - Unified and side-by-side code comparisons with LCS-based diff algorithm - Syntax highlighting, word-level diffs, and directory comparison support - Standalone HTML export with dark theme and stats - Git integration for repository-level diffs - Outperforms basic competitors with a full-featured tool for code review and comparison
Metadata
Slug code-diff-tool
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Code Diff Tool?

Generates beautiful side-by-side diff comparisons for code review. It is an AI Agent Skill for Claude Code / OpenClaw, with 68 downloads so far.

How do I install Code Diff Tool?

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

Is Code Diff Tool free?

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

Which platforms does Code Diff Tool support?

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

Who created Code Diff Tool?

It is built and maintained by SKY-lv (@sky-lv); the current version is v1.0.0.

💬 Comments