What problem does it solve?
This Skill provides reusable patterns for saving and restoring conversation state by snapshotting the messages to disk and loading them back in a deterministic, JSONL-based format.
Core Features & Use Cases
- Snapshot → Store → Restore workflow: serialize messages to per-line JSON, write atomically using a .tmp file and rename to prevent corruption.
- Load and apply: read the JSONL, parse each line into Message objects, and apply with context.setMessages to restore a prior session state.
- Reusable, portable storage guidance: uses session-scoped project directories and portable paths to keep per-session state co-located with the working project.
- Examples and references: file paths and utility modules in the codebase demonstrate how to integrate and reuse the pattern in features that checkpoint or manipulate messages.
Quick Start
Use this skill when saving conversation state to disk, restoring from a saved state, manipulating the messages array, or building features that need conversation checkpointing.