deep-object-diff

Compute recursive differences between two JavaScript objects and output changed paths.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/trusted-american/marketplace --skill deep-object-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deep-object-diff
Source: https://github.com/trusted-american/marketplace/tree/main/plugins/a3-plugin/skills/deep-object-diff
Command: npx skills add https://github.com/trusted-american/marketplace --skill deep-object-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Compute precise differences between two JavaScript objects to reveal exactly what changed, enabling targeted responses in data workflows.

Core Features & Use Cases

  • Deep, recursive comparison of nested objects to return only changed paths and their new values.
  • Supports additions, deletions (undefined in the diff for removals), and modifications, suitable for auditing and triggering conditional logic.
  • Use cases include Firestore-like onUpdate triggers where only specific fields should drive downstream actions.

Quick Start

Run the diff on two sample objects to see exactly which fields changed.

Frequently Asked Questions about deep-object-diff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute a deep diff between two nested JavaScript objects?

To compute a deep diff between nested JavaScript objects, you need a recursive comparison function that detects additions, modifications, and deletions while returning only the changed paths and their new values.

How do I track data changes for a Firestore-like audit trail?

Tracking data changes for a Firestore-like audit trail requires comparing old and new document states to output a structured changes object, which identifies specific modified fields to drive conditional logic and logging.

What is the best way to detect deleted fields when diffing objects?

The best way to detect deleted fields when diffing objects is to use a deep-diff implementation that explicitly preserves undefined values for removals, ensuring your downstream synchronization logic accurately processes deletions.

Can I use a structured changes object to trigger conditional onUpdate logic?

Yes, you can use a structured changes object to trigger conditional onUpdate logic by evaluating the specific changed paths and new values, allowing your application to fire targeted actions only when relevant nested fields are modified.

Does a recursive object diff handle all nested data change detection scenarios?

A recursive object diff handles nested data change detection by traversing deeply into sub-objects, but it requires predictable data structures to accurately map modifications and deletions without ignoring undefined values.