From suaveplan-primitives
Use when implementing or debugging code that uses @suaveplan/diff: Zero-dependency RFC 6902 JSON Patch engine with structural diffing, patch application/inversion, linear history manager, sync manager, and rich path utilities.
How this skill is triggered — by the user, by Claude, or both
Slash command
/suaveplan-primitives:diffThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Zero-dependency RFC 6902 JSON Patch engine for computing, applying, and inverting structural differences between JSON documents. The `diff(a, b)` function produces a minimal patch using index-based or LCS array strategies; `applyPatch` applies it; `revertPatch` undoes it; and `invertPatch` creates an inverse patch. A `HistoryManager` provides undo/redo with configurable depth and branch truncat...
Zero-dependency RFC 6902 JSON Patch engine for computing, applying, and inverting structural differences between JSON documents. The diff(a, b) function produces a minimal patch using index-based or LCS array strategies; applyPatch applies it; revertPatch undoes it; and invertPatch creates an inverse patch. A HistoryManager provides undo/redo with configurable depth and branch truncation on new edits. A SyncManager handles optimistic concurrency: apply local changes speculatively, then reconcile when the server responds. RFC 6901 JSON Pointer parsing and formatting is exposed as a standalone path module. Use this package for collaborative editing, undo/redo stacks, change-event streams, and any system where you need to track or transmit the delta between two object states rather than the full state itself.
@suaveplan/diff.import { /* see API Reference below */ } from "@suaveplan/diff";
Workspace dependencies: none
This skill is intentionally short. The package's own documentation is the authoritative source — read these in order:
packages/primitives/diff/README.md — overview, install, quick-start, module indexpackages/primitives/diff/src/**/*.md — co-located docs per implementation file (Purpose, Features, Basic + Advanced examples, full API reference, Implementation notes — all packages in genesis ship ≥200 words per module)packages/primitives/diff/package.json exports map — every subpath you can import fromWhen the user asks an API question, read the relevant co-located .md first; do not answer from training-data memory.
../../../README.mdThis SKILL.md is auto-generated by suaveplan-skills/scripts/generate-skills.ts from the package's README. Do not edit by hand — re-run the generator after the README changes.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub suaveplan/suaveplan-skills --plugin suaveplan-primitives