Saves a resumable handoff file when a session's context or usage budget is nearly exhausted, enabling any AI runtime to continue work with zero lost context.
Ships in smart-handoff. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Runtime-agnostic protocol for pausing long-running work in this repository without losing state. Any agent — this one or a different runtime entirely — must be able to read the latest handoff file and continue exactly where the previous agent stopped.
Trigger this protocol proactively, without waiting to be asked, when any of these hold:
Do not trigger it for ordinary task completion — this is for involuntary or anticipated interruption of unfinished work, not for wrapping up a finished task.
Path: docs/ai/handoff/<runtime_name>/<ddmmaaaa>/handoff_<step_name>.md
<runtime_name>: lowercase slug of the agent/CLI you are running as — claude-code, codex, antigravity, opencode, gemini-cli, etc. If genuinely unknown, use unknown-runtime.<ddmmaaaa>: today's date, day-month-year, no separators (e.g. 08082026).<step_name>: short kebab-case slug naming what phase was in flight (e.g. migrate-repositories, fix-typecheck-errors, wire-bff-routes). Use handoff_<step_name>.md as the filename, e.g. handoff_fix-typecheck-errors.md.Use the template in templates/handoff.md (in this skill directory) verbatim as the structure. It requires, at minimum:
unknown — never fabricate one), timestamp, git branch, git HEAD sha.npx tsc --noEmit, fix the N errors it reports starting with src/app/lib/repositories/notification-repository.ts:20, pattern: X".Stage and commit everything reversible (code + the handoff file itself) with a semantic commit message. Never commit secrets — check git status output for anything suspicious before staging broadly. If the tree has partially-broken code (e.g. mid-refactor, typecheck failing), that is fine and expected — commit it anyway with a message that says so (e.g. wip(migration): repositories mid-migration, typecheck 72 errors remaining). A handoff is only useful if the tree matches the file.
Push the current branch to origin (create upstream tracking with -u if not already set). If push is rejected or blocked, say so explicitly in the response — do not silently skip it. Never force-push as part of this protocol.
Confirm before finishing that the committed handoff file includes:
templates/handoff.md).The handoff file must be fully self-contained markdown — no runtime-specific syntax, no references to "this conversation", no assumption the reader has any prior context. Write it so that a cold agent with only repo access and this file can resume. This is the test: would a different AI product, with no memory of this session, know exactly what to do next by reading only this file plus the repo?
After steps 0-4 complete:
When a user says "implement the handoff" (in Claude, Codex, Antigravity, OpenCode, or elsewhere):
docs/ai/handoff/*/*/handoff_*.md, sorted by date directory then file mtime — the most recent one across all runtime subfolders, not just your own runtime's folder (a Codex session may need to resume a Claude handoff).unknown — a next agent must not trust a made-up identifier.What SKILL.md sets; muted values are Claude Code's defaults
/smart-handoff:smart-handofffrom smart-handoff
npx claudepluginhub andersonlimahw/lemon-ai-hub --plugin smart-handoffOther plugins' skills for the same job