snapshot-lifecycle-and-diff

Community

Automatically stale bundles when sources update.

Authortransreal
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: snapshot-lifecycle-and-diff
Download link: https://github.com/transreal/claudecode/archive/main.zip#snapshot-lifecycle-and-diff

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.