deep-diff

Compute structural differences between two JSON-compatible JavaScript values. Use this skill when you need to programmatically diff objects, check if two data structures are equivalent, or find what paths changed. Triggers include "diff two objects in code", "find changed keys", "compute JSON diff", "deep equality check with diff output".

7 stars

Best use case

deep-diff is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Compute structural differences between two JSON-compatible JavaScript values. Use this skill when you need to programmatically diff objects, check if two data structures are equivalent, or find what paths changed. Triggers include "diff two objects in code", "find changed keys", "compute JSON diff", "deep equality check with diff output".

Teams using deep-diff should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/deep-diff/SKILL.md --create-dirs "https://raw.githubusercontent.com/heldernoid/agentic-build-templates/main/projects/data-analytics/json-differ/skills/deep-diff/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/deep-diff/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How deep-diff Compares

Feature / Agentdeep-diffStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Compute structural differences between two JSON-compatible JavaScript values. Use this skill when you need to programmatically diff objects, check if two data structures are equivalent, or find what paths changed. Triggers include "diff two objects in code", "find changed keys", "compute JSON diff", "deep equality check with diff output".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# deep-diff

Programmatic deep diff between two JSON-compatible values. Used internally by json-differ.

## API

```typescript
import { computeDiff } from './src/lib/diff';

const left  = { name: "Alice", age: 30 };
const right = { name: "Alicia", age: 30, role: "admin" };

const nodes = computeDiff(left, right, []);
// Returns DiffNode[]
```

## DiffNode shape

```typescript
interface DiffNode {
  kind: "unchanged" | "added" | "removed" | "changed" | "structural";
  path: string[];           // e.g. ["user", "address", "city"]
  leftValue: unknown;
  rightValue: unknown;
  children?: DiffNode[];
}
```

## Ignore rules

```typescript
import { applyIgnoreRules } from './src/lib/ignoreRules';

const rules = [
  { type: "key_name", value: "updatedAt" },
  { type: "exact_path", value: "user.id" }
];

const filteredNodes = applyIgnoreRules(nodes, rules);
```

## Use cases

- Assertion in tests: "what changed between these two API responses?"
- Change detection in data pipelines
- Generating JSON Patch (RFC 6902) documents from a diff result

## Limitations

- Arrays are compared by index (positional), not by element identity
- Type mismatches (object vs primitive) produce a single "changed" node, not a structural diff
- Circular references: not supported (will overflow the stack)

Related Skills

migration-diff skill

7
from heldernoid/agentic-build-templates

## When to use

api-diff

7
from heldernoid/agentic-build-templates

Compare two OpenAPI spec files and produce a structured diff report. Use when you need to know what changed between two versions of an API spec, detect breaking changes before releasing a new API version, or check a PR's API spec changes in CI. Triggers include "diff API specs", "compare OpenAPI", "what changed in the API", "check API changes", "API spec diff", "compare swagger files", or any task involving comparing two versions of an OpenAPI or REST API specification.

json-differ

7
from heldernoid/agentic-build-templates

Compare two JSON blobs and view structural and value differences. Use when you need to compare API responses, config files, database records, or any two JSON objects. Triggers include "compare JSON", "JSON diff", "what changed", "JSON differences", "diff two objects", or any task involving comparing JSON data.

file-tree-diff

7
from heldernoid/agentic-build-templates

Compare two directory trees and show added, removed, and changed files with color output. Use when you need to compare two versions of a directory, find what changed between releases, audit differences between staging and production file sets, or verify a deployment. Triggers include "compare directories", "directory diff", "what changed in", "file differences between", "ftd", "tree diff".

diff-ignore

7
from heldernoid/agentic-build-templates

Configure ignore patterns for file-tree-diff using .ftdignore files or CLI flags. Use when setting up ignore rules for directory comparisons, excluding build artifacts, or creating project-specific ignore configurations. Triggers include "ignore node_modules in diff", ".ftdignore", "exclude files from diff", "diff ignore patterns".

Skill: Uptime Monitoring

7
from heldernoid/agentic-build-templates

## Overview

Skill: Status Page

7
from heldernoid/agentic-build-templates

## Overview

Skill: unit-conversion

7
from heldernoid/agentic-build-templates

## Overview

Skill: recipe-scaler

7
from heldernoid/agentic-build-templates

## Overview

reading-list

7
from heldernoid/agentic-build-templates

Operate the reading-list API to save, manage, tag, search, and export articles.

email-digest

7
from heldernoid/agentic-build-templates

Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.

websocket-realtime

7
from heldernoid/agentic-build-templates

Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".