Works with the AI Agents you already use
Canonical JSON Hash & Diff
This skill puts JSON into a canonical form first, then hashes and compares it, so only real differences show.
$5
Canonical JSON Hash & Diff
Example session with this skill installed
Someone reformatted our agent config. Check whether cfg_a2.json is still the same as cfg_a.json, then tell me exactly what's different in the new cfg_b.json that was pushed this morning.
- Read your context and instructions
- Compiled the canonical json hash
Check 1: cfg_a.json vs cfg_a2.json (exit code 0)
{
"match": true,
"sha256A": "0b2552ec184c0192085a298304f63439dc28965b833099af4720640d4af81e12",
"sha256B": "0b2552ec184c0192085a298304f63439dc28965b833099af4720640d4af81e12",
"diffs": []
}
Same content. cfg_a2 has different key order, writes 2000 as 2e3 and 0.2 as 0.20, but the canonical hashes are identical, so nothing changed.
Check 2: cfg_a.json vs cfg_b.json (exit code 1)
{
"match": false,
"sha256A": "0b2552ec184c0192085a298304f63439dc28965b833099af4720640d4af81e12",
"sha256B": "d81b9eae23faae8e2a7173e7a93375ba21ed21ea40d402081f926b75e88d1827",
"diffs": [
{ "path": "$.limits.timeout_s", "kind": "changed", "from": 30, "to": 60 },
{ "path": "$.region", "kind": "added", "to": "eu-west" },
{ "path": "$.temperature", "kind": "type-changed", "from": 0.2, "to": "0.2" },
{ "path": "$.tools[2]", "kind": "added", "to": "browser" }
]
}
Four real changes
- The timeout doubled from 30s to 60s.
- A new "region": "eu-west" field.
- temperature is now the string "0.2" instead of the number 0.2. That is likely a bug, since many clients will reject or ignore it.
- A third tool, "browser", was added. Worth confirming that was intended, since it widens what the agent can do.
Connects securely to your tools. The creator never sees your data.
About this skill
Agent Trust: "is it really the same?" answered with a hash
Text diffs are noisy on JSON: reordered keys and reformatted numbers show up as changes when nothing has really changed. This skill puts JSON into a canonical form first, then hashes and compares it, so only real differences show.
What it does
- Canonicalises JSON (sorted keys, normalised numbers and strings, in the style of RFC 8785 JCS)
- Hashes the canonical form with SHA-256
- With two files, reports
match: true/falseand every difference by path: added, removed, changed or type-changed (e.g. a number that became a string)
When an agent should use it
- You ask whether two JSON files, API responses or model outputs are really the same
- A stable content hash is needed for caching, receipts or deduplication
- Reviewing what changed between two versions of a config or test fixture
What it outputs
JSON: a match flag, both SHA-256 hashes, and a list of diffs (path, kind, from, to). With one file, its canonical form and hash. Exit 0 = identical content; 1 = different.
Limitations
- Follows the RFC 8785 approach but is not a certified JCS implementation; edge-case number formatting may differ from other libraries.
- Arrays are compared by position, so reordering an array counts as a change.
- Whole documents are loaded into memory, so it is meant for normal-size JSON, not multi-gigabyte files.
Open source, packaged skill
Original work by Simon Gant. The core logic is public under the MIT licence (kar-canon). This listing is the packaged, tested agent skill: SKILL.md workflow, CLI, receipt output and docs. Requires Node.js 18+, zero dependencies, no network, no API keys.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed today
- Software
Node.js 18+
Permissions
Runs one local Node.js script (`node scripts/json-canon-diff.js`) through the agent's shell tool. Reads only the one or two JSON files you pass it. No network access, no file writes, no environment variables read. Pure compute.