Maintains structured session state that survives context compression events. Captures decisions, issues, work completed, current task, next steps, and key context into a persistent checkpoint file.
From session-resiliencenpx claudepluginhub nbkm8y5/claude-plugins --plugin session-resilienceThis skill uses the workspace's default tool permissions.
references/state_schema.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Configures VPN and dedicated connections like Direct Connect, ExpressRoute, Interconnect for secure on-premises to AWS, Azure, GCP, OCI hybrid networking.
This skill manages a structured session state file (.claude/session-state.md) that preserves critical context across context compression events. It prevents "context amnesia" — the loss of decisions, rationale, and non-obvious context when long sessions are compacted.
The session state file follows the schema defined in references/state_schema.md. Always read this schema before creating or updating a state file.
Load the schema from: ${CLAUDE_PLUGIN_ROOT}/skills/incremental-summarization/references/state_schema.md
Trigger a state file update in these situations:
PreCompact (automatic): The PreCompact hook fires before context compression. This is the most critical trigger — it is the last chance to capture state before information is lost.
Manual checkpoint (/checkpoint): The user explicitly requests a snapshot. May include a free-text note that should be appended to the User Notes section.
Milestone completion: After completing a significant unit of work (e.g., finishing a feature, fixing a complex bug, completing a refactor), proactively suggest a checkpoint.
Each section of the state file serves a specific purpose:
| Section | Purpose | Update Rule |
|---|---|---|
| Session Goal | High-level objective for the session | Set once, update only if the user changes direction |
| Decisions Made | Every decision with rationale and alternatives | Append only — never remove past decisions |
| Issues Found | Bugs, blockers, and observations with severity | Append new; check off resolved; never remove |
| Work Completed | Finished tasks with files touched | Append only — never remove completed work |
| Current Task | What is in progress right now | Replace entirely on each update |
| Next Steps | Priority-ordered upcoming work | Replace entirely on each update |
| Key Context | Non-obvious info that cannot be derived from code | Accumulate; remove only if explicitly invalidated |
| User Notes | Free-text notes from /checkpoint invocations | Append only |
.claude/ directory if it does not existreferences/state_schema.md.claude/session-state.md.claude/session-state.mdreferences/state_schema.md for format reference.claude/session-state.md.claude/session-state.md in full — this is now the single source of truthThe state file is always at: .claude/session-state.md (relative to project root)
Create the .claude/ directory if it does not exist. Do not use any other location.
Never lose information. Append-only sections must never have entries removed. If a decision was reversed, add a new decision entry explaining the reversal — do not delete the original.
Be thorough before compression. When the PreCompact hook fires, capture everything that would be lost. Err on the side of including too much rather than too little.
Be concise during manual checkpoints. Users invoke /checkpoint for quick saves. Capture the delta since the last checkpoint, not a full rewrite.
Timestamps are mandatory. Every entry that has a timestamp field must include one. Use YYYY-MM-DD HH:MM format (24-hour clock).
Severity must be exact. Issues use exactly one of: critical, warning, info (lowercase).
Respect the schema. The section headers in state_schema.md are the canonical format. Do not rename, reorder, or add new top-level sections.
Key Context is for the non-obvious. Do not record things that can be easily determined by reading the code or git log. Focus on implicit knowledge, environment quirks, user preferences, and undocumented behaviors.