pattern-memento

Community

Safeguard object state with instant snapshots

Authorjohnnystefan
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill explains how to capture and restore an object's private state so undo/redo, snapshots, and rollback features work without violating encapsulation.

Core Features & Use Cases

  • Originator and Memento roles: Define the Originator that creates mementos and the immutable Memento value object that stores its state.
  • Caretaker history: Keep clean history management outside the Originator so snapshots can be replayed or reverted safely.
  • Use Case: Apply the pattern when building draft/publish workflows, audit trails, or any feature that must restore complex domain objects to a prior state.

Quick Start

Use pattern-memento to snapshot the entity state before applying a risky update.

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: pattern-memento
Download link: https://github.com/johnnystefan/test-saas-business/archive/main.zip#pattern-memento

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.