snapshot-lifecycle-and-diff

Compute page-hash diffs and append lifecycle events to JSONL.

3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/transreal/claudecode --skill snapshot-lifecycle-and-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: snapshot-lifecycle-and-diff
Source: https://github.com/transreal/claudecode/tree/main/Claude%20Directives/skills/snapshot-lifecycle-and-diff
Command: npx skills add https://github.com/transreal/claudecode --skill snapshot-lifecycle-and-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill defines how to keep derived “bundles” consistent with evolving “snapshots” by detecting page-level version changes and propagating lifecycle status without directly broadcasting invalidations to every consumer.

Core Features & Use Cases

  • Snapshot lifecycle orchestration: Updates snapshot meta.LifecycleStatus (e.g., "Stale" / "Invalidated") so all referencing bundles lazily reflect the latest state on BundleStatus reads.
  • Append-only source event logging: Records VersionedUpdate, Retraction, SourceDeletion, and SchemaChange into events/source-events.jsonl using iSanitizeForJSON and a deterministic read/write path.
  • Page-hash diff computation: Computes diffs between page-hashes.json snapshots and produces a normalized Added/Removed/Changed/Unchanged summary.
  • High-level refresh API: Provides a composed workflow (RefreshSnapshot) that merges diffing + lifecycle updates + event append + SupersededBy handling in one call.
  • Use case: When an external paper updates (e.g., arXiv v2 → v3), automatically mark affected snapshots as stale so generated bundles become outdated and are reconsidered during later audits.

Quick Start

Ask your system to run the “RefreshSnapshot” workflow for the old and new snapshot IDs, then verify bundle states via the lazy BundleStatus evaluation.

Frequently Asked Questions about snapshot-lifecycle-and-diff

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

FAQPage Schema
How do I mark derived bundles as stale when source snapshots update?

To mark derived bundles as stale when source snapshots update, you update snapshot meta LifecycleStatus so referencing bundles lazily reflect the latest state during BundleStatus reads.

What is lazy invalidation for snapshot lifecycle management?

Lazy invalidation for snapshot lifecycle management means updating snapshot meta status to Stale or Invalidated, allowing referencing bundles to reflect the latest state only when BundleStatus is read.

How do I compute a page-hash diff between snapshot versions?

Computing a page-hash diff between snapshot versions requires reading stored page-hashes.json files to produce a normalized Added, Removed, Changed, and Unchanged summary of page-level changes.

How do I log event sourcing records for retractions and versioned updates?

Logging event sourcing records for retractions and versioned updates involves appending entries like VersionedUpdate or Retraction to events/source-events.jsonl using iSanitizeForJSON sanitization.

Can I process snapshot refresh, diffing, and lifecycle updates in one operation?

You can process snapshot refresh, diffing, and lifecycle updates in one operation by running the RefreshSnapshot workflow, which coordinates diffing, lifecycle transitions, and SupersededBy handling.

When should I not use direct broadcast invalidation for bundle consistency?

Direct broadcast invalidation for bundle consistency should be avoided when you need to propagate lifecycle status across many consumers, as lazy invalidation via snapshot meta reads handles this more efficiently.