Skills

A single SKILL.md teaches AI coding assistants how to invoke @compare-html/cli on demand.

What It Does

Once installed, the skill lets your AI assistant compare two HTML files or strings directly from the conversation. Just ask it to diff two HTML pages, templates, or fragments and it will run the CLI locally and report the differences.

Supported Agents

  • Claude Code
  • OpenAI Codex CLI
  • OpenCode
  • Cursor
  • Any agent compatible with the Agent Skills format

Installation

The fastest install is via npx skills — it auto-detects every agent you have installed and drops the skill into each one:

npx skills add unitstack/compare-html

Quick Example

Compare two inline HTML strings:

npx @compare-html/cli '<h1>Hello</h1>' '<h1>Hi</h1>'

Or compare two HTML files:

npx @compare-html/cli base.html contrast.html

Common Options

  • -a, --array-compare-method <method> — Child-node comparison strategy: byIndex (default), lcs, or unordered
  • -k, --key-case-insensitive — Ignore case when comparing tag and attribute names
  • -v, --value-case-insensitive — Ignore case when comparing text and attribute values
  • -j, --json-export — Output the diff as JSON instead of a table
  • -o, --output <file> — Write the diff to a file

Difference Types

  • added — Value exists in the contrast HTML but not in the base HTML
  • deleted — Value exists in the base HTML but not in the contrast HTML
  • valueChanged — Value changed between the two HTML inputs