session-state-snapshot-reuse
CommunityReuse session state snapshots safely.
Authorliuyu520
Version1.0.0
Installs0
System Documentation
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.
Dependency Matrix
Required Modules
None requiredComponents
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: session-state-snapshot-reuse Download link: https://github.com/liuyu520/cc_source/archive/main.zip#session-state-snapshot-reuse Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.