context-handoff

Transfers session state to a new context when token limits approach.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/juanjo-zurich/juarvis-v4 --skill context-handoff-juanjo-zurich
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-handoff
Source: https://github.com/juanjo-zurich/juarvis-v4/tree/main/plugins/core/skills/context-handoff
Command: npx skills add https://github.com/juanjo-zurich/juarvis-v4 --skill context-handoff-juanjo-zurich

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When an AI conversation approaches its token limit or undergoes compaction, critical work state can be lost. This Skill defines a structured handoff protocol that preserves goals, decisions, progress, and next steps so a fresh context can resume work without information loss. ## Core Features & Use Cases - Activation Signals: Detects low-context conditions such as upcoming compaction, truncated responses, or estimated remaining tokens below 20% of the window. - Three-Phase Protocol: Preparation (persist observations via mem_save and generate a session summary), Transfer (record SDD phase, pending decisions, and queued actions), and Reconnection (restore state via mem_context and mem_search). - Standardized Handoff Format: Provides a Markdown template covering current state, last actions, next steps, relevant files, and unresolved decisions. - Use Case: During a long Spec-Driven Development session, the model detects context running low, saves a structured handoff summary to persistent memory, and the next session resumes exactly where the previous one stopped. ## Quick Start Ask the agent to generate a context handoff summary of the current session state before the conversation runs out of tokens.

Frequently Asked Questions about context-handoff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preserve AI session state before context runs out?▼

Trigger the handoff protocol when roughly 20% of tokens remain: persist pending observations with mem_save, generate a session summary covering goal, discoveries, and next steps, then record the current task phase and pending decisions for the next context.

How to resume work after AI conversation compaction?▼

Call mem_context to retrieve recent context, then run mem_search with keywords from the ongoing work. Verify the recovered state is coherent and continue from the last registered point in the handoff summary.

What should a context handoff summary include?▼

A handoff summary should include the current SDD phase, the task in progress, active blockers, the last completed actions, immediate next steps, relevant file paths with their roles, and any unresolved decisions.

When should I start the context handoff process?▼

Start the handoff when about 20% of the token window remains, when the system signals upcoming compaction, when responses begin truncating, or when the model appears to forget recent details. Do not wait until the last moment.

What happens if the memory service is unavailable during handoff?▼

In degraded mode when the Engram memory service is unavailable, the protocol falls back to writing the handoff summary into a local .handoff.md file so the state can still be recovered manually in the next session.