From Session Memory
Save and restore working state across Claude Code sessions via a structured HANDOFF.md under .ai/memory/. Use when the user wants to stop and preserve state ("let's stop here for today", "checkpoint this session", "write a handoff", "I'm about to run out of context, save our state") or to restore it ("resume where we left off", "continue from last session", "what were we working on?"). Produces a handoff file with goal, plan, decisions, failed approaches, next steps, and git anchors, plus a warm-start brief on resume. Do NOT use for ordinary git commit/push requests, for "continue" meaning the next step of the current in-conversation task, or for human-facing summaries like PR descriptions or status reports.
How this skill is triggered — by the user, by Claude, or both
Slash command
/session-memory:session-handoffThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Capture working state when a session pauses; restore it warm when work resumes.
Capture working state when a session pauses; restore it warm when work resumes.
Claude Code sessions are stateless — closing a session or hitting compaction loses in-flight plans, decisions, and failed attempts, so the next session starts cold and repeats work (including re-trying approaches that already failed). This skill writes a structured handoff at pause time and verifies it against reality at resume time.
Before any read or write under .ai/memory/, read references/memory-contract.md — it defines file locations, formats, size caps, archive rules, the precedence rule, and safety rules shared with the lessons-learned skill. Never improvise the format.
Run when the user asks to stop, checkpoint, or save state.
references/memory-contract.md) so the location, format, and caps are exact.git branch --show-current && git rev-parse --short HEAD && git status --porcelain
Non-git project: record today's date and mtimes of the key files instead..ai/memory/HANDOFF.md exists, move it to archive/HANDOFF-<timestamp>.md per the contract (retention: last 5). Never silently overwrite — the old handoff may be the only record of a concurrent session's work.templates/handoff.md (read the template now; it is fill-in-ready). Fill every section from the actual conversation:
<redacted: ...>. Never auto-commit; writes stay inside .ai/memory/.Stay within the ~150-line cap: compress decisions prose first, never drop failed approaches or anchors.
Run when the user asks to resume, continue from a past session, or asks what was being worked on.
.ai/memory/HANDOFF.md at the repo root..ai/memory/HANDOFF.md (archiving any existing file first). If a pasted handoff and the file on disk disagree, the pasted one is newer input — say so and ask which to trust.memory-schema marker, mangled sections) → treat it as read-only evidence: quote what is salvageable, tell the user the file did not match the expected format, and do not rewrite or overwrite it without their say-so.git branch --show-current && git rev-parse --short HEAD && git status --porcelain
Compare with the handoff's Environment anchors. On mismatch, quantify the drift — e.g. "branch moved from feat/auth to main", "12 commits since the handoff (git rev-list --count <saved-sha>..HEAD)", "key file src/auth.ts no longer exists". Drift means the saved plan may no longer be true: warn and re-verify the affected steps instead of blindly executing the old plan.
git cat-file -e <sha> fails or rev-list errors — rebase, force-push, shallow clone), say so explicitly, fall back to git log --oneline --since=<saved date> for a picture of what happened, treat ALL Plan step statuses as unverified, and get explicit user confirmation before executing any step of the saved plan. Never read an unreachable sha as "no commits since the handoff"..ai/memory/LESSONS.md exists, read it and quote the entries whose When: condition matches the work being resumed (read-only). If a lesson contradicts a handoff Decision, the lesson outranks it — flag the conflict in the brief, don't silently pick.This skill fires when the user asks; it cannot fire merely because a handoff exists on disk. A SessionStart hook closes that gap by mentioning a parked handoff (and lesson count) automatically at session start — see references/session-start-hook.md (bundled and pre-enabled when installed via the session-memory plugin; a copy-paste settings.json snippet for standalone installs). Without it, resume happens only on request.
.ai/memory/. Source of truth for paths, formats, caps, archive retention, precedence, and safety rules..ai/memory/; no secrets; no auto-commit. These keep the skill safe to ship in real repositories.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub luka-zivkovic/overclock --plugin session-memory