Capture current session state and generate a handoff prompt for seamless continuation in a new session. Use when context window is filling up, before ending a long session, or when explicitly requested.
View on GitHubswannysec/context-keeper
context-keeper
skills/session-handoff/SKILL.md
January 22, 2026
Select agents to install to:
npx add-skill https://github.com/swannysec/context-keeper/blob/main/skills/session-handoff/SKILL.md -a claude-code --skill session-handoffInstallation paths:
.claude/skills/session-handoff/# Session Handoff Generate a complete handoff package that allows a new session to resume work seamlessly. ## When to Use - Context window approaching limit (agent or user notices slowdown/truncation) - Before intentionally ending a productive session - User requests handoff explicitly - Complex task needs to span multiple sessions ## Handoff Process ### Step 0: Check Token Budget Read `.claude/memory/.memory-config.md` for token budget (if exists): - `economy`: Session summary ~200-400 tokens (brief, 2-3 sentences) - `light`: Session summary ~400-700 tokens (concise, 3-5 sentences) - `standard`: Session summary ~600-1000 tokens (default, 5-8 sentences) - `detailed`: Session summary ~900-1500 tokens (comprehensive, 8-12 sentences) If no config exists, use `standard` budget. ### Step 1: Sync Memory First Before generating handoff, ensure memory is current: - Update active-context.md with current state - Add any new decisions to decisions/ - Update progress.md with completed/in-progress items - Create session summary in sessions/ **Session file format:** `sessions/YYYY-MM-DD-HHMM.md` or `sessions/YYYY-MM-DD-topic.md` > **Note:** Include timestamp (HHMM) to avoid overwriting previous same-day sessions. The topic suffix is preferred when a clear topic exists. ```markdown # Session: [date] ## Summary Brief summary of what was accomplished. - economy: 2-3 sentences - light: 3-5 sentences - standard: 5-8 sentences (default) - detailed: 8-12 sentences with comprehensive context ## Work Completed - [Item 1] - [Item 2] ## Decisions Made - ADR-NNN: [title] (if applicable) ## Context for Next Session - [Key context point] ## Open Questions - [Question if any] --- *Session duration: ~[time]* ``` ### Step 2: Gather Handoff Context Collect from conversation and memory: - **Original goal:** What the user asked for - **Current task:** What we're actively working on - **Progress:** What's been completed this session - **Remaining work:** What still needs to be don